Re: [PHP] Pear Page2

2013-01-06 Thread Silvio Siefke
Hello,

On Sun, 6 Jan 2013 11:36:39 -0500
Tedd Sperling t...@sperling.com wrote:

 You said --
 
  1.) All websites are created manually. (nano + html/css Tags)
 
 -- and I replied Not mine. In other words, some of my web-sites are 
 NOT created manually. 

What do you mean I do realize. I'm just wondering, why write an email 
to the matter is insignificant.

 They are dynamically generated from user input.

When you have this situation be happy. Other site, other content, and 
other target groups.

 I don't use nano (I don't even know what that is), but what I do is 
 to create pages that pass W3C compliance and follow best practices. 
 From what I've gathered from most frameworks I've reviewed, they have 
 problems (similar to ASP) in mixing different languages in ways such 
 that compliance with W3C and accessibility issues are difficult, if 
 not impossible, to achieve.

Nano is a editor, very simple editor for Linux. http://www.nano-editor.org
Which website is the w3c compliant? No website that has many users and has 
a lot of interaction.
 
 Even CMS's have difficulty with compliance and accessibility issues 
 because of the lack of knowledge of the user/client. I have clients 
 who insist on CMS's, but then are clueless as to user issues and 
 difficulties..

Correct. 
 
 So, where does that leave a Web Developer? It leaves them with the 
 responsibility to learn and apply what they learned to their craft. 
 Is there an easy way out, such as to use a certain framework, or CMS, 
 or other such attempts at minimizing the work involved? The answer is 
 a simple  No.

I simply asked a question, nothing more, nothing less. I looked for an 
alternative. I do not need a web developer. I'm not a web developer. 
I manage a few sites, most of my Customers are hosting customers.

 Instead, you have to spend every waking hour learning and applying that 
 knowledge with openness to the possibility that you still don't understand 
 the problems involved  it's a never ending battle to educate yourself.

I have not asked about the internationalization of web pages, I ask for an 
alternative a Pear package. As I have also written the websites are manually 
created and activated for years.I want to try out just a little and learn if 
you do not understand that the problem is not with me. Internationalization 
between large and small sites is the difference. The websites that I manage 
only a different date. For this need not study. That goes with nano and a
good Database Sheet. Learning will never stop. The only thing that changes
is the speed. As a child we hjaben knowledge absorbed, today I sweep only.


Thank you for help, Kind Regards
Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Pear Page2

2013-01-05 Thread Silvio Siefke
Hello,

On Sat, 05 Jan 2013 07:53:04 +
Ashley Sheridan a...@ashleysheridan.co.uk wrote:

 I'm not sure quite what you'd expect such a module to do? Is this for
 templating?

page2 creates complete websites. Would be useful because I'm sitting 
at the website internationalization. Template engines seem complicated.


Thank you for help, Greetings
Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Pear Page2

2013-01-05 Thread Silvio Siefke
Hello,

On Sat, 05 Jan 2013 14:52:12 +
Ashley Sheridan a...@ashleysheridan.co.uk wrote:

 I've just had a quick look at page2, and I can't say I see the point.
 You'd end up having to write a lot more code that was harder to manage
 by adding each element through a class like that if your site got even
 moderately complicated.
 
 There are many templating engines, and some are more complicated than
 others, don't write them off just yet. Technically speaking, page2 is a
 template engine of a kind, so you're already using one.

Page2 dominated not HTML5. The websites at issue are in HTML5 written.
So an alternative must be sought to Page2.

Thanks for help, Greetings
Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Pear Page2

2013-01-05 Thread Silvio Siefke
Hello,

On Sat, 05 Jan 2013 17:21:05 +
Ashley Sheridan a...@ashleysheridan.co.uk wrote:

 If the pages are already written, why do you want to start changing 
 the way they've been built?

1.) All websites are created manually. (nano + html/css Tags)
2.) The maintenance effort now is not enough.
3.) The programming (PHP) provides opportunities, which I'd like to meet.
4.) curiosity
5.) enough time 

Me was helped a lot in forums and mailing lists. I would like it back, because 
that's the idea of ​​Open Source. Maybe I can help someone be in the distant 
future on a project. For that I must even try to learn once, and read.

