sql - Deleting the row in php -


i have create database (student) , table(details) in sql, fields name,class,section,address,mobile. need delete selva row in table,i can't delete please explain!!

php code-

<?php $connection = mysql_connect('localhost', 'root',''); if (!$connection) { die("database connection failed" . mysql_error()); } $select_db = mysql_select_db( "student",$connection); if (!$select_db) { die("database selection failed" . mysql_error()); } ?> <?php if(isset($_get['did'])) { $delete_id = mysql_real_escape_string($_get['did']); $sql = mysql_query("delete details name = 'selva' "); if($sql) {     header("location: table1.php");  } else {     echo "error"; } } ?> 

please explain ! how delete row in table database.

your mysql query proper need check below condition satisfied or not.

if(isset($_get['did'])) {     echo 'debug test';exit; } 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -