abitshort Posted November 15, 2009 Share Posted November 15, 2009 I try to get my database update but it doesn't seems to work, doesn't give any error messages either. After I submit the clues fields just got empty, and the live feild stays the same. I think it have to do with the serialize array that I used. Sorry, I'm new to this stuff. Please help me fix this query <? } if ($_POST["submit"]) { $word = $_POST["word"]; $live = $_POST["live"]; $id = $_POST["id"]; $clues = $_POST[serialize(array($c1, $c2, $c3, $c4, $c5))]; $result = mysql_query("UPDATE taboo SET word='$word', $c1='$clues', $c2='$clues' $c3='$clues' $c4='$clues' $c5='$clues' live='$live' WHERE id=$id")or die(mysql_error()); } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/181619-update-the-database-query/ Share on other sites More sharing options...
isedeasy Posted November 15, 2009 Share Posted November 15, 2009 not sure if this will fix it but shouldn't id=$id read id='$id' Quote Link to comment https://forums.phpfreaks.com/topic/181619-update-the-database-query/#findComment-958014 Share on other sites More sharing options...
Philip Posted November 15, 2009 Share Posted November 15, 2009 Yeah. I think you're right. It has something to do with the serialization.... What are the values of $c1-5, is the POST field actually named the same value as the serialization? Quote Link to comment https://forums.phpfreaks.com/topic/181619-update-the-database-query/#findComment-958095 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.