Hi,
I'm new to PHP and html but think I got to learn that stuff now, after some years Database-experience.
Iworking at my first form and can't see anything in the PHP-output, even no error-message !??? here are the 'giant' scripts:
1. html form:
<html>
<head>
<title>My first PHP-Form</title>
</head>
<body>
<form method="post" action="form_ou tput.php" >
please fill your e-mail adress !
<input type="text" name="email">
<input type="submit" value="Go! ">
</form>
</body>
</html>
------------------------------------
2. form_output.php :
<?php
error_reporting (E_ALL);
if (empty($_POST['mail'])) {
echo "nothing here ";
} else {
echo "the mail: ".$_POST['mail'];
print_r($_POST) ;
var_dump($_POST );
}
echo "strlen($_P OST['mail'])";
?>
-----------------------------------------------------
when I open the html with firefox I see the form-element and can type in, no errors, everything looks fine !
When I enter the "go" button, html disapears and the PHP-file is opended by firefox, but totaly empty ! no error, no nothing ! only the URL is to see !???
it goes more weird, when I insert this line somewhere in the PHP-script:
echo "<br />\n";
instead of a blank line, I see while executing: \n";
and emmidiatly attached the next line of code !
What's wrong there ? If read dozends of tutorials, all telling the same, as I think, I did !?
thanks for any tip, LaoDe
I'm new to PHP and html but think I got to learn that stuff now, after some years Database-experience.
Iworking at my first form and can't see anything in the PHP-output, even no error-message !??? here are the 'giant' scripts:
1. html form:
<html>
<head>
<title>My first PHP-Form</title>
</head>
<body>
<form method="post" action="form_ou tput.php" >
please fill your e-mail adress !
<input type="text" name="email">
<input type="submit" value="Go! ">
</form>
</body>
</html>
------------------------------------
2. form_output.php :
<?php
error_reporting (E_ALL);
if (empty($_POST['mail'])) {
echo "nothing here ";
} else {
echo "the mail: ".$_POST['mail'];
print_r($_POST) ;
var_dump($_POST );
}
echo "strlen($_P OST['mail'])";
?>
-----------------------------------------------------
when I open the html with firefox I see the form-element and can type in, no errors, everything looks fine !
When I enter the "go" button, html disapears and the PHP-file is opended by firefox, but totaly empty ! no error, no nothing ! only the URL is to see !???
it goes more weird, when I insert this line somewhere in the PHP-script:
echo "<br />\n";
instead of a blank line, I see while executing: \n";
and emmidiatly attached the next line of code !
What's wrong there ? If read dozends of tutorials, all telling the same, as I think, I did !?
thanks for any tip, LaoDe
Comment