WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-11-2004, 05:13 AM
WebProWorld Member
 

Join Date: Nov 2003
Location: Bedford, Va.
Posts: 72
wmabear54 RepRank 0
Default HELP! with sessions and passing variables

Hi

I am building a database using four tables. The first is for sites, the second is for categories, the third is for subcategories and the fourth is for products.

I will be using id numbers to link the tables together with each other primary, master_id, cat_id and subcat_id. It is with the id's that I will seperate all the parts to keep them organized using where clauses like master_id=?, cat_id=? and subcat_id=?
Here is a sample of the tables
and here is a sample of the forms that I will be using.
Feel free to add to it and get a feel for it.

All is working good to add sites, add categories and when I get to subcategories the variables are not passing correctly and the cat_id field is empty.

I am using session_start to keep it together so the id's will be added as I go. What could it be that the variables are not passing.

Thanks in advance
Mike
Reply With Quote
  #2 (permalink)  
Old 10-11-2004, 05:55 AM
WebProWorld Pro
 

Join Date: May 2004
Location: United Kingdom
Posts: 176
php~pro RepRank 0
Default

Without seeing code its like a pin the tail on the donkey game. Dependant on the information you are trying to pass try echoing the sessions with the info you are trying to input to ensure they have value. Also you say you are using session_start. Is this at the top of your scripts. It must be output as session_start();
Check also your column lengths in tables to ensure thay are the correct size, but the echo should reveal all. If the session is empty just go through code to find out why.
Reply With Quote
  #3 (permalink)  
Old 10-13-2004, 02:32 AM
WebProWorld Member
 

Join Date: Nov 2003
Location: Bedford, Va.
Posts: 72
wmabear54 RepRank 0
Default

Thanks php~pro I took a step back and slowly went through the code copying steps that I knew worked and it finally worked. There are still bugs in it but that is for another day. Known bugs are in the where clauses categories are seperate by site, but subcategories aren't seperated by category yet but I am sure that shouldn't be too hard to figure out. Also I need to auto fill a path to image and I need a path to auto load in an upload script for images.

But thanks check it out if you have a chance
Mike
Reply With Quote
  #4 (permalink)  
Old 10-13-2004, 02:39 AM
WebProWorld Member
 

Join Date: Nov 2003
Location: Bedford, Va.
Posts: 72
wmabear54 RepRank 0
Default

What happen to our edit button. Need to fix the delete link also.
Mike
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , , ,



Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0