Payment With Paypal

$_SESSION[‘uid’] = ‘1’;
$_SESSION[‘username’] = ‘rohit’;
$paypal_id=’’;  //
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″>
<title>Products | Store</title>
<style type=”text/css”>
width: 900px;
margin: 0 auto;
margin-top: 50px;
font:bold 14px arial;
float: left;
margin-right: 10px;
border: 1px solid #cecece;
padding: 10px;
margin-right: 20px;
text-align: right;
text-align: center;
<h2>Welcome, <?php echo $_SESSION[‘username’];?></h2>
require ‘db_config.php’;
$result = mysql_query(“SELECT * from products”);
while($row = mysql_fetch_array($result)) {
<div class=”product”>
<div class=”image”>
<img src=”images/<?php echo $row[‘product_img’];?>” alt=””  width=”197px” height=”210px”/>
<div class=”name”>
<?php echo $row[‘product’];?>
<div class=”price”>
Price: <?php echo $row[‘price’];?>$
<div class=”btn”>
<form action='<?php echo $paypal_url; ?>’ method=’post’ name=’frmPayPal1′>
<input type=’hidden’ name=’business’ value='<?php echo $paypal_id;?>’>
<input type=’hidden’ name=’cmd’ value=’_xclick’>

<input type=’hidden’ name=’item_name’ value='<?php echo $row[‘product’];?>’>
<input type=’hidden’ name=’item_number’ value='<?php echo $row[‘pid’];?>’>
<input type=’hidden’ name=’amount’ value='<?php echo $row[‘price’];?>’>

<input type=’hidden’ name=’no_shipping’ value=’1′>
<input type=’hidden’ name=’currency_code’ value=’USD’>
<input type=’hidden’ name=’handling’ value=’0′>
<input type=’hidden’ name=’cancel_return’ value=’http://localhost/Rohit/php/paypal/cancel.php’&gt;
<input type=’hidden’ name=’return’ value=’http://localhost/Rohit/php/paypal/success.php?in=12345′&gt;

<input type=”image” src=”; border=”0″ name=”submit” alt=”PayPal – The safer, easier way to pay online!”>
<img alt=”” border=”0″ src=”; width=”1″ height=”1″>



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s