phpretard Posted January 26, 2008 Share Posted January 26, 2008 I serialized input from a form, inserted the serialized data, unserialized the data and echoed it. It echoed an array and I dont know how to seperate the information so I can use it. I need to output the "add_player.php" part of this like so -<a href='http://www.website.com/add_player.php'> array(4) { [0]=> string(14) "add_player.php" [1]=> string( "rand.php" [2]=> string(10) "roster.php" [3]=> string( "menu.php" } Array Can someone help seperate this stuff please? Quote Link to comment Share on other sites More sharing options...
phpretard Posted January 26, 2008 Author Share Posted January 26, 2008 Often times I do not supply the info needed to help you help me. Is this enough info? Quote Link to comment Share on other sites More sharing options...
phpretard Posted January 26, 2008 Author Share Posted January 26, 2008 After messing around I echo -- string(14) "add_player.php" -- Can someone help get rid of the - string(14) - and both quotes Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted January 26, 2008 Share Posted January 26, 2008 Please tell us how you searialized the information and unserialized it. Posting some of your code would help. Ken Quote Link to comment Share on other sites More sharing options...
phpretard Posted January 26, 2008 Author Share Posted January 26, 2008 This id how I serialized it: $url=serialize($_POST['url']); I unserialized like this while($row = mysql_fetch_array($result)) { $url=unserialize($row['url']); var_dump($url[0]); } Quote Link to comment Share on other sites More sharing options...
phpretard Posted January 26, 2008 Author Share Posted January 26, 2008 Here is the form imput <input type='checkbox' id=url name='url[]' value='$url' /> <input type=text id=input name=name value='$name' readonly><br> Quote Link to comment Share on other sites More sharing options...
phpretard Posted January 26, 2008 Author Share Posted January 26, 2008 Do you need more code than this? Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted January 26, 2008 Share Posted January 26, 2008 Please show all the code for the form. Before you do the serialize, do <?php echo '<pre>' . print_r($_POST['url'],true) . '</pre>'; ?> Ken Quote Link to comment 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.