Jump to content

[SOLVED] Database not updating


cs1h

Recommended Posts

Hey,

 

I have this small query but I can't get it working.

 

The code is,

 

<?php

$Abs=$_POST['goingTo']; 

if(empty($Abs)){
echo "";
}else{

include("config.php"); 

mysql_connect($server, $db_user, $db_pass) or die (mysql_error()); 
mysql_select_db("bbvb") or die(mysql_error()) ; 

$sql = ("UPDATE vvvv SET goingTo='$Abs' WHERE Code_1 = '$code1' AND username='$username_b'");
  if (mysql_query($sql)) {
    echo "";
  } else {
    echo "There has been a problem updating your next destination";
  }
}
?>

 

Does any one know whats going wrong?

 

Thanks,

Cs1h

Link to comment
https://forums.phpfreaks.com/topic/141835-solved-database-not-updating/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.