Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

I need help getting POST data from Shopping Cart form


Dallas1906

Recommended Posts

I was wondering does anyone know how to get data from the form on shopping cart: I know this much that when the form is processed, based on the button that is pressed a particular action is processed. The problem is, I added a text field on my shopping cart page but I cant seem to get the value from $_POST['valuename']. Any help and suggestions are truly welcomed. Thanks in Advance..

--- There are two kinds of people in this world those who are taking care of Business and those who are not, which one are you?

Link to comment
Share on other sites

Without seeing any code, it's hard to comment.

 

Two things.

 

When you included your new field on the shopping cart page, are you sure it was within the <form></form> tags.

 

On which page are you trying to read the POST var from, or are you doing this in application_top.php

Trust me, I'm an Accountant.

Link to comment
Share on other sites

thanks for the response, I added the field inside the form tags and I am trying to read the post data from the Shopping cart page. I have tried using $_POST[] to retrieve the data but it doesnt return any data. This is how I implemented in the Shopping cart Page:

 

 

       <tr>

            <td align="right" class="main"> <b><?php echo "Discount Code:   "?></b><input name="discount"  type="text" size="6"> </td> 

        </tr>



        <tr><td alian-"right" class="main"><?php echo $_POST["discount"]; ?></td></tr>

--- There are two kinds of people in this world those who are taking care of Business and those who are not, which one are you?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...