Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_POST['submit']))
- {
- $uname = $_POST['username'];
- //MySQLi Query
- $con = mysqli_connect("localhost","root","","mscit");
- if(!$con)
- {
- die("Error :".mysqli_error());
- }
- else
- {
- //none
- }
- //delete from login where username=7842;
- $dbq = "delete from login where username='$uname'";
- mysqli_query($con, $dbq);
- echo "<p align='center'> Record Deleted.";
- //echo "Record Deleted : ".mysql_affected_rows($con);
- }
- else
- {
- header('Location: DeleteRecord.html');
- }
- ?>
Add Comment
Please, Sign In to add comment