Commit fc5d6df8 authored by rama chandra's avatar rama chandra
Browse files

updated minor changes in admin pannel

parent d5ddc590
......@@ -26,11 +26,11 @@ $id=$_REQUEST['id'];
$uname =$_REQUEST['uname'];
$blood=$_REQUEST['blood'];
$age =$_REQUEST['age'];
$addr1 =$_REQUEST['addr1'];
$dd =$_REQUEST['dd'];
$mobile=$_REQUEST['mobile'];
$city=$_REQUEST['city'];
$update="update bloo set uname='".$uname."', blood='".$blood."', age='".$age."', addr1='".$addr1."',mobile='".$mobile."',city='".$city."' where id='".$id."'";
$update="update bloo set uname='".$uname."', blood='".$blood."', age='".$age."', dd='".$dd."',mobile='".$mobile."',city='".$city."' where id='".$id."'";
$result1= mysqli_query($con, $update) or die ( mysqli_error());
$status = "Record Updated Successfully. </br></br><a href='view.php'>View Updated Record</a>";
echo '<p style="color:#FF0000;">'.$status.'</p>';
......@@ -43,7 +43,7 @@ echo '<p style="color:#FF0000;">'.$status.'</p>';
<p><input type="text" name="uname" placeholder="Enter Name" required value="<?php echo $row['uname'];?>" /></p>
<p><input type="text" name="blood" placeholder="Enter BLood Group" required value="<?php echo $row['blood'];?>" /></p>
<p><input type="text" name="age" placeholder="Enter Age" required value="<?php echo $row['age'];?>" /></p>
<p><input type="text" name="addr1" placeholder="Enter Address" required value="<?php echo $row['addr1'];?>" /></p>
<p><input type="text" name="dd" placeholder="Enter Last donated" required value="<?php echo $row['dd'];?>" /></p>
<p><input type="text" name="mobile" placeholder="Enter Mobile No" required value="<?php echo $row['mobile'];?>" /></p>
<p><input type="text" name="city" placeholder="Enter City" required value="<?php echo $row['city'];?>" /></p>
<p><input name="submit" type="submit" value="Update" /></p>
......
......@@ -8,10 +8,10 @@ if(isset($_POST['new']) && $_POST['new']==1)
$uname =$_REQUEST['uname'];
$blood=$_REQUEST['blood'];
$age =$_REQUEST['age'];
$addr1 =$_REQUEST['addr1'];
$dd =$_REQUEST['dd'];
$mobile=$_REQUEST['mobile'];
$city=$_REQUEST['city'];
$ins_query="insert into bloo (`uname`,`blood`,`age`,`addr1`,`mobile`,`city`) values ('$uname','$blood','$age','$addr1','$mobile','$city')";
$ins_query="insert into bloo (`uname`,`blood`,`age`,`dd`,`mobile`,`city`) values ('$uname','$blood','$age','$dd','$mobile','$city')";
mysqli_query($con,$ins_query) or die(mysql_error());
$status = "New Record Inserted Successfully.</br></br><a href='view.php'>View Inserted Record</a>";
}
......@@ -34,7 +34,7 @@ $status = "New Record Inserted Successfully.</br></br><a href='view.php'>View In
<p><input type="text" name="uname" placeholder="Enter Name" required /></p>
<p><input type="text" name="blood" placeholder="Enter BLood Group" required /></p>
<p><input type="text" name="age" placeholder="Enter Age" required /></p>
<p><input type="text" name="addr1" placeholder="Enter Address" required /></p>
<p><input type="text" name="dd" placeholder="Enter Last donated" required /></p>
<p><input type="text" name="mobile" placeholder="Enter Mobile No" required /></p>
<p><input type="text" name="city" placeholder="Enter City" required /></p>
<p><input name="submit" type="submit" value="insert" /></p>
......
......@@ -15,7 +15,7 @@ include("auth.php");
<h2>View Records</h2>
<table width="100%" border="1" style="border-collapse:collapse;">
<thead>
<tr><th><strong>S.No</strong></th><th><strong>Name</strong></th><th><strong>Blood Group</strong></th><th><strong>Age</strong></th><th><strong>Region/Place</strong></th><th><strong>Mobile No</strong></th><th><strong>City</strong></th><th><strong>Edit</strong></th><th><strong>Delete</strong></th></tr>
<tr><th><strong>S.No</strong></th><th><strong>Name</strong></th><th><strong>Blood Group</strong></th><th><strong>Age</strong></th><th><strong>Last donated</strong></th><th><strong>Mobile No</strong></th><th><strong>City</strong></th><th><strong>Edit</strong></th><th><strong>Delete</strong></th></tr>
</thead>
<tbody>
<?php
......@@ -23,7 +23,7 @@ $count=1;
$sel_query="Select * from bloo ORDER BY id desc;";
$result = mysqli_query($con,$sel_query);
while($row = mysqli_fetch_assoc($result)) { ?>
<tr><td align="center"><?php echo $count; ?></td><td align="center"><?php echo $row["uname"]; ?></td><td align="center"><?php echo $row["blood"]; ?></td><td align="center"><?php echo $row["age"]; ?></td><td align="center"><?php echo $row["addr1"]; ?></td><td align="center"><?php echo $row["mobile"]; ?></td><td align="center"><?php echo $row["city"]; ?></td><td align="center"><a href="edit.php?id=<?php echo $row["id"]; ?>">Edit</a></td><td align="center"><a href="delete.php?id=<?php echo $row["id"]; ?>">Delete</a></td></tr>
<tr><td align="center"><?php echo $count; ?></td><td align="center"><?php echo $row["uname"]; ?></td><td align="center"><?php echo $row["blood"]; ?></td><td align="center"><?php echo $row["age"]; ?></td><td align="center"><?php echo $row["dd"]; ?></td><td align="center"><?php echo $row["mobile"]; ?></td><td align="center"><?php echo $row["city"]; ?></td><td align="center"><a href="edit.php?id=<?php echo $row["id"]; ?>">Edit</a></td><td align="center"><a href="delete.php?id=<?php echo $row["id"]; ?>">Delete</a></td></tr>
<?php $count++; } ?>
</tbody>
</table>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment