Jump to content

Strange SQL behaviour.


Urbley

Recommended Posts

case "performEdit": {

$postID = $_GET["postID"];
$title = $_GET["title"];
$dateAdded = $_GET["dateAdded"];
$contents = $_GET["contents"];
echo "$postId";
echo "$title";
echo "$dateAdded";
echo "$contents";

$db = mysql_connect("********", "**********", "****");
mysql_select_db("db65694326",$db);

$dbQuery="UPDATE stephensBlog SET title='$title', dateAdded='$dateAdded', content='$contents' WHERE postID='$postID'";
$result=mysql_query($dbQuery,$db); 

echo "<script>alert('Your entry has been edited');window.location='blogAdmin.php?username=$username&password=$password';</script>";         

break;    

}

 

The syntax works fine on my other switches and the variables are definitely being received by the switch fine (I checked with some echo statements and what not). When I retrieve the database info and display it the values come up as $title $dateAdded and $contents.  rather than the proper values... What's up with this?

 

Steve

Link to comment
https://forums.phpfreaks.com/topic/41035-strange-sql-behaviour/
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.