Jump to content

Recommended Posts

all i want is to add a  value of inv_quantity(one of the field in my table)

 

the value added to the inv_quantity comes from php a post = $_POST['inv_quantity']

 

ex add 2 to inv_quantity

 

inv_quantity

      2

RESULT:

 

inv_quantity

      4

 

i already tested it in sql query and it works but when i transfer it to php it doesnt work

 

code in phpmyadmin sql query

'UPDATE inventory SET inv_qcreated = inv_qcreated + 2 WHERE inv_num = 27'

 

code:

 

$sql='UPDATE inventory SET inv_qcreated = inv_qcreated + $_POST[inv_qcreated] WHERE inv_num = '$_POST['inv_num'];

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.