Hello Team, please guys i am stuck from three days with paypal issue for IPN but no luck yet now i wants to do other method. i have used this form to send info to paypal and everything is working ok now what i wants is before i send this form to paypal it will be included to my database, i am not much familiar with it how to do that, here is the code for my checkout page:
Code: [Select]<h2>Checkout</h2>
<?php
if($_SESSION['cart'])
{
?>
<form action="index.php?view=update_cart" method="post">
<table id="items">
<thead>
<tr>
<th>Item</th>
<th>Price</th>
<th>Qty</th>
<th>Subtotal</th>
</tr>
</thead>
<tbody>
<?php foreach($_SESSION['cart'] as $id => $qty):
$product = find_product($id);
?>
<tr>
<td><?php echo $product['title']; ?></td>
<td>£<?php echo number_format($product['price'],2); ?></td>
<td><input type="text" size="2" name="<?php echo $id ?>" maxlength="2" value="<?php echo $qty; ?>" /></td>
<td>£<?php echo number_format($product['price'] * $qty, 2); ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<p style="margin-left:235px"><input type="submit" name="update" value="update" /></p>
</form>
<center><h3>Please Enter Your Detail</h3></center>
<table id="userdetail">
<tr><td align="right">First Name:</td><td><input type="text" name="firstname" /></td></tr>
<tr><td align="right">Last Name:</td><td><input type="text" name="lastname" /></td></tr>
<tr><td align="right">Email:</td><td><input type="text" name="email" /></td></tr>
<tr><td align="right">Address:</td><td><textarea name="address"cols="30" rows="5"></textarea></td></tr>
<tr><td align="right">Telephone No:</td><td><input type="text" name="phone" /></td></tr>
</table>
<center><h3>Your Payment Description</h3></center>
<p><b>Subtotal:</b> £<?php echo number_format($_SESSION['total_price'],2); ?></p>
<p><b>Shipping:</b> £ 2.50</p>
<p><b>Grand Total:</b> £<?php echo number_format($_SESSION['total_price']+$shipping,2); ?></p>
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="myemail_12551_biz@hotmail.com">
<?php
$i = 1;
foreach($_SESSION['cart'] as $id => $qty):
$product = find_product($id);
?>
<input type="hidden" name="item_name_<?php echo $i; ?>" value="<?php echo $product['title']; ?>">
<input type="hidden" name="item_number_<?php echo $i; ?>" value="<?php echo $product['id']; ?>">
<input type="hidden" name="amount_<?php echo $i; ?>" value="<?php echo $product['price']; ?>">
<input type="hidden" name="quantity_<?php echo $i; ?>" value="<?php echo $qty; ?>">
<?php
$i++;
endforeach;
?>
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="lc" value="GB">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="shipping_1" value="2.50">
<input type="hidden" name="return" value="http://www.mysite.com/includes/index.php?view=thankyou">
<input type="hidden" name="cancel_return" value="http://www.mysite.com/">
<input type="hidden" name="notify_url" value="http://www.mysite.com/includes/paypal.php">
<input type="submit" name="pay now" value="pay" />
</form>
<?php
}
else
{
echo '<p>your cart is empty... <a href="index.php">continue shopping</a></p>';
}
?>
this all i wants to add in my datbase.... Please Please Please help me as soon as possible.
"SEO" URLs
Hey, I'm wondering how to go about creating and using these types of URLs. I'm presuming it's PHP that does this? I see them on Wordpress and Joomla and such but I've been trying to learn exactly how
how to get different value in second view of webdynpro?
hello guys,
multiple recipients + dbuser mail recall
Hello,I am building a php login script.When the user registers the script will send him a confimation email using this codemail($usr_email, "Login Details", $message, "From:
Undefined Index Notice In Internet Explorer Only
I am getting the following notice: QuoteNotice: Undefined index: jrox in /home/ycsn/public_html/mem/includes/html/templates/template_member_home_page.php on line 20It only appears within Internet
switch not getting value
what am i doing wrong?i want to populate the country list according to the categoryi want to switch in case CategoryID=1 and CatID2=2 in the country_list tablethen call on "alpha" to
Checking if a process is running (problems including psapi.dll i think...)
Ok, so all I'm trying to do is check if a program is running...
Uploading Filetypes and placing them in seperate folders.
Hello, first post , and asking for help im afraid. Very new to PHP, was making good progress I thought , but im stuck with this part. I have a uploading form that works perfectly and uploads
MII Trends - add data onto chart object
Hello,
PHP Include not working
The website is http://www.grlistingservices.comThe code block is as follows:<?phpif (!isset($id)){include 'home.php';}else{include "$id.php";}?>All files are in the same
please, need help coding this voting for your favorite car polling system.
hi, my code needs a lot of work, but i want to be able to let users vote on their favorite car, update the database, and display the new updated data for the top ten cars listed. i want to prevent