User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 401,561 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,451 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 2789 | Replies: 2
Reply
Join Date: Jun 2004
Posts: 2
Reputation: zygomatic is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
zygomatic zygomatic is offline Offline
Newbie Poster

Problem Unsetting Variables?

  #1  
Jun 29th, 2004
I'm trying to make a manager that works with MySQL to create, delete and update classes in a database. I'm having trouble with the update/modify portion. I have a login page in HTML that has the action of manager.php, which shows a list of all the classes in the database and allows the user to check some checkboxes to modify or delete the selected classes. When I check some classes and try to modify them, the information is passed to the $_SESSION superglobal. When I run the update commands on the modify page, I use unset() to unset the class variables in $_SESSION. But when I go back and try to select other classes, I get both the ones I just checked and the ones that I chose previously. I'm pretty new to PHP, please help. I have the code posted here in .txt format:

http://www.geocities.com/zygo8/files.html
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2004
Posts: 173
Reputation: BinaryMayhem is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 9
BinaryMayhem BinaryMayhem is offline Offline
Unverified User

Re: Problem Unsetting Variables?

  #2  
Jun 29th, 2004
its a bug in php.

unset( $_SESSION['variable'] ) fails to unset the given session variable
with registered_globals turned 'on' in ini file.

http://bugs.php.net/bug.php?id=19586

btw, you know phpmyadmin does exactly what your trying to make.
http://www.phpmyadmin.net/home_page/
Reply With Quote  
Join Date: Jun 2004
Posts: 2
Reputation: zygomatic is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
zygomatic zygomatic is offline Offline
Newbie Poster

Re: Problem Unsetting Variables?

  #3  
Jun 29th, 2004
Yeah, I know PHPMyAdmin does the same thing (and a little more), but I'm working on it for my boss, who isn't too computer savvy, so it has to be fool-proof Thanks for the post, it's been driving me nuts! :mad:
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 3:49 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC