i have made this simple shoes web store so that ppl if like this shoes,they can buy it and pay by paypal.
the problem is i dunno how to put the value in the form that paypal provided.
the shoes got sizes.if the buyer after seeing the shoes and they like it,they can select the sizes and then click on the paypal button and then they will directed to paypal.
but the shoes sizes is not appear.cos i dunno what name should i put in the name tag and the value tag.
could anyone who knows this help me out?
thanks in advance and really appreaciate it ^^v
i included the codes as well ^^v problem is at the bottom there
thanks!!!!!
Code: Select all
<html>
<head>
<title>livestock-brand-display</title>
</head>
<style>
a
{
text-decoration:none;
}
</style>
<body>
<table align="center" width="750" height="455" border="1" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" colspan="3" height="90"><img src="images/logo.gif"></td>
<td valign="top" align="right" colspan="3">address</td>
</tr>
<tr>
<td height="20" width="125"><a href="home.php"><font size="-4">home</font></a></td>
<td width="125">
<?php
include "IncludeFiles/db_config.php";
$myConn=mysql_connect($host,$uname,$pword);
$mydb=mysql_select_db($dbname,$myConn);
$sql="select * from categories";
$rs=mysql_query($sql,$myConn);
$num_rows=mysql_num_rows($rs);
for($i=1;$i<=$num_rows;$i++)
{
$row=mysql_fetch_array($rs);
echo "<font size=-4>";
echo "<a href='brands.php?cid=".$row['categoryid']."'>";
echo $row['cname'];
echo "</a>";
echo "</font>";
}
?>
</td>
<td width="125"> </td>
<td width="125"> </td>
<td width="125"> </td>
<td width="125"> </td>
</tr>
<tr>
<td align="center" colspan="6" height="330">
<a href="brands.php">back to choose brands</a><br>
<a href="bproducts.php">back to choose choices</a><br>
<?php
$sql22="select m.productid,m.pname,m.pimg,m.pdetail,m.pcolor,m.pprice,m.psize1,m.psize2,m.psize3,m.psize4,m.psize5,c.bname from products as m inner join brands as c on c.brandid=m.brandid where productid=".$_GET["cat"];
$rs=mysql_query($sql22,$myConn);
$num_rows=mysql_num_rows($rs);
echo "<table border=1>";
for($i=1;$i<=$num_rows;$i++)
{
$row=mysql_fetch_array($rs);
echo "<tr>";
echo "<td rowspan='6'>";
echo "<img src='images/products/".$row["bname"]."/".$row["pimg"]."' height=200 width=210>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "name : ";
echo "<font face=verdana size=+1>".$row["pname"]."</font>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "price : ";
echo $row["pprice"]; echo "<br>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "color : ";
echo $row["pcolor"]; echo "<br>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "detail : ";
echo $row["pdetail"];echo "<br>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "sizes : ";
echo "<select name='num'>";
echo "<option value='".$row["psize1"]."'>".$row["psize1"]."</option>";
echo "<option value='".$row["psize2"]."'>".$row["psize2"]."</option>";
echo "<option value='".$row["psize3"]."'>".$row["psize3"]."</option>";
echo "<option value='".$row["psize4"]."'>".$row["psize4"]."</option>";
echo "<option value='".$row["psize5"]."'>".$row["psize5"]."</option>";
echo "</select>";
echo "</td>";
echo "</tr>";
}
echo "</table>";
echo "<form action='https://www.paypal.com/cgi-bin/webscr' method='post'>";
echo "<input type='hidden' name='cmd' value='_xclick'>";
echo "<input type='hidden' name='business' value='nanakooy@hotmail.com'>";
echo "<input type='hidden' name='item_name' value='".$row["pname"]."'>";
echo "<input type='hidden' name='' value=''>";// how to make the option selected to put here?what to put in the name and the value?
echo "<input type='hidden' name='currency_code' value='USD'>";
echo "<input type='hidden' name='amount' value='".$row["pprice"]."'>";
echo "<input type='hidden' name='shipping' value='$15'>";
echo "<input type='hidden' name='no_shipping' value='0'>";//will this one ask for the buyers address?
echo "<input type='hidden' name='cancel_return' value='http://www.bodwellinternet.com/<span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span>/vancafe'>";
echo "<input type='hidden' name='return' value='http://www.abc.com'>";//will this one return to my site after buyers checking out?
echo "<input type='image' src='http://www.paypal.com/en_US/i/btn/x-click-but01.gif' name='submit'>";
//how to display these $row["pcolor"] , $row["pdetail"] in paypal too?
mysql_close($myConn);
?>
</td>
</tr>
<tr>
<td align="center" colspan="6" height="15"></td>
</tr>
</table>
</body>
</html>