pixeltrace Posted November 26, 2006 Share Posted November 26, 2006 guys,i need help. before this page of my site is working. in fact, i even ask for help here before andthe problem was fixed. now its having a different error. and i just found it out when one of the viewing emailed me.the problem is when i click on the order form, its not submitting the correct product_idi have to pagepainting.phpandporder.phpthis is the codes for my painting.php[code]<form method='GET' action='porder.php'> <? include '../db_connect.php'; $uSql = "SELECT product_image, product_name, product_type, product_desc, product_price, product_id FROM products WHERE product_type = 'painting' ORDER by product_id DESC "; $uResult = mysql_query($uSql, $connection) or die(mysql_error()); if(!$uResult){ echo 'no data found';}else{ while($uRow = mysql_fetch_row($uResult)){ ?> <table width="500" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="7"><img src="../images/spacer.gif" width="10" height="10"></td> </tr> <tr> <td width="14" rowspan="3"><img src="../images/spacer.gif" width="10" height="10"></td> <td width="84" rowspan="3" align="center" valign="top"><a href="../images/products/<?= $uRow[0]?>.jpg" target="_blank" class="fotgal"><img src="../images/products/thumbs/<?= $uRow[0]?>.gif" width="70" height="69" border="0"></a></td> <td width="10" rowspan="3"><img src="../images/spacer.gif" width="10" height="10"></td> <td width="243"><span class="bodytext3"> <?= $uRow[1]?> </span></td> <td colspan="2" valign="top"><span class="bodytext">| <?= $uRow[2]?> </span></td> <td width="10" rowspan="3"><img src="../images/spacer.gif" width="10" height="10"></td> </tr> <tr> <td colspan="3"><span class="bodytext6"> <?= $uRow[3]?> </span></td> </tr> <tr> <td><span class="bodytext3"> <?= $uRow[4]?> </span></td> <td width="42"> </td> <td width="97" align="center"> <input name="submit" type="submit" value="Order Now"> <input type=hidden value=<? echo $uRow[5];?> name=product_id></td> </tr> <tr> <td colspan="7"><img src="../images/spacer.gif" width="10" height="10"></td> </tr> <tr> <td colspan="3"> </td> <td colspan="3"><span class="bodytext">--------------------------------------------------------------------------------------------</span></td> <td> </td> </tr> </table> <? } } ?></form>[/code]and this is the codes for my porder.php[code]<?include '../db_connect.php';$uSql = "SELECT product_image, product_name, product_desc, product_type, product_price FROM products WHERE product_id= '" . $_GET['product_id'] . "'";$uResult = mysql_query($uSql, $connection) or die("Error: ". mysql_error(). " with query ". $uSql);$uRow = mysql_fetch_array($uResult);?><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title><link href="../CSS.css" rel="stylesheet" type="text/css"><style type="text/css"><!--body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-color: #E7E7DD;}--></style></head><body><table width="500" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="18" align="center"> <table width="408" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="408" align="center"><BR> <BR> <BR></td> </tr> <tr> <td align="center"> <table width="36" border="1" cellpadding="0" cellspacing="0" bordercolor="#666666"> <tr> <td width="32" align="center"><img src="../images/products/<?= $uRow[0]?>.jpg"></td> </tr> </table> </td> </tr> <tr> <td><img src="../images/spacer.gif" width="4" height="4"></td> </tr> <tr> <td bg bgcolor="#E14B19"><img src="../images/spacer.gif" width="4" height="1"></td> </tr> <tr> <td><img src="../images/spacer.gif" width="4" height="14"></td> </tr> <tr> <td align="center"><span class="bodytext3">YOU HAVE ORDERED </span></td> </tr> <tr> <td align="center"><span class="bodytext"><? echo $uRow[1]; ?></span></td> </tr> <tr> <td align="center"><span class="bodytext"><? echo $uRow[2]; ?></span></td> </tr> <tr> <td align="center"> </td> </tr> <tr> <td><img src="../images/spacer.gif" width="4" height="4"></td> </tr> <tr> <td bg bgcolor="#E14B19"><img src="../images/spacer.gif" width="4" height="1"></td> </tr> <tr> <td><img src="../images/spacer.gif" width="4" height="4"></td> </tr> <tr> <td> </td> </tr> <tr> <td class="bodytext3"><form method='post' action='pordermail.php'><table width="407" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="3" class="bodytext3">Product Order Information </td> </tr> <tr> <td colspan="3"> </td> </tr> <tr> <td width="90" class="bodytext3">Name:</td> <td width="6"><img src="../images/spacer.gif" width="6" height="4"></td> <td width="311"><input name=name class="newsletter" size=30 maxlength=50></td> </tr> <tr> <td colspan="3"> </td> </tr> <tr> <td class="bodytext3">Contact No: </td> <td> </td> <td><input name=contact class="newsletter" size=30 maxlength=50></td> </tr> <tr> <td colspan="3"> </td> </tr> <tr> <td class="bodytext3">Email Address: </td> <td> </td> <td><input name=email class="newsletter" size=30 maxlength=50></td> </tr> <tr> <td colspan="3"> </td> </tr> <tr> <td class="bodytext3">Item Selected: </td> <td> </td> <td><input name=product class="newsletter" size=50 maxlength=50 value="1- <? echo $uRow[1]; ?> <? echo $uRow[3]; ?>"></td> </tr> <tr> <td colspan="3"> </td> </tr> <tr> <td> </td> <td> </td> <td class="bodytext3">Other Details <span class="bodytext2">(If you have other concerns, place it here)</span> </td> </tr> <tr> <td> </td> <td> </td> <td><textarea name="details" cols="50" rows="6" wrap="virtual" class="newsletter2"></textarea></td> </tr> <tr> <td colspan="3"> </td> </tr> <tr> <td> </td> <td> </td> <td><input type=submit value=submit name=submit> <input type=hidden value=http://www. name=redirect> <input type=hidden value=Sinagtala_Product_Order name=subject> <input type=hidden [email protected] name=recipient> <input type=hidden [email protected] name=cc> <input type=hidden [email protected] name=bcc></td> </tr> <tr> <td colspan="3"> </td> </tr> </table> </form></td> </tr> </table> </td> </tr></table></body></html>[/code]i tried doing an echo on porder.php but its not displaying the product_idhope you could help me with this.thanks! Link to comment https://forums.phpfreaks.com/topic/28529-need-help-on-my-order-submit-button/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.