-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfirstdbCollege.php
More file actions
86 lines (70 loc) · 1.69 KB
/
Copy pathfirstdbCollege.php
File metadata and controls
86 lines (70 loc) · 1.69 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<html>
<head>
<title>Student Details</title>
</head>
<body>
<form action="data.php" method="post">
<table border="44px" width="500px" align="center">
<tr>
<td colspan="2" bgcolor="teal">
<h1>Student Details</h1>
</td>
</tr>
<tr>
<td>Student Name:</td>
<td><input type="text" name="name" ></td>
</tr>
<tr>
<td>School Name:</td>
<td><input type="text" name="school"></td>
</tr>
<tr>
<td>Roll No.</td>
<td><input type="text" name="rollno"></td>
</tr>
<tr>
<td>Result</td>
<td><input type="text" name="result"></td>
</tr>
<tr>
<td colspan="2"> <input type="submit" name="submit" value="Submit Now">
</td>
</tr>
</table>
</form>
<table width="800px" border="5" align="center">
<tr>
<td>Serial No</td>
<td>Student Name</td>
<td>School Name</td>
<td>Roll No</td>
<td>Result</td>
<td>Delete</td>
<td>Edit</td>
</tr>
<?php
mysql_connect("localhost","root","");
mysql_select_db("college");
$query1="select * from students";
$run=mysql_query($query1);
while ($row=mysql_fetch_array($run)) {
# code...
$id=$row['id'];
$s_name=$row['student_name'];
$school_name=$row['school_name'];
$roll_no=$row['roll_no'];
$s_result=$row['result'];
?>
<tr>
<td><?php echo $id; ?> </td>
<td><?php echo $s_name; ?></td>
<td><?php echo $school_name; ?></td>
<td><?php echo $roll_no; ?></td>
<td><?php echo $s_result; ?></td>
<td><a href="delete.php?del=<?php echo $id;?>" >Delete </a> </td>
<td><a href="edit.php?edit=<?php echo $id;?>" >Edit</a></td>
</tr>
<?php } ?>
</table>
</body>
</html>