Hello All,
It's been a few days but after a half a day going through books and websites I still can't get this to work. I haven't used a lot of arrays in the past and dealt with even less indexed arrays. I'm trying to post a form and have the data added to an array. The array is created on another page and stored in a session. This is working fine as I add data to it on the other page and I can see it when I echo it on the new page. Here's what I'm trying to do:
<?php
$userp = $_POST['userp'];
$formgo = $_POST['formgo'];
if ($formgo == "yes"){
$showvarc = $_SESSION['showvarc'];
for ($i = 0; $i < count($userp); ++$i) {
array_push ($showvarc,$userp[$i]);
}
$_SESSION['showvarc'] = $showvarc;
}
?>
<form name="myform" method="post" action="http://www.fassttech.com/otc/teamsearch.php" enctype="multipart/form-data">
Value 1: <input type="checkbox" name="userp[]" value="1" /><br />
Value 1: <input type="checkbox" name="userp[]" value="1" /><br />
Value 1: <input type="checkbox" name="userp[]" value="1" /><br />
Value 1: <input type="checkbox" name="userp[]" value="1" /><br />
<input type="hidden" name="formgo" value="yes" /><input type="submit" name="submit" /></form>
Hopefully I'm not completely off the reservation. Thanks in advance.