Submit form issue

When I submit input, it disappears. Tried some solutions. No luck.

[php]

testcomment <?php function escape ($string) { $name = escape($name); $email = escape($email); $message = escape($message); $data = date('D, M. j, Y @ g:i a'); return htmlspecialchars($string, ENT_QUOTES, "UTF-8"); if (!$name || !$email || !$message) { echo "*Please fill out required fields"; } else { if(strlen($name) > 0 && strlen($message)> 0) { (filesize('testcomments.log') > 0); } } $outputstring = $pre. '

'.$name.'. '.$email.''.$data('D, M. j, Y @ g:i a').'


'.$message.'

'; fwrite($fp, $outputstring, strlen($outputstring)); fclose($fp); echo ""; } ?> *

*




Comments:
<?php include "testcomments.log";?> [/php]

I remember telling you once before that this was an issue:
[php]
function escape ($string) {
$name = escape($name);
$email = escape($email);
$message = escape($message);[/php]

Lets say you call the escape function (which is pointless, honestly). Pretend you are the interpreter and run thru the code. What do you think happens?

I remember you said you had other things to do. The input disappears when submitted. That’s my issue.

[php]error_reporting(E_ALL);
ini_set(‘display_errors’, ‘1’);[/php]

No errors appear. That’s no longer an issue. I solved that. Again, I submit input and it disappears.

Add an echo statement between lines 10 and 11, since you aren’t seeing the issue I see.

See what happens.

Sponsor our Newsletter | Privacy Policy | Terms of Service