[Solved] post array to page, results in 1 array item
Posted: Wed Dec 13, 2006 9:29 am
OK, so i have an array that has 7 items. I am trying to pass this array using POST. I do a size of before and it shows 7 items. After I evalute the variable recieved from the POST it shows up as 1 array item and nothing else.
here size of is 7 items.
Here sizeof is 1:
here size of is 7 items.
Code: Select all
echo '<form action="patchnotice.php" method="POST" name="send_mail">';
echo '<table bordercolor=#ce6300 border=1 cellspacing=0 cellpadding=3 leftmargin=0 topmargin=0 valign=top width=350 frame=border rules=none>';
echo '<tr height=20 class="titlerownew"><td class="whitebold" colspan="2">';
echo '<b>    Send Patch Notices</b></td></tr>';
echo '<tr class=oddrow><td colspan=2>';
echo "<input type=hidden name=type value=Test>";
echo "<input type=hidden name=released2 value=$released2>";
echo "<input type=hidden name=deployed2 value=$deployed2>";
[b]echo "<input type=hidden name=links value=$links>";[/b]
echo "<input type=hidden name=send_mail value=send>";
echo '<input type=submit class=submit name=submit value="Send Emails"></td></tr></form></table><br>';Code: Select all
if($HTTP_POST_VARS)
{
$status = $_POST['send_mail'];
$type = $_POST['type'];
$released = $_POST['released2'];
$deployed = $_POST['deployed2'];
[b]$links = $_POST['links'];[/b]
echo "Size of urls: ".sizeof($links);
echo print_r($links);
}