hai everyone..i have run this file in my server.the following error is display
Notice: Undefined index: name in F:\wamp\www\examples1\register.php on line 8
Notice: Undefined index: username in F:\wamp\www\examples1\register.php on line 9
Notice: Undefined index: emailid in F:\wamp\www\examples1\register.php on line 10
Notice: Undefined index: password in F:\wamp\www\examples1\register.php on line 11
Notice: Undefined index: cpassword in F:\wamp\www\examples1\register.php on line 12
Anyone help me..
<?php
$host ='localhost';
$user ='root';
$password ='';
$database ='dta';
$conn = mysql_connect($host,$user,$password)or die ('server is not connect');
mysql_select_db($database,$conn);
$name = mysql_real_escape_string($_POST['name']);
$username = mysql_real_escape_string($_POST['username']);
$emailid = mysql_real_escape_string($_POST['emailid']);
$password = mysql_real_escape_string($_POST['password']);
$cpassword = mysql_real_escape_string($_POST['cpassword']);
if(isset($_POST['submit']))
{
$query = " insert into users(name,username,emaiid,password,)values ('$name','$username','$emailid','$password')";
$res = mysql_query($query);
header('location:register_success.php');
exit();
}
?>
<html>
<head>
<title> registeration form</title>
</head>
<body>
<form>
<form id= "register form" name="register form" method="post" action="">
<table width="300" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<th> name </th>
<td><input name="name" type="text" class="textfield" id="name" /></td>
</tr>
<tr>
<th>user name </th>
<td><input name="username" type="text" class="textfield" id="user name" /></td>
</tr>
<tr>
<th width="124">email id</th>
<td width="168"><input name="emailid" type="text" class="textfield" id="email id" /></td>
</tr>
<tr>
<th>Password</th>
<td><input name="password" type="password" class="textfield" id="password" /></td>
</tr>
<tr>
<th>Confirm Password </th>
<td><input name="cpassword" type="password" class="textfield" id="cpassword" /></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="submit" value="Create account" /></td>
</tr>
</table>
</form>
</body>
</html>