| | |
Something easy to fix?
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Aug 2008
Posts: 24
Reputation:
Solved Threads: 1
I can make the INPUT for QTY pass the value to my hidden field of quantity, what i want to try is something really easy.
I want the user to choose the quantity and pass the variable to my form, please help
Thank you for your time amigos
OCB
I want the user to choose the quantity and pass the variable to my form, please help
Thank you for your time amigos
OCB
php Syntax (Toggle Plain Text)
<form method="post" action="https://pay.com/live/shop/add_to_cart"> Qty: <input name="cantidad" type="text" id="cantidad" size="2" /> <?php $cantidad = $_POST["cantidad"]; ?> <br /> <input type="hidden" name="store" value="project321"> <input type="hidden" name="need_to_ship" value="no"> <input type="hidden" name="need_to_tax" value="no"> <input type="hidden" name="identifier" value="<?php echo $row_rsMiscDetail['part_number']; ?>"> <input type="hidden" name="description" value="<?php echo $row_rsMiscDetail['product_name']; ?> <?php echo $row_rsMiscDetail['product_model']; ?>"> <input type="hidden" name="quantity" value="<?php echo $cantidad = $_POST["cantidad"]; ?>"> <input type="hidden" name="price" value="<?php echo $row_rsMiscDetail['price']; ?>"> <input type="hidden" name="fingerprint" value="820a4a580170e88df93d26beb7a2eafa"> <table border="0" cellpadding="0" cellspacing="2"> <tr> <td align="center" valign="bottom"><label> <input name="submit" type="image" id="submit" onclick="this.form.submit()" src="images/buy_button.png" alt="add_to_cart" /> </label></td> </tr> </table> </form>
•
•
•
•
I want the user to choose the quantity and pass the variable to my form, please help
html Syntax (Toggle Plain Text)
<form method="post" action="https://pay.com/live/shop/add_to_cart"> Qty: <input name="cantidad" type="text" id="cantidad" size="2" /> <br /> <input type="hidden" name="store" value="project321"> <input type="hidden" name="need_to_ship" value="no"> <input type="hidden" name="need_to_tax" value="no"> <input type="hidden" name="identifier" value="<?php echo $row_rsMiscDetail['part_number']; ?> "> <input type="hidden" name="description" value="<?php echo $row_rsMiscDetail['product_name']; ?> <?php echo $row_rsMiscDetail['product_model']; ?>"> <input type="hidden" name="quantity" value="<?php echo $_POST["cantidad"]; ?> "> <input type="hidden" name="price" value="<?php echo $row_rsMiscDetail['price']; ?>"> <input type="hidden" name="fingerprint" value="820a4a580170e88df93d26beb7a2eafa"> <table border="0" cellpadding="0" cellspacing="2"> <tr> <td align="center" valign="bottom"><label> <input name="submit" type="image" id="submit" onclick="this.form.submit()" src="images/buy_button.png" alt="add_to_cart" /> </label></td> </tr> </table> </form>
Also the form that submits the quantity to the above form would look something like below: (change the string/text page_name to the name of the php page which contains the above code.
html Syntax (Toggle Plain Text)
<form method='post' action='page_name.php' style='margin:0; padding:0;'> Quantity number: <input type='text' value='1' name='cantidad' size='5' maxlength='4'> <input type='submit' value='submit'> </form>
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
![]() |
Similar Threads
- major problem desktop icons disappeared no easy fix (Windows NT / 2000 / XP)
- please tell me this is easy to fix! (Windows 95 / 98 / Me)
- DFI Motherboard ethernet adapter issue. Easy fix? (Motherboards, CPUs and RAM)
- This could be an easy fix for bridge.dll? (Viruses, Spyware and other Nasties)
- Fix Movie Interference in AVI Files (Windows tips 'n' tweaks)
Other Threads in the PHP Forum
- Previous Thread: javascript:window.open not working for internet explorer
- Next Thread: add recepient to php form
| Thread Tools | Search this Thread |
apache api array arrays beginner binary broken cache cakephp checkbox class cms code confirm cron curl customizableitems database date display dynamic echo email error external file files folder form forms forum freelancing function functions google header headmethod howtowriteathesis href htaccess html iframe image include insert ip javascript joomla limit link login mail malfunction menu method mlm mod_rewrite multiple mysql neutrality oop pageing paypal pdf php phpmysql play problem query question radio random recursion regex remote root script search select server sessions sms soap source space sql support! syntax system table tutorial update upload url validator variable video web xml youtube






