Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.