-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path35.php
More file actions
35 lines (30 loc) · 689 Bytes
/
35.php
File metadata and controls
35 lines (30 loc) · 689 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
35
<?php
$conn=new mysqli($db_host,$db_user,$db_password,$db_name);
if ($conn->connect_error)
{
die("Coonect Failed");
}
else
{
echo "Connected";
if (isset($_REQUEST['edit']))
{
$id=$_REQUEST['id'];
$name=$_REQUEST['name'];
$roll=$_REQUEST['roll'];
$address=$_REQUEST['address'];
$sql="UPDATE student set id='$id',name='$name',roll='$roll',address='$address', WHERE id={$_REQUEST['id']}";
if ($conn->query($sql)===TRUE)
{
echo "Reord Updated";
}
else
{
echo "Unable to Updated";
}
}
}
set in the form button <input type="submit" name="edit" value=".$row['id'].">
set in the opened form
value="<?php if(isset($row["name"])) { echo $row["name"];} ?>";
?>