Jump to content

if isset problem


bravo14

Recommended Posts

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]

Link to comment
https://forums.phpfreaks.com/topic/213132-if-isset-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.