By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,776 Members | 1,233 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,776 IT Pros & Developers. It's quick & easy.

Writing to Html file problem?

P: n/a
I had problem of writing the php data to the html, everytime i submit
the info, the data is added to the database, but not to the html file

$ourFileName = "testFile.html";
$ourFileHandle = fopen($ourFileName, 'w') or die("can't open file");

$last = trim($_POST['last']);
$comment = trim($_POST['comment']);

fwrite($ourFileHandle, "$last"\n$comment");

fclose($ourFileHandle);

Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Am Mo 09.05.05 um 15:07 CEST schrieb ma*****@hotmail.com:
I had problem of writing the php data to the html, everytime i submit
the info, the data is added to the database, but not to the html file

fwrite($ourFileHandle, "$last"\n$comment");


Hint: do a error_reporting(E_ALL); in you scripts. Than you propably had
seen the problem of the wrong quotes:
fwrite($ourFileHandle, "$last"\n$comment");
should be
fwrite($ourFileHandle, "$last\n$comment");

stefan
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.