Przypuszczam, że sprawa jest trywialna ale nie znalazłem w sieci odpowiedzi na ten konkretny problem. Skrypt trywialny a nie działa. Wygląda na to jakby przy kolejnej odsłonie skryptu (po wypełnieniu pól) wprowadzone dane nie były przesyłane. Mam błąd w konfiguracji? Windows, Apache2, php5. Pozdrawiam.
<html>
<head>
<title>Listing 10-4</title>
</head>
<body bgcolor=\"#ffffff\" text=\"#000000\" link=\"#cbda74\" vlink=\"#808040\"
alink=\"#808040\">
<?
// all double quotations in $form must be escaped,
// otherwise a parse error will occur
$form = \"
<form action=\"listing10-4.php\" method=\"post\">
<input type=\"hidden\" name=\"seenform\" value=\"y\">
<b>Give us some information!</b><br>
Your Name:<br>
<input type=\"text\" name=\"name\" size=\"20\" maxlength=\"20\"
value=\"\"><br>
Your Email:<br>
<input type=\"text\" name=\"email\" size=\"20\" maxlength=\"40\"
value=\"\"><br>
<input type=\"submit\" value=\"subscribe!\">
</form>\";
// If we haven't already seen the form ($seenform passed by hidden
// form value), show the form.
if (!isset($_POST['seenform'])): print \"$form\"; else : print \"Hi, $name!. Your email address is $email\"; endif; ?> </body> </html>
// proszę używać bbcode - DeyV