prof.
Nunzio Brugaletta |
EsNET |
Sorgenti dei file utilizzati negli esempi relativi al protocollo HTTP:
richiesta.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>richiesta</title>
</head>
<body>
<p align="center"><h1>Richiesta completamento nome</h1></p>
<br><br>
<FORM action="risposta.php" method="POST">
Inserire nome: <INPUT type="text" name="nome">
<br><br>
<INPUT type="submit" value="Invia">
</FORM>
</body>
</html>
risposta.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>risposta</title>
</head>
<body>
<p align="center"><h1>Completamento nome</h1></p>
<br><br>
<?php
$connessione=mysql_connect("localhost","root","");
mysql_select_db("prove");
$q ="SELECT utenti.cognome,utenti.nick ";
$q .="FROM utenti ";
$q .="WHERE utenti.nome = '$_POST[nome]'";
$recset = mysql_query($q);
$tr = mysql_fetch_array($recset);
echo "Nome : $_POST[nome] <br>";
echo "Cognome : $tr[cognome] <br>";
echo "Nickname : $tr[nick]";
?>
</body>
</html>
http://ennebi.solira.org |
ennebi@solira.org |