I would have put select boxes in the title but there has been a lot of coverage on this already. yet! I'm still lost1
First: (Yes, I know I should have used checkboxes for this.)
Next some code:
<?php
if (isset($submitted))
{
$number = count($mode);
for ($i=0; $i < $number; $i++)
{
echo $mode[$i];
if ($i != $number - 1)
{
echo ", ";
};
};
};
echo "
<form method=post action=gatts.php>
<select name=\"mode[]\" size='3' multiple>
<option value='University Vehicle'>University Vehicle
<option value='Personal Vehicle'>Personal Vehicle
<option value='Airline'>Airline
</select><BR><BR>
<input type=hidden name=submitted value=yes>
<input type=submit value=Submit>
</form>
";
?>
Ok, standard select box right for a page called gatts.php.
Now the gatts page.
See it in action here!!!!
{
$number = count($mode);
for ($i=0; $i < $number; $i++)
{
echo $mode[$i];
if ($i != $number - 1)
{
echo ", ";
};
};
};
?>
All is good. Go crazy using this code. It works. Here's my problem:
I want to take the variable $mode[$i] and cram the results into a field in a database.
I can't get past the braces thing. I can do things in the braces, but I can't pass an sql statement in there and get all the data to go in the single field. Please help!! (I'm going on day 3)