Reply
Clearing/changing session variable
Old 04-16-2007, 05:00 AM [solved]
Average Talker

Posts: 23
This problem was solved

Last edited by mattgoldman : 04-17-2007 at 05:27 PM.
mattgoldman is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 04-16-2007, 05:42 AM Re: Clearing/changing session variable
mtishetsky's Avatar
Super Spam Talker

Posts: 946
Location: Volendam, Netherlands
Dammit man, seem like you got absolutely no idea how php operates. What are you trying to do with this code?
__________________
Free Mobile Phone Themes

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 04-16-2007, 10:20 PM Re: Clearing/changing session variable
Average Talker

Posts: 23
The above is a summary of my code, not an exact snippet. I have a BASIC understanding but I lack serious experience so I am stumped on how to do this.

I have a mysqltable with all of my products and one of the columns is type.

I have links on the left of each page which are to take you to different product categories i.e.:

Watercolors
Silk Paintings
Oils
Colored Pencils

I have a page titled itemlistings.php which is what all of these pages link to. On this page is a mysql query which tells it which type of products to display on that page(watercolors, etc.) I am wondering how to pass the information that the user wants to see watercolors to the itemlistings.php page. I'm sure sessions aren't the best way to do this, or that it isn't even possible. However, can you please inform me of how to go about passing this information between pages just by clicking a link? Thanks so much for any help!
mattgoldman is offline
Reply With Quote
View Public Profile
 
Old 04-16-2007, 10:27 PM Re: Clearing/changing session variable
Super Talker

Posts: 123
Name: Nick Mallare
HTML Code:
<a href="www.yoursite.com/yourpage.php?type=1>Watercolors</a>
Use type to access the 'id' column in your database. Does that make sense?

Nick
nmallare is offline
Reply With Quote
View Public Profile Visit nmallare's homepage!
 
Old 04-17-2007, 01:30 AM Re: Clearing/changing session variable
Average Talker

Posts: 23
Somewhat...type is a column in my table and id is another column. Why is type set equal to 1? The values in the type column are watercolors, oils, colored pencils etc. shouldn't it be http://www.--------.com/itemlisting....pe=watercolors

Then do I just use $_GET on the next page to get it?
PHP Code:
$type $_GET['type']; 
Thanks!
mattgoldman is offline
Reply With Quote
View Public Profile
 
Old 04-17-2007, 01:54 AM Re: Clearing/changing session variable
Average Talker

Posts: 23
nevermind i got it, problem solved thanks!
mattgoldman is offline
Reply With Quote
View Public Profile
 
Old 04-17-2007, 05:23 PM Re: Clearing/changing session variable
solomongaby's Avatar
Webmaster Talker

Latest Blog Post:
How Do You Find Music Online ?
Posts: 522
Name: Gabe Solomon
Location: Romania
can i make a small sugestion mattgoldman
could you modify the first post in this thread ... and put [solved] in the title field.

THANKS A LOT
__________________
If you like my posts ... TK is appreciated:)
Web Directory | Blog
solomongaby is offline
Reply With Quote
View Public Profile Visit solomongaby's homepage!
 
Reply     « Reply to Clearing/changing session variable
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.25502 seconds with 13 queries