RON_ron Posted September 8, 2010 Share Posted September 8, 2010 I want to modify a record in my mysql. But this code doesn't seem to work. Could you please help? $SomeVar = $_POST['finco']; mysql_query("UPDATE distributors SETsuburbz='$addressx', addressz='$suburbx', statez='$statex', postalz='$postalx', countryz='$countryx', telephonez='$telephonex', emailz='$emailx', companyz='$companyx' WHERE codez = '".$SomeVar."'"); $result = mysql_query($query); $sentOk = "Edit Successful!"; echo "sentOk=" . $sentOk; ?> Quote Link to comment https://forums.phpfreaks.com/topic/212855-edit-mysql/ Share on other sites More sharing options...
trq Posted September 8, 2010 Share Posted September 8, 2010 Your missing a space after SET. Quote Link to comment https://forums.phpfreaks.com/topic/212855-edit-mysql/#findComment-1108638 Share on other sites More sharing options...
trq Posted September 8, 2010 Share Posted September 8, 2010 Be aware that your also echoing a 'success' message without actually doing any checking for success. Quote Link to comment https://forums.phpfreaks.com/topic/212855-edit-mysql/#findComment-1108639 Share on other sites More sharing options...
RON_ron Posted September 8, 2010 Author Share Posted September 8, 2010 That's it. - Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/212855-edit-mysql/#findComment-1108917 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.