Ho provato a fare un'altro form un po' più articolato... eppure anche questo mi da schermata bianca. Sapreste dirmi il perché? Scusate il disturbo
Questo è il source della pagina "index.html"...
codice:
<html>
<head><title>We need your informations.</title></head>
<body text="white" bgcolor="black">
<center><h1>Secret Society</h1></center>
<center><h2>We need your informations.</h2></center>
<form action="result.php" method="get">
<div align="center">
<table border="0">
<td>Name:<td><input name="name" type="text" size="18">
<tr>
<td>Surname:<td><input name="surn" type="text" size="18">
<tr>
<td>Address:<td><input name="addr" type="text" size="30">
<tr>
<td>Cell phone number:<td><input name="cell" maxlength="11" size="12">
<tr>
<td colspan="2">
<center>Other thing that we may had forget:</center>
<div align="center"><textarea name="text" rows="3" cols="30">Type here. No jokes, please.</textarea></div>
</table>
</div>
<div align="center"><input type="submit" value="Send data to SecSoc"></div>
</form>
</body>
</html>
E questo il source della pagina "result.php"...
Codice PHP:
<html>
<head><title>SecSoc received infos</title></head>
<body bgcolor="black" text="white">
<?php
$name = $_GET['name'];
$surn = $_GET['surn'];
$addr = $_GET['addr'];
$cell = $_GET['cell'];
$text = $_GET['text'];
if (($name=="") || ($surn=="") || ($addr=="") || ($cell=="")) {
echo "<center><font color="red">Wait a second... you are cheating us!</font></center>";
echo "<center><font color="red">[url="index.html"]Get back to the form![/url]</font></center>";
}
else {
echo "<center><h2>Here are the informations of ".$name." ".$surn."!</h2></center>";
echo "His address is ".$addr.".";
echo "His cellphone number is ".$cell."...";
}
if ($text!="" && $text!="Type here. No jokes, please.") {
echo $name." is a good person. He also wrote something about him:";
echo $text;
echo "That's it.";
}
else {
echo "That's it.";
}
?>
</body>
</html>
P.S.: Non badate tanto al contenuto, era così per sbizzarrisi!