Re: PHP want not write in Database

From: Date: Mon, 16 May 2011 09:26:43 +0000
Subject: Re: PHP want not write in Database
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-312802@lists.php.net to get a copy of this message
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

« previous php.general (#312802) next »