Jump to content

Open page with certain values displayed


Ell20

Recommended Posts

Hi,

 

I have a page called fixtures.php which simply displays the fixtures for a club, each fixture also has a button which takes you to a page called teamselection.php.

 

However at the moment once the button has been pressed the user then has to select the fixture from the drop down box to view the team selection, whereas I would ideally like it so that when the button is pressed it goes to the teamselection.php with the team selection for the specific fixture to be displayed.

 

I guess I have to do like &mode=selection on fixture_id or something simular but I cant put my finger on how to do it?

 

Appreciate any help

Link to comment
Share on other sites

what your asking is a simple use of the $_GET[]

 

what you need is that each hyper link from say

 

example.com/fixtures.php

 

to link to

 

example.com/teamselection.php

 

and remember but remember what you chose from the first

 

 

what you need to do is simple when you say create a hyperlink for say lamp

 

example.com/teamselection.php?f=lamp

 

this creates a get variable with the value of lamp assigned to f

 

to get this from the fixtures page you would simply do this

 

$fixture = $_GET['f'];

 

the4n it's just a matter of if and else to determine the selection such as

 

if($fixture == "lamp")

{

//execute this code

}

elseif($fixture == "tv");

{

do this code

}

else

{

//do this

}

 

 

 

Link to comment
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.