php self issues
Posted: Sun Sep 17, 2006 4:54 pm
feyd | Please use
Any ideas??
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I'm trying to make a dynamically generated jump menu, that when an item is selected the form reloads the current page and then displays the info from the data base based on the selection. Whenever I submit the form, I get an error that the page cannot be found because it's looking for "%3C?page=aamco", where "%3C" should be list.php....Code: Select all
$currentPage = $_SERVER['PHP_SELF'];
mysql_data_seek ($result, 0);
echo '<form name="franchises" action="<?php echo $currentPage; ?>">';
echo '<select name="page" id="jumper">';
echo '<option selected>Select a Franchise</option>';
echo '<option></option>';
while ($row = mysql_fetch_assoc($result)) {
$page = $row["index"];
$name = $row["name"];
echo '<option value="' . $page . '">' . $name . '</option>';
}
echo '</select>';
echo ' <a href="javascript: submitform()">GO</a>';
echo '</form>';feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]