Note that there are some explanatory texts on larger screens.

plurals
  1. POPaypal ipn/cart variables
    primarykey
    data
    text
    <p>Wondered if anyone could give me any pointers?</p> <p>The website I'm currently building sells 'event' tickets....holidays.</p> <p>What I'm trying to do is decrease the number of tickets in a database field by the number purchased BUT can't find a paypal cart variable which will pull the information back. The custom variable it seems can only be used once and the item_name and item_number variables are already being used, the (item_number) to identify the 'event_id' field in the database and the (item_name) to obviously identify the event name.</p> <p>I can pass the correct number of tickets to be updated over to Paypal by decreasing the amount and echoing that out in a hidden form field prior to sumbitting to Paypal BUT I can't get the results back. I'm looking for a Paypal form 'name' field that can be adapted to my needs, if one exists</p> <p>Below is the database loop: The 'custom' variable doesn't work as it can't be custom1, custom2 etc.</p> <pre><code> mysql_connect('xxxxxxxx', 'xxxxxx', 'xxxxxxxx') or exit(0); mysql_select_db('xxxxxx') or exit(0); $num_cart_items = $_POST['num_cart_items']; $i=1; while (isset($_POST['item_number'.$i]))//read the item details { $item_ID[$i]=$_POST['item_number'.$i]; $custom[$i]=$_POST['custom'.$i]; $i++; } $item_count = $i-1; for ($j=1;$j&lt;=$item_count;$j++) { $struery = "UPDATE events SET event_tickets = '".$custom[$j]."' WHERE event_id = '".$item_ID[$j]."'"; $result = mysql_query($struery) or die("Cart - paypal_cart_info, Query failed:&lt;br&gt;" . mysql_error() . "&lt;br&gt;" . mysql_errno()); $i++; }// end database loop Thanks for any info. Os </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload