php - entering a number into a query -


i've been stuck @ while , i'm sure simple fix can't find answer it.

i'm trying remove row in table variable i'm putting query isn't being recognized. in $remove query below, if enter number corresponds row query works fine, when use variable won't.

if (isset($_post['remove'])) {   $remove = $_post['remove'];  //echo $remove; print number entered   $query ="delete dogid regdogs dogid = $remove ";  if($query_run = mysql_query($query)){  $query_num_rows = mysql_num_rows($query_run);   if($query_num_rows==1)       echo 'entry removed ';  else       echo 'not removed ';    } 

thanks

$query ="delete regdogs dogid = $remove "; 

try this. syntax error.

again, please move mysqli_ methods. mysql_ methods deprecated.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -