-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.php
More file actions
31 lines (28 loc) · 698 Bytes
/
demo.php
File metadata and controls
31 lines (28 loc) · 698 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<html>
<body>
<form method="post" action="demo.php">
Enter RollNo
<input type ="text" name="t1"><br>
Enter Name
<input type="text" name="t2"><br>
Enter Address
<input type="textarea" name="t3"><br>
Enter Percentage
<input type="text" name="t4"><br><br><br>
<input type="submit">
</body>
</html>
<?php
$con=mysql_connect("localhost","root","");
if($con==false)
die("Error in Connection.....");
mysql_select_db("rbnb");
$rno=$_POST["t1"];
$nm=$_POST["t2"];
$add=$_POST["t3"];
$per=$_POST["t4"];
$k=mysql_query("insert into student values($rno,'$nm','$add',$per)");
if($k==true)
echo("Record Insert Successfully....");
mysql_close($con);
?>