PHP program to perform the user registration form using HTML tags.
CODE:
reg.html:
<html>
<body>
<form action="reg.php" method="post">
<table>
<tr>
<td> name</td>
<td><input type="text" name="uname"></td>
</tr>
<tr>
<td> rno</td>
<td><input type="text" name="rno"></td>
</tr>
<tr><td>mail</td>
<td><input type="text" name="mail1"><td></tr>
<tr>
<td><input type="submit" name="submit" value="ok"></td>
</tr>
</table>
</body>
</html>
<body>
<form action="reg.php" method="post">
<table>
<tr>
<td> name</td>
<td><input type="text" name="uname"></td>
</tr>
<tr>
<td> rno</td>
<td><input type="text" name="rno"></td>
</tr>
<tr><td>mail</td>
<td><input type="text" name="mail1"><td></tr>
<tr>
<td><input type="submit" name="submit" value="ok"></td>
</tr>
</table>
</body>
</html>
reg.php:
<?php
$uname=$_REQUEST['uname'];
$rno=$_REQUEST['rno'];
$mail1=$_REQUEST['mail1'];
$conn=mysql_connect("localhost","root","gasc");
mysql_select_db(g,$conn);
$query="insert into reg values('$uname','$rno','$mail1')";
$query1=mysql_query($query);
echo "sucess";
?>
$uname=$_REQUEST['uname'];
$rno=$_REQUEST['rno'];
$mail1=$_REQUEST['mail1'];
$conn=mysql_connect("localhost","root","gasc");
mysql_select_db(g,$conn);
$query="insert into reg values('$uname','$rno','$mail1')";
$query1=mysql_query($query);
echo "sucess";
?>
Comments
Post a Comment