Is that all one reason or think I'm wrong?


Thank you for help, Greetings
Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Pear Page2

2013-01-05 Thread Silvio Siefke
Hello,

On Sat, 05 Jan 2013 20:36:12 +
Ashley Sheridan a...@ashleysheridan.co.uk wrote:

 What I would start to do is break out common parts of pages to include 
 files. This would be stuff like headers, footers, sidebars, etc.
 From there, you could use variables to set things like titles, 
 stylesheets, nav items, etc. I've had to do this recently on a project
 that was written as a bunch of static files.

That i try at moment. Headers, CSS and static Content. Other stuff come
from database. Only the date's make little trouble. 

 At worst, you could update the page2 templating engine to account for 
 your new elements. But like I said, I think the very style page2 uses 
 is extremely limiting, and will make maintenance later on.

I think for static content were it good. What think about phptal?


Thank you for help, Kind Regards
Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Pear Page2

2013-01-05 Thread Silvio Siefke
Hallo,

On Sat, 5 Jan 2013 15:40:56 -0500
Tedd Sperling t...@sperling.com wrote:


 Not mine.

What should me say this two words? You not use nano, ok. Editors enough
on earth. Or you not write manually? Then share the way! Or use a CMS?

Thank you for help, Kind Regards
Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Pear Page2

2013-01-04 Thread Silvio Siefke
Hello,


Is there something similar to Pear/Page2 module, that can working with HTML5?


Thanks for help, Greetings
Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Internationalization

2012-12-28 Thread Silvio Siefke
Hello,


i have found a good Tutorial about Internationalization from Websites
with PHP. That's sounds intresting. Has someone Tutorials which go
deeper in the subject. 

http://phpmaster.com/localizing-php-applications-1/

I has a website for that i need this in 3 languages. This sounds that
were a hard way, but a good way. 

Im were happy someone has Tutorials which go deeper.

Nice new Year, Thanks for help, Greetings
Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Question

2012-11-02 Thread Silvio Siefke
Hello,

i have compile PHP 5.4.8 on my Debian System. I have before Version 5.4.7. 
I delete before all old Files from PHP and then run the commands:

./configure --sysconfdir=/usr/local/etc --with-pear --enable-bcmath 
--with-bz2=/usr --disable-calendar --enable-ctype --without-curl 
--without-curlwrappers --enable-dom --without-enchant --enable-exif
--enable-fileinfo --enable-filter --disable-ftp --with-gettext=/usr 
--without-gmp --enable-hash --with-mhash=/usr --with-iconv --disable-intl 
--disable-ipv6 --enable-json --without-kerberos --enable-libxml 
--with-libxml-dir=/usr --enable-mbstring --with-mcrypt=/usr --without-mssql 
--with-onig=/usr --with-openssl=/usr --with-openssl-dir=/usr --disable-pcntl 
--enable-phar --enable-pdo --without-pgsql --enable-posix --with-pspell=/usr 
--without-recode --enable-simplexml --disable-shmop --without-snmp 
--enable-soap 
--enable-sockets --with-sqlite3=/usr --without-sybase-ct --disable-sysvmsg 
--disable-sysvsem --disable-sysvshm --without-tidy --enable-tokenizer 
--disable-wddx --enable-xml --disable-xmlreader --disable-xmlwriter 
--without-xmlrpc --without-xsl --enable-zip --with-zlib=/usr --disable-debug 
--without-cdb --disable-flatfile --disable-inifile --without-qdbm 
--with-freetype-dir=/usr --with-t1lib=/usr --disable-gd-jis-conv 
--with-jpeg-dir=/usr --with-png-dir=/usr --without-xpm-dir --with-gd 
--with-imap=/usr --with-imap-ssl=/usr --with-mysql=/usr 
--with-mysqli=/usr/bin/mysql_config --without-pdo-dblib --with-pdo-mysql=/usr 
--without-pdo-pgsql --with-pdo-sqlite=/usr --without-pdo-odbc 
--with-readline=/usr 
--without-libedit --without-mm --with-pcre-regex=/usr --with-pcre-dir=/usr 
--disable-embed --disable-cli --disable-cgi --enable-fpm --without-apxs2 
--with-kerberos

