Jump to content

Problem stringing together links in GET links in URL


pianoman993

Recommended Posts

Hi, I have a pretty nooby question so here it is. I have a site that functions in three parts, (it is comprised of 3 columns). THe first column is for logging in and navigation (if successfully logged in) the second is for content, the third for forum information. I would like to control all my scripts using the main index.php page and to do that I am currently using a switch statement to identify a page variable sent to the URL. for example: mysite.com?index.php?p="signup"

This is identified through the switch statements and changes the second column's information accordingly. Here's the problem:

How do I make 2 links so that for instance if I had a user click a button that would change information in the first column like column1="nav", would then still have the p="signup" still be in its place?

 

If you weren't able to understand what I just said, (which is understandable) I'll restate it differently.

 

1. A user enters the site, enters the loggin information and successfully enters the site.

2. They click on the forum link, and the forum column changes.

3. THey then click on the add text button and the 2nd column changes but the 3rd column still stays the same.

 

How do I do this?

Link to comment
Share on other sites

You can use & to add more variables.  For example:

 

www.yoursite.com/index.php?p=signup&column2=var&column3=var and so on.  Then just edit your switch statement to handle it properly.  And make sure if the pages require people to login, that each page checks to make sure the session is set so they cant just edit the url to get where they want.

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.