Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Wrox Announcements and Feedback > Wrox Book Feedback
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Wrox Book Feedback A forum to submit feedback on Wrox books if other forums on P2P have been unable to address your book-specific needs. IF YOU ARE LOOKING FOR CODE DO NOT ASK "Where can I find the code for this book?" That question is answered here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Wrox Book Feedback section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 29th, 2003, 04:39 PM
Registered User
 
Join Date: Jun 2003
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Beginning PHP4 Chapter 8

Well the script for the sessions (pagecount) script works fine. Ive attempted to adapt it for a shopping cart, whihc works, you can add items to your basket, and icrements the GLOBAL that are registered for the session. The problem Im having is deleteing or rather re assigning values to the .$GLOBAL["item${itemid}"]. where $itemid is the global variable i wish to reset to "".
It works fine if i do the last item i added :D, but if you take anything else and deltete it makes all the variables after it 0 aswell, and only reduces the itemcount by 1 :(
this is what i tried to use:

<?
if($delitem=1) {
$GLOBALS["item${itemid}"]="";
$GLOBALS["itemnumber"]=($GLOBALS["itemnumber"]-1);
}
?>

where item id is the item i want to delete.

http://www.sabdesign.co.uk/gls/index.htm

will take you into the shop (items are only in shin guards and gloves)
Any tips would be really helpful? Ive even tried moving it onto a seperate page, with no success :(
Reply With Quote
  #2 (permalink)  
Old July 12th, 2003, 12:12 AM
Registered User
 
Join Date: May 2003
Location: Delhi, Delhi, India.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,
pls post ur query on the "Biginning PHP4" forum under the "Books" category.

Devinder Yadav
VC++\VBA\C++
Wiley Support Team
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Beginning PHP4 chapter 8 jaapzwaan BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 January 26th, 2004 03:50 PM
Beginning PHP4 chapter 8 jaapzwaan BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 January 26th, 2004 03:48 PM
Beginning PHP4 chapter 8 jaapzwaan BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 January 22nd, 2004 08:56 AM
Beginning PHP4 keithu1 Wrox Book Feedback 1 October 1st, 2003 07:05 AM
Beginning php4 wjt11 All Other Wrox Books 0 June 12th, 2003 11:48 AM



All times are GMT -4. The time now is 07:17 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.