thats correct
i wanna check fiels before the get inserted
Is this in php or html
//get the input from user
$firstname=addslashes(strip_tags($POST['firstname']));
$lastname=addslashes(strip_tags($POST['lastnname']));
//check for required fields
if (empty($firstname) OR empty($lastname)){
print "sorry, you should complete the form";
}else{
//the rest of the code here
}
Here is the form file and how should i retyp the syntax for it to work with youre code?
<html>
<head>
<title>W W W . F L A M E L I N E . C O M</title>
<link rel="stylesheet" type="text/css" href="style/forms.css" title="style" TYPE="text/css">
</head>
<BODY BGCOLOR="#50538D" TEXT="#A8A8A8" TOPMARGIN=0 LEFTMARGIN=0 link=white alink="white" vlink="white">
<table border=0 cellpadding=0 cellspcing=0 width="100%" height="100%">
<tr>
<td valign="top" height="100%"><img src="img/newuser.gif" border=0 width="382" height="28">
<table border=0 cellpadding=0 cellspacing=0 width="100%">
<tr>
<td width="80">
</td>
<td valign="top">
<br>
<form action="newuser.php" method="POST">
<font size="1" face="verdana, geneva, arial"> Firstname:<br>
<input type="text" name="firstname" size="15" class="f"><br>
<font size="1" face="verdana, geneva, arial"> Lastname:<br>
<input type="text" name="lastname" size="15" class="f"><br>
<font size="1" face="verdana, geneva, arial"> Gender:<br>
<input type="text" name="gender" size="15" class="f"><br>
<font size="1" face="verdana, geneva, arial"> Birth:<br>
<input type="text" name="birthdate" size="15" class="f"><br><br><br>
<font size="1" face="verdana, geneva, arial"> Username:<br>
<input type="text" name="nickname" size="15" class="f"> (A minimum of 4 numbers or letters)<br>
<font size="1" face="verdana, geneva, arial"> Password:<br>
<input type="text" name="password" size="15" class="f"> (A minimum of 4 numbers or letters)<br>
<font size="1" face="verdana, geneva, arial"> Verify:<br>
<input type="text" name="password2" size="15" class="f"> (In case you type wrong)<p><br>
<font size="1" face="verdana, geneva, arial">E-mail:<br>
<input type="text" name="email" size="15" class="f"> (In case you lose your password)<p>
<br>
<input type="submit" name="login" value="Create User" border="0"class="f"><p>
</td>
</table>
</td>
</tr>
</table>
</body>
</html>