Associate
Good Morning!
I'm having a little problem with a drop down menu. Here is the code:
This form appears at the top of the "gallery" page (Linky Linky). My aim is to have site visitors select a 'gallery' from the drop down menu, click the 'Go!' button and be taken to said gallery.
However, when the 'Go!' button is clicked, the resulting link looks like this:
For the script to work it needs to be:
I should probably mention that I haven't written the part of the script that actually displays the images yet. I can tell that there is something wrong because there needs to be "page=gallery" somewhere in the link to comply with the security measures I have set on index.php.
Any ideas on how I can get the link to appear correctly, maybe some parsing involved?
Cheers.
I'm having a little problem with a drop down menu. Here is the code:
Code:
<form action="<?php $self ?>" method="get">
<table align="center">
<tr>
<td>Select Gallery: <select name="Galleries">
<?php do { ?><option value="page=gallery&dir=<?php echo $Galleries_Row['directory']; ?>"><?php echo $Galleries_Row['title']; ?></option><? } while ($Galleries_Row = mysql_fetch_assoc($Galleries)); ?>
</select><input type="submit" value="Go!"></td>
</tr>
</table>
</form>
However, when the 'Go!' button is clicked, the resulting link looks like this:
Code:
http://jasonsummers.co.uk/index.php?Galleries=page%3Dgallery%26dir%3D%2Fimages%2Ffriends
Code:
http://jasonsummers.co.uk/index.php?page=gallery&dir=/images/friends
I should probably mention that I haven't written the part of the script that actually displays the images yet. I can tell that there is something wrong because there needs to be "page=gallery" somewhere in the link to comply with the security measures I have set on index.php.
Any ideas on how I can get the link to appear correctly, maybe some parsing involved?
Cheers.