×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Jaffar Hussain
Added: Jul 28, 2015 8:57 AM
Modified: Jul 28, 2015 8:58 AM
Views: 10
Tags: no tags
Get variable via post and remove from database
  1. $ad_id=$_POST['id'];
  2.  
  3.  
  4.  
  5. $sql_q="SELECT count(*) FROM gallery where G_id='$ad_id'";
  6.  
  7. $q_result=  mysql_query($sql_q);
  8. if($q_result){
  9.     echo 'Image Deleted';
  10.     exit();
  11. }else{
  12.     echo 'Sorry an error occured. Please try again.';
  13.     exit();
  14. }
  15.  //$res_arr=mysql_fetch_assoc($q_result);//Ad details array
  16.  
  17.  
  18. ?>