[PHP-DB] Forms and mysql

2002-04-04 Thread Jennifer Downey

Hi all,

I know I've asked this before and wouldn't be asking again if I had the
email that you people replied back with. Windows took a you know what on me
and I had to format the hard drive.

Anyway here is what I have.

This is items.php:
form action='buyitem.php' method='post'
?
$query = SELECT id, image, name, quantity, price FROM
{$config[prefix]}_items where id = 1;
$ret = mysql_query($query);
$return = mysql_fetch_array($ret);


echo input type='image' src='images/blueholo.gif'br;

echo b$return[name]/bbr;
echo Quantity $return[quantity]br;
echo Cost: $return[price] SCbr;
echo input type='hidden' name='ItemID' value='$id';
?
/form

What I need to accomplish  is that when the submit button is clicked the
quantity is subtracted by 1 and then the item is placed in the users item
list in mysql.

This is what I have in buyitem.php but I cant seem to get it to work.
$return[quantity]=(UPDATE {$config[prefix]}_items set quantity =
quantity - 1 WHERE id = '$ItemID');
$result=mysql_query($db[quantity]);

Would someone be kind enough to help with this?


Thanks for all your help so far.
And thanks in advance.
Jennifer


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Forms and mysql

2002-04-04 Thread Jason Wong

On Friday 05 April 2002 07:55, Jennifer Downey wrote:
 Hi all,

 I know I've asked this before and wouldn't be asking again if I had the
 email that you people replied back with. Windows took a you know what on me
 and I had to format the hard drive.

If this has been answered before then search in the archives:

  http://marc.theaimsgroup.com/?l=php-db


-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
If Love Were Oil, I'd Be About A Quart Low
-- Book title by Lewis Grizzard
*/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Forms and mysql

2002-04-04 Thread Jennifer Downey

If you had read more carefully you'd see that I don't have THE email sent to
me. The replies were never in the archives.
I guess since I am a woman everyone feels they need to send private email
instead of replying with a post.

Jennifer