make -j3 ; make install

But when i look in the directorys i miss pear and the php-cgi.

root:/usr/local/src/php-5.4.8# ls /usr/local/bin
php-config  phpize

root:/usr/local/src/php-5.4.8# ls /usr/local/sbin
php-fpm

Must under bin not be php-cgi and pear, or is my thinking wrong?


Thank you for help and Greetings
Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PDO

2012-10-22 Thread Silvio Siefke
Hello,

i have built php 5.4.7 on Ubuntu with the configure Arguments like on my 
Gentoo System. But on Gentoo run the website without Problems, under Ubuntu
want not work. I become in error.log:

[22-Oct-2012 21:15:00 UTC] PHP Fatal error:  Call to a member function 
prepare() on a non-object in html/index.html on line 23

U use PHP FPM with Nginx. 

The configure Arguments:
http://pastebin.geany.org/qz8TP/

The Script which work:
?php
require_once (db.php);

$query = $db-prepare(SELECT id, title, date FROM bloggen ORDER BY date DESC 
LIMIT 0,5);
if (!$query) {die(Execute query error, because:  . $db-errorInfo());}

$query-execute();

while ($row = $query-fetch(PDO::FETCH_ASSOC)) {
echo pa href=\/blog/post.html?id=.$row['id'].\ 
title=\.(htmlentities($row['title'], ENT_QUOTES, 
UTF-8)).\.(htmlentities($row['title'], ENT_QUOTES, UTF-8))./a/p\n;
}

$row = null;
$query = null;
$db = null;
?


Has someone a idea what is there wrong?


Thanks for help and nice Day.

Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PDO

2012-10-22 Thread Silvio Siefke
Hello,


i found the mistake, i have forgetten write the new path for the sqlite 
database.


Thx
Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] SqLite INSERT want not write

2012-04-19 Thread Silvio Siefke
Hello,

i have a script which should write articles in a Sqlite 0database. The script 
runs without errors, but nothing is written to the database.


The Script: http://nopaste.info/09e68c7e37.html
The db.php: http://nopaste.info/afd4dee47a.html

The Database file has right 777. Has someone an idea? Thank u. 


Regards
Silvio 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] SqLite INSERT want not write

2012-04-19 Thread Silvio Siefke
Hello,

On Thu, 19 Apr 2012 18:39:00 +0100
Stuart Dallas stu...@3ft9.com wrote:

 The script has syntax errors in it. You won't see those errors because PHP 
 won't run a script with syntax errors, so it won't modify the error_reporting 
 and display_errors settings.
 
 You can run php -l script.php to see those errors, but it would be better to 
 set the error_reporting and display_errors values in php.ini on your 
 development system/server.


gentoo-desk siefke # php -l test.php *
No syntax errors detected in test.php

gentoo-desk blog # php -l manage.php
No syntax errors detected in manage.php

gentoo-desk php # php -l db.php
No syntax errors detected in db.php


* I have written in this file only the php code. No syntax errors. 

gentoo-desk blog # php -v
PHP 5.3.10-pl0-gentoo with Suhosin-Patch (cli) (built: Apr  5 2012 00:31:12)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies   

Regards
Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] SqLite INSERT want not write

2012-04-19 Thread Silvio Siefke
Hello,

On Thu, 19 Apr 2012 13:21:46 -0500
tamouse mailing lists tamouse.li...@gmail.com wrote:

 Maybe this will make the syntax errors stand out more:
 
 http://dl.dropbox.com/u/571329/Screenshots/Picture%209.png


ok i have change it to the function date, but now i has the error
message:

PDOException: SQLSTATE[HY000]: General error: 1 SQL logic error or missing 
database

The database is present, and the tables too. 

gentoo-desk db # ls
silviosiefke.db
gentoo-desk db # pwd
/var/www/silviosiefke_de/inc/db

gentoo-desk ~ # php -l test.php
No syntax errors detected in test.php

The script now - http://nopaste.info/63fe0a9148.html

Regards
Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] SqLite INSERT want not write

