-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo2.php
More file actions
34 lines (30 loc) · 774 Bytes
/
demo2.php
File metadata and controls
34 lines (30 loc) · 774 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
32
33
34
<html>
<body>
<form method="post" action="demo2.php">
Enter RollNo To Update Record
<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("update student set Name='$nm',Address='$add',Percent=$per where RollNo=$rno");
if($k==true)
echo("Record Update Successfully....");
else
echo("Not Found");
mysql_close($con);
?>