Jason Wong [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 On Friday 05 April 2002 07:55, Jennifer Downey wrote:
  Hi all,
 
  I know I've asked this before and wouldn't be asking again if I had the
  email that you people replied back with. Windows took a you know what on
me
  and I had to format the hard drive.

 If this has been answered before then search in the archives:

   http://marc.theaimsgroup.com/?l=php-db


 --
 Jason Wong - Gremlins Associates - www.gremlins.com.hk

 /*
 If Love Were Oil, I'd Be About A Quart Low
 -- Book title by Lewis Grizzard
 */


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Forms and mysql

2002-04-04 Thread Marius Ursache



Jennifer Downey a écrit :

 If you had read more carefully you'd see that I don't have THE email sent to
 me. The replies were never in the archives.
 I guess since I am a woman everyone feels they need to send private email
 instead of replying with a post.


maybe...
maybe not... on my NS when i press reply he tries to reply to sender, not to
[EMAIL PROTECTED] ...



 Jennifer

 Jason Wong [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]...
  On Friday 05 April 2002 07:55, Jennifer Downey wrote:
   Hi all,
  
   I know I've asked this before and wouldn't be asking again if I had the
   email that you people replied back with. Windows took a you know what on
 me
   and I had to format the hard drive.
 
  If this has been answered before then search in the archives:
 
http://marc.theaimsgroup.com/?l=php-db
 
 
  --
  Jason Wong - Gremlins Associates - www.gremlins.com.hk
 
  /*
  If Love Were Oil, I'd Be About A Quart Low
  -- Book title by Lewis Grizzard
  */

 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

--
  Marius Ursache (3563 || 3494)

   \|/  \|/
   @'/ ,. \`@
   /_| \__/ |_\
  \__U_/



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Forms and mysql

2002-04-04 Thread Jennifer Downey

In any case the email or replies are not in the archives. I have searched
them and came up empty.

Marius Ursache [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...


 Jennifer Downey a écrit :

  If you had read more carefully you'd see that I don't have THE email
sent to
  me. The replies were never in the archives.
  I guess since I am a woman everyone feels they need to send private
email
  instead of replying with a post.
 

 maybe...
 maybe not... on my NS when i press reply he tries to reply to sender, not
to
 [EMAIL PROTECTED] ...


 
  Jennifer
 
  Jason Wong [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]...
   On Friday 05 April 2002 07:55, Jennifer Downey wrote:
Hi all,
   
I know I've asked this before and wouldn't be asking again if I had
the
email that you people replied back with. Windows took a you know
what on
  me
and I had to format the hard drive.
  
   If this has been answered before then search in the archives:
  
 http://marc.theaimsgroup.com/?l=php-db
  
  
   --
   Jason Wong - Gremlins Associates - www.gremlins.com.hk
  
   /*
   If Love Were Oil, I'd Be About A Quart Low
   -- Book title by Lewis Grizzard
   */
 
  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php

 --
   Marius Ursache (3563 || 3494)

\|/  \|/
@'/ ,. \`@
/_| \__/ |_\
   \__U_/




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Forms and mysql

2002-04-04 Thread Marius Ursache

if you have full access to internet (no proxy or something) try to search on
news servers (alt.php or oher php related newsgroups)

news server: news2.euro.net or other...

Jennifer Downey a écrit :

 In any case the email or replies are not in the archives. I have searched
 them and came up empty.

 Marius Ursache [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 
 
  Jennifer Downey a écrit :
 
   If you had read more carefully you'd see that I don't have THE email
 sent to
   me. The replies were never in the archives.
   I guess since I am a woman everyone feels they need to send private
 email
   instead of replying with a post.
  
 
  maybe...
  maybe not... on my NS when i press reply he tries to reply to sender, not
 to
  [EMAIL PROTECTED] ...
 
 
  
   Jennifer
  
   Jason Wong [EMAIL PROTECTED] wrote in message
   news:[EMAIL PROTECTED]...
On Friday 05 April 2002 07:55, Jennifer Downey wrote:
 Hi all,

 I know I've asked this before and wouldn't be asking again if I had
 the
 email that you people replied back with. Windows took a you know
 what on
   me
 and I had to format the hard drive.
   
If this has been answered before then search in the archives:
   
  http://marc.theaimsgroup.com/?l=php-db
   
   
--
Jason Wong - Gremlins Associates - www.gremlins.com.hk
   
/*
If Love Were Oil, I'd Be About A Quart Low
-- Book title by Lewis Grizzard
*/
  
   ---
   Outgoing mail is certified Virus Free.
   Checked by AVG anti-virus system (http://www.grisoft.com).
   Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002
  
   --
   PHP Database Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
 
  --
Marius Ursache (3563 || 3494)
 
 \|/  \|/
 @'/ ,. \`@
 /_| \__/ |_\
\__U_/
 
 

 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

--
  Marius Ursache (3563 || 3494)

   \|/  \|/
   @'/ ,. \`@
   /_| \__/ |_\
  \__U_/



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Forms and mysql

2002-04-04 Thread Jason Wong

On Friday 05 April 2002 13:42, Jennifer Downey wrote:
 If you had read more carefully you'd see that I don't have THE email sent
 to me. The replies were never in the archives.

Email  posts, many people don't know/don't differentiate/don't care about 
the difference. Obviously you're not one of them :)

 I guess since I am a woman everyone feels they need to send private email
 instead of replying with a post.

How enviable.


 What I need to accomplish  is that when the submit button is clicked the
 quantity is subtracted by 1 and then the item is placed in the users item
 list in mysql.

You don't say what the problem is. I'm assuming your form works correctly.

 This is what I have in buyitem.php but I cant seem to get it to work.
 $return[quantity]=(UPDATE {$config[prefix]}_items set quantity =
 quantity - 1 WHERE id = '$ItemID');

Your use of variable names is most confusing. $return[quantity] was holding 
a quantity when in your form, now it's being assigned a query ??

 $result=mysql_query($db[quantity]);

Is $db[quantity] meant to be $return[quantity] ? Or vice-versa? Or is it 
a typo?

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
Why must you tell me all your secrets when it's hard enough to love
you knowing nothing?
-- Lloyd Cole and the Commotions
*/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php