Note that there are some explanatory texts on larger screens.

plurals
  1. POproducts in my cart wont display at checkout or post as orders in mysql
    primarykey
    data
    text
    <p>i get my info from my database when i order, but i use a checkorders.php page to see orders coming in but they wont display</p> <p>this is the coding that i think is givingthe issue any ideas?</p> <pre><code>&lt;? session_start(); include("includes/db.php"); include("includes/phpscripts.php"); include('includes/settings.php'); ?&gt; &lt;? if($_GET["action"] == "save") { $MID = str_replace("'","''",$_REQUEST['MID']); $GETFIRSTNAME = str_replace("'","''",$_REQUEST['FIRSTNAME']); $GETLASTNAME = str_replace("'","''",$_REQUEST['LASTNAME']); $GETEMAIL = str_replace("'","''",$_REQUEST['EMAIL']); $GETPASSWORD = str_replace("'","''",$_REQUEST['PASSWORD']); $GETPHONE = str_replace("'","''",$_REQUEST['PHONE']); $GETADDRESS1 = str_replace("'","''",$_REQUEST['ADDRESS1']); $GETADDRESS2 = str_replace("'","''",$_REQUEST['ADDRESS2']); $GETCITY = str_replace("'","''",$_REQUEST['CITY']); $GETSTATE = str_replace("'","''",$_REQUEST['STATE']); $GETPAID = str_replace("'","''",$_REQUEST['PAID']); $dbh=mysql_connect ("localhost", "florida_fields", "fields321") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("florida_fields"); $query = "UPDATE MEMBERS SET FIRSTNAME = '$GETFIRSTNAME', LASTNAME = '$GETLASTNAME', EMAIL = '$GETEMAIL', PASSWORD = '$GETPASSWORD', PHONE = '$GETPHONE', ADDRESS1 = '$GETADDRESS1', ADDRESS2 = '$GETADDRESS2', CITY = '$GETCITY', STATE = '$GETSTATE', PAID = '$GETPAID' WHERE MID = '$MID'"; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); } if($_GET["action"] == "gopaid") { $OID = str_replace("'","''",$_REQUEST['OID']); $dbh=mysql_connect ("localhost", "florida_fields", "fields321") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("florida_fields"); $query = "UPDATE ORDERS SET PAID = '1' WHERE OID = '$OID'"; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); } if($_GET["action"] == "gounpaid") { $OID = str_replace("'","''",$_REQUEST['OID']); $dbh=mysql_connect ("localhost", "florida_fields", "fields321") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("florida_fields"); $query = "UPDATE ORDERS SET PAID = '0' WHERE OID = '$OID'"; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); } ?&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; &lt;title&gt;&lt;?echo$SHOWTITLE?&gt;&lt;/title&gt; &lt;meta name="description" content="&lt;?echo$SHOWDESC?&gt;" /&gt; &lt;meta name="keywords" content="&lt;?echo$SHOWKEYS?&gt;"&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; &lt;link href="css/menu.css" rel="stylesheet" type="text/css" /&gt; &lt;script&gt; function Edit(id) { window.open("editor/examples/editor1.php?ID="+id,"test","toolbar=no,location=no,status=no,resizable=yes,scrollbars=auto,width=700,height=600,top=50,left=50"); } &lt;/script&gt; &lt;script&gt; function printorder(id) { window.open("vieworder.php?ID="+id,"test","toolbar=no,location=no,status=no,resizable=yes,scrollbars=auto,width=700,height=600,top=50,left=50"); } &lt;/script&gt; &lt;script language="JavaScript"&gt; &lt;!-- function Form1() { if(document.form2.NAME.value=="") { alert("Please Enter Page Name"); return false; } } function Form2() { if(document.form3.SUBONENAME.value=="") { alert("Please Enter Sub Page Name"); return false; } } function Form3() { if(document.form4.SUBTWONAME.value=="") { alert("Please Enter Sub Page Name"); return false; } } //--&gt; &lt;/script&gt; &lt;script&gt; function DeletePage(id) { if(confirm("Are you really really sure you want to delete this page?")) { if(confirm("Ok, don't tell me I didn't warn you! You can not undo this one you know?")) { parent.location="index.php?action=delete&amp;DID="+id } } } &lt;/script&gt; &lt;script&gt; function DeleteOrder(id) { if(confirm("Are you really really sure you want to delete this order?")) { if(confirm("Ok, don't tell me I didn't warn you! You can not undo this one you know?")) { parent.location="checkorders.php?action=deleteorder&amp;DID="+id } } } &lt;/script&gt; &lt;? if($_GET["action"] == "deletemember") { $dbh=mysql_connect ("localhost", "florida_fields", "fields321") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("florida_fields"); $TID = $_REQUEST['DID'] ; $sql = "DELETE FROM MEMBERS WHERE MID = '$TID'"; mysql_query($sql); //mysql_close(); } ?&gt; &lt;? if($_GET["action"] == "deleteorder") { $dbh=mysql_connect ("localhost", "florida_fields", "fields321") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("florida_fields"); $TID = $_REQUEST['DID'] ; $sql = "DELETE FROM ORDERS WHERE OID = '$TID'"; mysql_query($sql); //mysql_close(); } ?&gt; &lt;script&gt; function DeleteMember(id) { if(confirm("Are you really really sure you want to delete this member?")) { if(confirm("Ok, don't tell me I didn't warn you! You can not undo this one you know?")) { parent.location="members.php?action=deletemember&amp;DID="+id } } } &lt;/script&gt; &lt;script&gt; function showit(it) { document.getElementById(it).style.display = "block"; } function hideit(it) { document.getElementById(it).style.display = "none"; } function hideall() { for (var i=1; i&lt;=2; i++) { hideit("x" + i); } } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&amp;&amp;i&lt;a.length&amp;&amp;(x=a[i])&amp;&amp;x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i&lt;a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))&gt;0&amp;&amp;parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&amp;&amp;d.all) x=d.all[n]; for (i=0;!x&amp;&amp;i&lt;d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&amp;&amp;d.layers&amp;&amp;i&lt;d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x &amp;&amp; d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i&lt;(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } &lt;/script&gt; &lt;style type="text/css"&gt; &lt;!-- body { background-image: url(back.jpg); margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --&gt; &lt;/style&gt; &lt;link href="css/florida.css" rel="stylesheet" type="text/css" /&gt; &lt;style type="text/css"&gt; &lt;!-- .style4 {color: #FFFFFF} --&gt; &lt;/style&gt; &lt;/head&gt; &lt;body onload="MM_preloadImages('images/button1_2.jpg','images/button2_2.jpg')"&gt; &lt;table width="1024" border="0" align="center" cellpadding="0" cellspacing="0"&gt; &lt;tr&gt; &lt;td align="center" valign="top" background="mainback.jpg"&gt;&lt;table width="944" height="717" border="0" cellpadding="0" cellspacing="0"&gt; &lt;tr&gt; &lt;td height="109"&gt;&lt;div align="right"&gt;&lt;a href="https://www.facebook.com/Grassfedmalabar"&gt;&lt;img src="images/facebook.jpg" width="310" height="50" border="0" /&gt;&lt;/a&gt;&lt;br /&gt; &lt;a href="memberlogin.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image4','','images/button1_2.jpg',1)"&gt;&lt;img src="images/button1_1.jpg" name="Image4" border="0" id="Image4" /&gt;&lt;/a&gt;&lt;img src="images/button2.jpg" width="32" height="59" /&gt;&lt;a href="join.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image6','','images/button2_2.jpg',1)"&gt;&lt;img src="images/button2_1.jpg" name="Image6" width="129" height="59" border="0" id="Image6" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td height="159"&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;&lt;table width="941" border="0" cellspacing="0" cellpadding="0"&gt; &lt;tr&gt; &lt;td valign="top"&gt;&amp;nbsp;&lt;/td&gt; &lt;td valign="top" class="TextD"&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td width="156" valign="top"&gt;&lt;table width="155" border="0" cellspacing="0" cellpadding="0"&gt; &lt;tr&gt; &lt;td background="images/menuback.jpg"&gt;&lt;br /&gt; &lt;table width="156" border="0" cellpadding="0" cellspacing="0"&gt; &lt;tr&gt; &lt;td width="28"&gt;&amp;nbsp;&lt;/td&gt; &lt;td width="128" valign="top"&gt;&lt;? include("menu.php");?&gt; &lt;br /&gt; &lt;br /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;div align="left"&gt;&lt;img src="images/menubottom.jpg" width="149" height="250" /&gt;&lt;br /&gt; &lt;/div&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;?php if ($_SESSION['florida']=='fields321') { ?&gt; &lt;div align="left"&gt; &lt;span class="link2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;• &lt;a href="addpage.php"&gt;Edit Menu&lt;/a&gt;&lt;/span&gt;&lt;br /&gt; &lt;span class="link2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;• &lt;a href="index.php?action=logout"&gt;Logout&lt;/a&gt;&lt;/span&gt;&lt;br /&gt; &lt;span class="link2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;• &lt;a href="pagesettings.php"&gt;Page Settings&lt;/a&gt;&lt;/span&gt;&lt;br /&gt; &lt;span class="link2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;• &lt;a href="sortmenu.php"&gt;Sort Menu&lt;/a&gt;&lt;/span&gt;&lt;br /&gt; &lt;span class="link2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;• &lt;a href="members.php"&gt;Members&lt;/a&gt;&lt;/span&gt;&lt;br /&gt; &lt;span class="link2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;• &lt;a href="checkorders.php"&gt;Orders&lt;/a&gt;&lt;/span&gt;&lt;br /&gt; &lt;span class="link2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;• &lt;a href="addcat.php"&gt;Edit Gallery&lt;/a&gt;&lt;/span&gt;&lt;br /&gt; &lt;/div&gt; &lt;? } ?&gt; &lt;/td&gt; &lt;td width="779" valign="top"&gt;&lt;table width="777" border="0" cellspacing="2" cellpadding="2"&gt; &lt;tr&gt; &lt;td width="123" bgcolor="#AABE3B" class="style4 TextB"&gt;&lt;div align="left"&gt;&lt;strong&gt;First Name&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width="123" bgcolor="#AABE3B" class="style4 TextB"&gt;&lt;div align="left"&gt;&lt;strong&gt;Last Name&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width="142" bgcolor="#AABE3B" class="style4 TextB"&gt;&lt;div align="left"&gt;&lt;strong&gt;Order&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width="142" bgcolor="#AABE3B" class="style4 TextB"&gt;&lt;div align="left"&gt;&lt;strong&gt;Pick-Up&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width="84" bgcolor="#AABE3B" class="style4 TextB"&gt;&lt;div align="left"&gt;&lt;strong&gt;Method&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width="206" bgcolor="#AABE3B" class="style4 TextB"&gt;&lt;div align="left"&gt;&lt;strong&gt;Printed&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width="61" bgcolor="#AABE3B" class="style4 TextB"&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt; &lt;? $dbh=mysql_connect ("localhost", "florida_fields", "fields321") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("florida_fields"); $query = "SELECT * FROM ORDERS WHERE ORDERDATE &lt;&gt; '' ORDER BY OID"; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); $num=mysql_numrows($result); ?&gt; &lt;? $i=0; while($i&lt;$num) { </code></pre> <p>i think here is my issue but i am not too sure</p> <pre><code>$CART=mysql_result($result,$i,"CART"); $OID=mysql_result($result,$i,"OID"); $PAID=mysql_result($result,$i,"PAID"); $PAYMETHOD=mysql_result($result,$i,"PAYMETHOD"); $CUSTOMER=mysql_result($result,$i,"CUSTOMER"); $PICKUP=mysql_result($result,$i,"ORDERDATE"); if($PAID=='0') { $PAID2 = "No"; } else { $PAID2 = "Yes"; } $query2 = "SELECT * FROM MEMBERS WHERE MID = '$CUSTOMER' "; $result2 = mysql_query($query2) or die('Query failed: ' . mysql_error()); $num2=mysql_numrows($result2); if($num2!=NULL) { $FIRSTNAME=mysql_result($result2,$i2,"FIRSTNAME"); $LASTNAME=mysql_result($result2,$i2,"LASTNAME"); } ?&gt; &lt;tr&gt; &lt;td valign="top" class="TextB"&gt;&lt;div align="left"&gt;&lt;? echo $FIRSTNAME?&gt;&lt;/div&gt;&lt;/td&gt; &lt;td valign="top" class="TextB"&gt;&lt;div align="left"&gt;&lt;? echo $LASTNAME?&gt;&lt;/div&gt;&lt;/td&gt; &lt;td valign="top" class="TextB"&gt;&lt;div align="left"&gt;&lt;a href="javascript:printorder('&lt;? echo $OID?&gt;');"&gt;View Order&lt;/a&gt;&lt;/div&gt;&lt;/td&gt; &lt;td valign="top" class="TextB"&gt;&lt;div align="left"&gt;&lt;? echo $PICKUP?&gt;&lt;/div&gt;&lt;/td&gt; &lt;td valign="top" class="TextB"&gt;&lt;div align="left"&gt;&lt;? echo $PAYMETHOD?&gt;&lt;/div&gt;&lt;/td&gt; &lt;td valign="top" &lt;? if($PAID=='0'){?&gt;bgcolor="#FF0000" class="TextB"&gt;&lt;div align="left"&gt;&lt;a href="checkorders.php?action=gopaid&amp;OID=&lt;? echo $OID?&gt;"&gt;&lt;font color="#FFFFFF"&gt;&lt;? echo $PAID2?&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;? }?&gt; &lt;? if($PAID=='1'){?&gt;bgcolor="#00FF00" class="TextB"&gt;&lt;div align="left"&gt;&lt;a href="checkorders.php?action=gounpaid&amp;OID=&lt;? echo $OID?&gt;"&gt;&lt;font color="#FFFFFF"&gt;&lt;? echo $PAID2?&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;? }?&gt;&lt;/td&gt; &lt;td valign="top" class="TextB"&gt;&lt;div align="left"&gt;(&lt;a href="javascript:DeleteOrder('&lt;? echo $OID?&gt;');"&gt;Delete&lt;/a&gt;)&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="7" class="TextB"&gt;&lt;hr /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;? $i++; } ?&gt; &lt;/table&gt; &lt;br /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;? if ($_SESSION['florida']=='fields321') { ?&gt; &lt;? } ?&gt; &lt;/table&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;br /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="center"&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/body&gt; &lt;/html&gt; </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.
    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