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; ?> 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. 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. 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! Link to comment https://forums.phpfreaks.com/topic/212855-edit-mysql/#findComment-1108917 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.