bravo14 Posted September 11, 2010 Share Posted September 11, 2010 Hi guys I am trying to create a page where if a selection has not been made then a jump menu is displayed listing all of the fixtures for a season, if a selection has been made then at present I want it to show Enter match info, however when a match is selectd it goes to a yahoo search page, as if the page cannot be found, the code I have used is below, any ideas what I have done wrong? The page can be seen at www.yardleyheroes.co.uk/admin/edit_result.php <h1>Submit Results</h1> <?php if (isset ($_GET['match_id'])) { echo('Enter match info'); } else { $con = mysql_connect('localhost', 'user', 'password', true); if(!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db('dbname', $con); echo('<form name="form" id="form">'); echo('<select name="jumpMenu" id="jumpMenu" onChange="MM_jumpMenu(\'parent\',this,0)">'); $fixtures=mysql_query('SELECT * FROM `fixtures` where current=1 ORDER BY `match_date`'); if(mysql_num_rows($fixtures)==0) echo('<option>there is no data in table..</option>'); else echo('<option selected="selected">Please select the match</option>'); { while($matchrow=mysql_fetch_assoc($fixtures)) { echo ('<option value="edit.php?match_id='.$matchrow['match_id'].'">'.date("d-M-Y", strtotime($matchrow['match_date'])).'|'.$matchrow['Opposition']."</option>"); } } echo('</select>'); echo('</form>'); } ?> [/cod] Quote Link to comment https://forums.phpfreaks.com/topic/213132-if-isset-problem/ Share on other sites More sharing options...
wildteen88 Posted September 11, 2010 Share Posted September 11, 2010 It is because your menu is redirecting you to edit.php?match_id=x rather than edit_match.php?match_id=x Quote Link to comment https://forums.phpfreaks.com/topic/213132-if-isset-problem/#findComment-1109929 Share on other sites More sharing options...
stuartriches Posted September 11, 2010 Share Posted September 11, 2010 As mentioned, the page is failing with a 404 error as the URL called is http://www.yardleyheroes.co.uk/admin/edit.php?match_id=50 it should be http://www.yardleyheroes.co.uk/admin/edit_result.php?match_id=50 Quote Link to comment https://forums.phpfreaks.com/topic/213132-if-isset-problem/#findComment-1109931 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.