Forum Moderators: coopster
Here's the URL..
index.php?interfaces%5B%5D=IEEE+1394a&interfaces%5B%5D=IEEE+1394a
if (is_array($interfaces))
{
for ($i = 0; $i < count($interfaces); $i++)
{
$interfacestring .= "$interfaces[$i]";
if ($i!= (count($interfaces)-1))
$interfacestring .= ", ";
}
}
print $interfacestring;
$interfacestring is supposed to be "IEEE 1394a, IEEE1394b"
Is there anything I did wrong?
I am out of ideas.. pls help...
I appreciate your help
<select size="4" name="interfaces[]" multiple>
<option value="IEEE 1394a">IEEE 1394a</option>
<option value="IEEE 1394b">IEEE 1394b</option>
</select>
After I hit submit, I saw the URL being morphed into:
index.php?interfaces%5B%5D=IEEE+1394a&interfaces%5B%5D=IEEE+1394a
Is there anything wrong with this URL?
Thanks.
The thing that is wrong is that this form
<select size="4" name="interfaces[]" multiple>
<option value="IEEE 1394a">IEEE 1394a</option>
<option value="IEEE 1394b">IEEE 1394b</option>
</select>
register_globals configuration option is on? It is often set off because it can be a major security hole. Use phpinfo() to find out.
If it is off then you should access the interfaces variable like this..
$_GET['interfaces']
error_reporting = line in your php.ini file. It should be set to
error_reporting = E_ALL
But the O'Reilly 'animal' books are always a good bet, and their PHP Devcentre ( [onlamp.com...] )has some good articles to get you started.