2012-04-19 Thread Silvio Siefke
On Thu, 19 Apr 2012 14:57:04 -0400
Steven Staples sstap...@mnsi.net wrote:

 I think all you had to do was change this line: (line 27 in the original
 paste)
 $sql = 'INSERT INTO bloggen (date, autor, title, teaser, content)
   VALUES ('' . date( 'Y-m-s H:i:s', time() ) . '', :autor, :title,
 :teaser, :content);';
 
 To this:
 $sql = INSERT INTO bloggen (date, autor, title, teaser, content)
   VALUES ('' . date( 'Y-m-s H:i:s', time() ) . '', :autor, :title,
 :teaser, :content);;

Thats end with:
PDOException: SQLSTATE[HY000]: General error: 1 near (: syntax error

I has changed what say Stuart, no Sytax errors but in the database nothing
will write. 

Regards
Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] SqLite INSERT want not write

2012-04-19 Thread Silvio Siefke
Hello,

On Thu, 19 Apr 2012 20:43:52 +0100
Stuart Dallas stu...@3ft9.com wrote:

 On 19 Apr 2012, at 20:40, siefke_lis...@web.de wrote:
 
  On Thu, 19 Apr 2012 15:17:06 -0400
  Steven Staples sstap...@mnsi.net wrote:

 What does the script output? The only path through your script that doesn't 
 display something is if there are missing $_POST elements, and the PDO errors 
 you've shown previously suggest that they're all present and correct.
 
 So if the thing is running correctly, regardless of what's going into the DB, 
 you should be getting some sort of output. Are you?

Ah im so shamed now. I have only look at the size not in the database.
I has make now a SELECT and all is well done. Im sorry, i should stopped
try to programming with php. 

All is good, thank u so much. All wish nice rest of day or a nice day 
where ever you are. 

Regards
Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] SqLite INSERT want not write

2012-04-19 Thread Silvio Siefke
On Thu, 19 Apr 2012 13:00:40 -0700
Tommy Pham tommy...@gmail.com wrote:

 Technically, it's date('now') per [1] :)  RTFM FTW!

Yes its right, i have read it on sqlite.org. 

PS: Excuse me, what mean RTFM FTW?


Regards
Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] URL Rewriting

2011-06-22 Thread Silvio Siefke
Hello, 

is there a chance with php to use rewriting?

Like Example:

mysite.com/theme.php?id=1 to theme.php theme2.php etc. 

I have ask on the nginx list, but there they say i should use the power
language php. 

When i search in google for Examples or Tutorials i only found mod_rewriting. 


Has someone a Link with Tutorials or other Information?

Thank you.

Nice Day.

Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] URL Rewriting

2011-06-22 Thread Silvio Siefke
On Wed, 22 Jun 2011 17:50:49 -0400 Daniel P. Brown wrote:
  Has someone a Link with Tutorials or other Information?
 
 Not entirely sure what you're asking here, or how you (or the
 nginx folks) expect it to relate to PHP.  Do you mean that you want to
 use PHP to have theme2.php act as if it was called as theme.php?id=2 ?

I have me write a blog, but my blog has link like blogdetail.html?id=1 or =2
through 16 at moment. And for google and other Search  Engines not good the
links, better where i can rewrite to a fix link, and when someone use the
link, php write to correct url. 

Sorry my english not perfect on earth. 

 
 If so, it's not redirect or rewrite, and it's extremely hacky, but
 this is the only real way PHP could achieve the desired result:
 
 ?php
 // dynamictheme.php
 
 if (preg_match('/.*([0-9]+)\.php/Ui',$_SERVER['PHP_SELF'],$match)) {
   $_GET['id'] = $match[1];
   include dirname(__FILE__).'/theme.php';
 }
 
 ?
 
 Then just symlink dynamictheme.php to your various themes like so:
 
 ln -s dynamictheme.php theme2.php
 ln -s dynamictheme.php theme301.php
 ln -s dynamictheme.php theme18447.php
 


Regards 
Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] URL Rewriting

2011-06-22 Thread Silvio Siefke
On Wed, 22 Jun 2011 23:32:10 +0200 Fatih P. wrote:
 try
 
 RewriteEngine on
 RewriteRule ^theme([0-9]+).php$  /index.php?theme=$1 [L]

