Demonic Posted February 11, 2007 Share Posted February 11, 2007 Alright say I have this poll right, and I make it so it saves who votes. so when a user votes. I want to update the array $users = mysql_query("SELECT username FROM poll WHERE battle_id='1'"); $users = mysql_fetch_array($users); $userz = unseralize($users[username]); then would me using array_push() work im not sure atm. $userz = array_push($userz,$logged[username]); $newuser = seralize($userz); then update the sql $update = mysql_query("UPDATE poll SET username='$newuser' WHERE battle_id='1' "); $logged[username] for example would be the loggedin username would this work out i've never made a poll script yet but im going to give it a go I just want to know If im heading in the correct direction with this. Link to comment https://forums.phpfreaks.com/topic/38041-seralize-help-just-a-quick-question/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.