Jump to content

Passing Variables Between Pages


vendlus

Recommended Posts

What method do you all use to pass your variables between pages?? I've been using query strings like "additem.php?gameid=2", but I know google doesn't like dynamic naming for it's indexing. What do you use to either stay with a static address, or what do you do to make it look like a static address to google at least. :dance:

 

- Vendlus

Link to comment
Share on other sites

Wishy-washy answer: It depends on the kind of site you are designing.

 

If you are trying for a standard commercial site, I would try for using sessions to pass variables. They are invisible to the user and are pretty cool all around. [Disclaimer: I don't have any commercial sites].

 

If you are going for a quick and dirty informational/personal site where search engine ranking does not directly relate to your income, the easy way with query strings is, well, easy. :dance:

 

And if you are a tidy webmaster, the pseudo-static page approach with mod_rewrite is attractive, but a bit time-consuming to set up.

 

I have tried all three and use all three approaches for different areas of my site.

 

...dave

Link to comment
Share on other sites

Do a search on

force type apache
and you'll find plenty of info.

 

The one bit that I would add to Wilexa's post is that if you are going to use sessions to pass variables, then you should have a testing script that makes sure the user can accept cookies (or sessions) and have a back up plan if they can't.

 

Some ultra high security sessions will disable the sessions feature of php.

Link to comment
Share on other sites

Do a search on
force type apache
and you'll find plenty of info.

 

The one bit that I would add to Wilexa's post is that if you are going to use sessions to pass variables, then you should have a testing script that makes sure the user can accept cookies (or sessions) and have a back up plan if they can't.

 

Some ultra high security sessions will disable the sessions feature of php.

oh yeah... I knew there was a reason my brain was rejecting something about sessions. :)

 

I'll certainly try that search out.

 

Thanks for your help guys.

Link to comment
Share on other sites

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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