That is rule for Apache i think. I have nginx, and there i have try much
rules but nothing want work. And on the list from nginx the maintainer write,
i should use the power language php. 


Regards
Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP want not write in Database

2011-05-16 Thread Silvio Siefke
Hello,

On Mon, 16 May 2011 07:13:19 +0100 Ashley Sheridan wrote:
 What is your code in the included db.html? You do realise that unless
 you've told the server especially that it won't know to parse your HTML
 files for PHP code as well. HTML is embedded in PHP, not the other way
 around. If you think more like that, you'll realise why it's not
 working.

in the db.html is the follow code:

start
try {

$db = new PDO(mysql:host={$host};dbname={$database}, $user, $pass);

}catch(PDOException $pe)
{ die('Connection error, because: ' .$pe-getMessage());
}
end

Yes my Webserver parse html files as php. My formular work without problems,
and the old Blog Script work too without problems.


Regards
Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP want not write in Database

2011-05-16 Thread Silvio Siefke
Hello,

On Mon, 16 May 2011 09:57:23 +0800 xianhua zhou wrote:
 VALUES(:autor, :title, :teaser, :teaser, :content, :category, :bild)
 
 There are 2 :teaser,  try remove one.

Yes thats it. Now it work well done! Thank you, im sorry sure was to long at
the pc yesterday. 


Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP want not write in Database

2011-05-16 Thread Silvio Siefke
Hello,

On Mon, 16 May 2011 11:06:17 +0100 Stuart Dallas wrote:
 In order to avoid this problem in future I encourage you to check the return
 value of every function call you make that might fail, i.e. every single
 one! Had you done that here, and then pulled out the last error message from
 PDO you would not have had this problem for longer than a minute.

im sorry, but what u mean? Can u give example. I really starting with PHP 
and when have error messages in log there is no problem for me, i can fix the
mistakes in script, but when php write no messages to log i not know where
should search. 

I has try with xdebug, but this want not work or i understand it wrong. And
which ways for debug give in PHP?


Regards
Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP want not write in Database

2011-05-16 Thread Silvio Siefke
Hello,

