[PHP] Shopping with variables

2001-05-16 Thread Tarrant Costelloe
I am currently just messing around with a basic shopping cart, but have stumbled onto a problem. Bascially there is three input boxes all name DVD, VIDEO, CD and these are also variables. Once the user has said they wanted 15 cd's for example, the form then takes them onto the shop.php. Which

[PHP] R: [PHP] Shopping with variables

2001-05-16 Thread Gabriele Biondo
?php print( You have asked to purchase $dvd $video $cd 's - Thank you) ? This prints out, You have bought 16 - Thank you for example, see the problem? How do I get it to print the variable name not just it's value? Try with replacing your print with the following one: print( You have

Re: [PHP] Shopping with variables

2001-05-16 Thread Vitali Falileev
Hello Tarrant, Wednesday, May 16, 2001, 12:12:43 PM, you wrote: TC ?php print( You have asked to purchase $dvd $video $cd 's - Thank you) ? TC This prints out, You have bought 16 - Thank you for example, see the TC problem? How do I get it to print the variable name not just it's value? Use

[PHP] R: [PHP] Shopping with variables

2001-05-16 Thread Gabriele Biondo
Thanks Gabriele :) Whilst waiting for your e-mail I figured out another way...Thought I would show you it just in case you ever find the need to use this alternative: ?php print( You have asked to purchase . ($dvd ? DVD: $dvd :''). ($video ? Video: $video :''). ($cd

RE: [PHP] Shopping with variables

2001-05-16 Thread Ralph Guzman
Costelloe [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 2:13 AM To: '[EMAIL PROTECTED]' Subject: [PHP] Shopping with variables I am currently just messing around with a basic shopping cart, but have stumbled onto a problem. Bascially there is three input boxes all name DVD, VIDEO, CD

RE: [PHP] Shopping with variables

2001-05-16 Thread John Monfort
since it will require that you continue adding if(isset($variable)) statements, if you ever decide to add more item types. -Original Message- From: Tarrant Costelloe [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 2:13 AM To: '[EMAIL PROTECTED]' Subject: [PHP] Shopping

RE: [PHP] Shopping with variables

2001-05-16 Thread scott [gts]
:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 9:02 AM To: Ralph Guzman Cc: Tarrant Costelloe; [EMAIL PROTECTED] Subject: RE: [PHP] Shopping with variables That will work, assuming the user is not allowed to purchase multiple items... -John On Wed, 16 May 2001, Ralph Guzman