HI friends;
I am using redhat 5 , php 3.0.16 and mysql 3.23. I have a question about reload a page, maybe it is a stupid question for the experts in php , but I am new in this program. I create a form that insert new clients. The first form is:
register.html
<body>
<form action=submitform.php3 method=POST>
NAME: <input type=text name=name size=20 maxlength=20><br>
LOGIN: <input type=text name=login size=20 maxlength=20><br>
PASSWORD: <input type=password name=passwd size=20 maxlength=20><br>
<p>
<input type=submit>
</form>
</body>
the second form is:
register.php3
<?php
mysql_connect (localhost, root, airplane);
mysql_select_db (plane);
if ($passwd) {
$key = "senha de acesso";
$passwd_encrypt = mcrypt_cbc(MCRYPT_SAFER-SK128, $key, $passwd, MCRYPT_ENCRYPT);
mysql_query ("INSERT INTO client (name,login,passwd) VALUES ('$name', '$login', '$passwd_encrypt')");
print ("$name");
print (" Thank you for registration");
} else {
echo " error ";
}
?>
If I reload a page the user is insert more times, anyone can tell where can I find a doc that tell me about, that is not possible insert anything else after the submit buttom.
I thank in advanced.
Regards.