On Mon, 16 May 2011 12:07:37 +0100 Stuart Dallas wrote:
 Not all functions raise PHP errors when they fail, in fact most don't. Most
 will return an error value, and a few throw exceptions.
 
 As the manual states, the execute method you're using will return true if it
 succeeded or false if it failed (http://php.net/pdostatement.execute). You
 can then use the errorInfo method to get details of the actual error (
 http://php.net/pdostatement.errorinfo).
 
 The best piece of advice I can give you if you're just starting out is...
 only ever assume that all of the code you write will fail, and make sure it
 handles failures appropriately. Any other assumptions are likely to come
 back and bite you on the arse one way or another.
 
 Oh, and read the manual entry for every function, class and method you're
 using thoroughly!

thanks i will do it but the most of the manual will not understand direct,
that will come with time. I have read the manual for PDO, so that i can use
it. Before i has my Script with mysqli, but i have read from Prepared
Statemants and that they more comfortable and secure and so i has write. All
was good, only that not want write in database. 

Okay thanks all, and im sorry that i disturb with the easy questions. All
mistakes in the script i has found with google and the manual, but when not
give message, there is problem. Often i not know the correct word which should
use to search. 

For example i have a HTML Table, in this are much Code for calculate the
Stock Portfolio. Value, Dividend, Win, Lose Thats okay, but i search a
function with can tell php that should calculate all data in table. At moment
i have write much Variables for every stock which is in Portfolio. Better
were that i can copy the mathematical formula from one row/cell in next
row/cell, like in excel. That i not found, because i not know what is the
right words for searching.

I dont know understand what i mean? My English not the best.  

Thanks for time and help.


Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP want not write in Database

2011-05-15 Thread Silvio Siefke
Hello,

i have a Blog Script for my private Website. Normal i write new Articles
direct with phpmyadmin, but this is not comfortable. I has no errors in Log
for the script and the mysql query log write the correct insert SQL code, but
nothing would be write in the database. I really understand not where is the
mistake. Can someone help me?

Thank You! Wish nice day at all!

Regards
Silvio


My PHP Code:
start
?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
require (inc/db.html);
var_dump($_POST);

// Check the Fields
if (isset ($_POST['submit']) 
isset ($_POST['autor']) 
isset ($_POST['title']) 
isset ($_POST['teaser']) 
isset ($_POST['content']) 
isset ($_POST['category']) 
isset ($_POST['bild']) 
$_POST['autor'] != '' 
$_POST['title'] != '' 
$_POST['teaser'] != '' 
$_POST['content'] != '' 
$_POST['category'] != '' 
$_POST['bild'] != '') {


try {

$sql = INSERT INTO `test` (autor, title, teaser, content, category, bild)
VALUES
(:autor, :title, :teaser, :teaser, :content, :category, :bild);

$write = $db-prepare($sql);
$write-bindValue(':autor', $_POST['autor']);
$write-bindValue(':title', $_POST['title']);
$write-bindValue(':teaser', $_POST['teaser']);
$write-bindValue(':content', $_POST['content']);
$write-bindValue(':category', $_POST['category']);
$write-bindValue(':bild', $_POST['bild']);
$write-execute();
echo h1Artikel ist eingetragen!/h1;


} catch (PDOException $ex) {
echo $ex-getMessage();
}
}
?
/end

The HTML Tags:
start
div class=entry
form method=post action= /
fieldset
labelAutor/label
input type=text class=text name=autor /

labelTitle/label
input type=text class=text name=title /

labelTeaser/label
textarea cols=80 rows=10 class=textarea name=teaser/textarea

labelContent/label
textarea cols=80 rows=10 class=textarea name=content/textarea

labelKategorie/label
input type=text class=text name=category /

labelBild/label
input type=text class=text name=bild /
input type=submit class=submit name=submit value=Posten /
/fieldset
/form
/div
/end

The Mysql Query Log:
start
110516  2:44:29   187 Connect   root@localhost on bloggen
  187 Query INSERT INTO `test` (autor, title, teaser,
content, category, bild) VALUES ('Silvio Siefke', 'Test', 'We try we can
write in database with the script.', 'We try we can write in database with
the script.', 'When not then i not know what is the problem with the
script.', 'Freizeit', 'content.png') 187 Quit
end

The var_dump give me:
start
array(7) { [autor]= string(13) Silvio Siefke [title]= string(4)
Test [teaser]= string(48) We try we can write in database with the
script. [content]= string(61) When not then i not know what is the
problem with the script. [category]= string(8) Freizeit [bild]=
string(11) content.png [submit]= string(6) Posten }
end

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] A Starter has prob in blog script

2011-04-14 Thread Silvio Siefke
Hello,


i have it running now. For complete the thread, write here the code with
it run.

?php
require_once inc/common.php;
$blogid = ((!empty($_GET['blogid'])) ? $_GET['blogid'] : '' );

try {
$sql = SELECT blogid, content FROM `bloggen` WHERE id=.(int)$blogid;
$result = $DB-query($sql);
foreach ($result as $var)  {
echo $var['content'];
}
$DB = null;
}
catch (PDOException $e) {
echo Fehler:  . $e-getMessage();
exit ();
}
?

Regards
Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] A Starter has prob in blog script

2011-04-13 Thread Silvio Siefke
Hello,


i has a CMS System, but want better write my website manually. Im
started at first with PHP or write a Program. I really not know what i
has to do, Google can not ask, i not know what should ask. Google with
mysql link php foreach pdo help not really.

I have for my blog two files, first is the the all entry list with a
link for the complete Entry. The file for list called bloggen.php, the
file for complete Entry called blogdetail.php. I has link the Entrys
from bloggen.php to blogdetail.php with blogdetail.php?blogid=1 or with
the other BlogID from Mysql.

The File bloggen.php run without any Problems. But the linking want not
work.

The code in blogdetail.php is:
---
?php
require_once inc/common.php;
if(isset($_POST['blogid'])  is_array($_POST['blogid']))

try {
$sql = 'SELECT blogid, content FROM `bloggen` WHERE id = ' .$blogid;
$result = $DB-query($sql);
foreach ($_POST as $blogid = $result)
{
echo $result['content'];
}
$DB = null;
}
catch (PDOException $e)
{
echo Fehler:  . $e-getMessage();
exit ();
}
?
---

This code should use the link which come from bloggen.php in. Example,
when i click on link (blogdetail.php?blogid=1) that the script take the
content from database for this entry. I use PDO System, the content in
database is save as HTML code. I has no error in my PHP log, only the
database should communicate with php at the website call, but they not
take the right content.

---
110413 22:52:45   630 Connect   root@localhost on silviosiefke
630 Query   SELECT * FROM sessions WHERE id = 'aeon1g5odp5hi0ka31uqmk16l4'
630 Query   SELECT * FROM `bloggen` WHERE id = blogid ORDER BY date DESC
630 Query   DELETE FROM sessions  WHERE lastUpdated  1302727065
630 Quit
---

I really starter with Program Langs, i have much things really finished,
but now i really not know.


Can someone help me? Thank u so much.


Regards
Silvio


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] A Starter has prob in blog script

