Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //MySQL Delete data
- $host = 'localhost';
- $user = 'root';
- $password = 'root';
- $db_name = 'basicDB_2';
- //students_2
- $mysql_conn = mysqli_connect( $host, $user, $password, $db_name );
- if ( !$mysql_conn ) {
- die( "Connection Failed" . mysqli_connect_error() );
- }
- $sql = "DELETE FROM students_2 WHERE id=11";
- if(mysqli_query($mysql_conn, $sql)){
- echo "Record Deleted Successfully";
- }else{
- echo "Error deleting failed" . mysqli_error($mysql_conn);
- }
- mysqli_close( $mysql_conn );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement