Quoting Tris <[EMAIL PROTECTED]>:
sadly not.. but you're trying, and that rocks!
The id, is the ID field in the DB of the product item, which in this
case, is the voucher..
It did dawn on me that I've got Global varaibles ON..
And that I've got a session name getDelCost elsewhere, which may be
intefering, so when I get home, I'm gonna drastically change my naming
convention..
A suggestion if I may?
PHP by default declares globals as $PREFIX_VARNAME. I try to stick to
this when I code, so in your situation, I would probably have a
$CART_GETDELCOST and a $getDelCost.
If I'm being really picky, I'll go as far as the following:
if delivery cost is a string:
$strGetDelCost
if its an integer:
$intGetDelCost
if it's global:
$CART_GETDELCOST
that way the code almost comments itself, I know instantly which of my
variables are strings, integers, globals, booleans etc.
Another thing I've got into the habit of is creating my own library so
that I can put together a site in about ten minutes. The tree looks
like this:
/
|
|-/includes/
| |
| |- dbConn.lib.php (contains class and functions for database
connectivity)
| |
| |- format.lib.php (contains the formatting for the site)
| |
| |- site.lib.php (acts as a wrapper for the various libraries)
| |
| |- config.inc.php (contains all global variables for the site)
|
|
|- /images/
|
|- index.php
That way, I only have to include "site.lib.php" and all the variables
etc are automatically setup. If I want to change the entire layout
wihtout touching the content, I just update format.lib.php
Just a few ideas for you! :)
Matt
(Example library available on request! )
--
Matthew Macdonald-Wallace
[EMAIL PROTECTED]
"Sed quis custodiet ipsos custodies?"
____ The WDVL Discussion List from WDVL.COM ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
Send Your Posts To: wdvltalk@lists.wdvl.com
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: unknown lmsubst tag argument: ''
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016
Please include the email address which you have been contacted with.