2011-04-13 Thread Silvio Siefke
Am 14.04.2011 01:35, schrieb Daniel Brown:
 Good luck with the rest.  You may want to just go back to the CMS,
 or at least start with the basics.  You may already be learning that
 copying and pasting code doesn't always work but sometimes it can
 be malicious code that, to an untrained eye, could really be a Bad
 Thing[TM].

Yes thats right what u write. When i make bad code with copy and paste,
what is with a CMS System? What i know about this code, what i know
about the backdoors, what i know which door is open for the Publisher or
what is with the goverment? This website is not online, i know i must
learn, but with books and howtos u learn not in two weeks all, i think
before we normal write perfect for the masters it need more time.

I nothing has to do with writing programs but i like work with computer,
and my unix servers running perfect and something i must do.

Im sorry when the questions is stupid, but at one point we all must
start. I try that i only post the really hard questions, but what is
hard for me and hard for the masters?

Have nice day.


Silvio




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Newbi Question with calculate

2011-04-06 Thread Silvio Siefke
Hello,


i have write a script for my Stock portfolio and now im not really find
something which can me help.

In the table php calculate me the Present Value and the Percent with
this code:


?php
//Quantity
$ABEI = 240;

//Buy Quote
$KKBEI = 41.31;

//Buy Balance
$KWBEI = 9914.40;

//calculate
include(../inc/quote.php); // Yahoo Quotes
$BEIERG = $KKBEI*$ABEI; // Buy Balance
$BEIDW = $BEIQuote['last']*$ABEI; // Present Value
$BEIAEN1 = $BEIQuote['last']-$KKBEI; // Quote Win
$BEIAEN = $BEIAEN1*100/$KKBEI; //Percent Win
?


Is it possible to apply logic to the whole table? Or do I write for each
additional item the same source code?


It were nice someone has a Tip for me? Thank u.


Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Newbi Question with calculate

2011-04-06 Thread Silvio Siefke
Hello,

sorry i has not correct write.

The example when is finish can see at
http://silviosiefke.de/finance/stock/stock.php

For this i not use a mysql Database, its normal not so much at data.

I have write the source as Text Files:

http://silviosiefke.de/finance/finished/txt/index.txt
- That is the Start Page.

The included Files:
http://silviosiefke.de/finance/finished/txt/include.txt - Yahoo API
http://silviosiefke.de/finance/finished/txt/quote.txt - Yahoo Symbols
http://silviosiefke.de/finance/finished/txt/variable.txt - Calculate

If I calculate all the shares in my portfolio, then I have to create for
each share a file variable.php. Thats little long, is not the problem i
make it, but i think there is a chance to use the file variable.php at
moment for all what come in my portfolio?

For example at Moment i calculate Beiersdorf AG, the next in Portfolio
is Deutsche Bank AG. Now i must write a new variable.php for Deutsche
Bank. Or is there a chance that i can write one variable.php for all
Shares what i take in the portfolio.

Sorry for my english, i know its not perfect. Hope all can understand
what i mean. I learn every day and i find good that i not must use
google since few weeks.


Thanks for help, have nice day at all.


Regards
Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php