Jump to content

[SOLVED] Parse error: syntax error, unexpected '>' in........


NickG21

Recommended Posts

Hey Guys,

    I just started getting this error and I have no idea why,

Parse error: syntax error, unexpected '>' in /home/.....php on line 25.  I can't figure out at all why this would be going on as there are no open tags near this line in the code.

any help you guys can give is apprecaited, thank you!

 

<?php
include("header.inc.php");
if(isset($_POST['order'])){
	/*Get Customer Info*/
		$SQLUser = "SELECT * from tblCustomer Where CuSessID ='" . $_COOKIE[phpSESSID] . "'";

		$rsSQLUser = mysql_query($SQLUser);
		$CuInfo = mysql_fetch_array($rsSQLUser);

	/*Update Customer CC Info*/
		$SQLCCUpdate = "Update tblCustomer set CuCCType='" . $_POST['CCardType'] . "' ,CuCCNum='" . $_POST['CCNum'] . "' ,CuCCSVC='" . $_POST['CCCSV'] . "' ,CuCCName='" . $_POST['CCName'] . "' ,CCExpDate='" . $_POST['CCMonth'] . '/' . $_POST['CCYear'] . "' Where CuSessID='" . $_COOKIE[phpSESSID] . "'";
		$rsSQLCCUpdate = mysql_query($SQLCCUpdate);

	/*Log order before individual products*/
      		$SQLOrder = "INSERT into tblOrder (OrID,OrDate,OrCuID, OrCuShipFName,OrCuShipLName,OrCuShipAddress,OrCuShipCity,OrCuShipState,OrCuShipZip,OrCuShipEmail,OrCuShipPhone,OrCuBillFName,OrCuBillLName,OrCuBillAddress,OrCuBillCity,OrCuBillState,OrCuBillZip,OrCuBillEmail,OrItemTotal,OrShippingTotal,OrAuthorization,OrStatus) values('',now(),'$CuInfo[CuID]','$CuInfo[CuFName]','$CuInfo[CuLName]','$CuInfo[CuShipAddress]','$CuInfo[CuShipCity]','$CuInfo[CuShipState]','$CuInfo[CuShipZip]','$CuInfo[CuEmail]','$CuInfo[CuShipPhone]','$CuInfo[CuBillFName]','$CuInfo[CuBillLName]','$CuInfo[CuBillAddress]','$CuInfo[CuBillCity]','$CuInfo[CuBillState]','$CuInfo[CuBillZip]','$CuInfo[CuBillEmail]','$_SESSION[total]','','','')";
      		$rsSQLOrder = mysql_query($SQLOrder);

	/*Retrieve OrderID for use in tblOrderProduct*/
		$SQLOrID = mysql_query("SELECT OrID from tblOrder where OrCuShipFName='" . $CuInfo[CuFName] . "' AND OrCuShipLName='" . $CuInfo[CuLName] . "' AND OrCuBillEmail='" . $CuInfo[CuBillEmail] . "'");
		$rsSQLOrID = mysql_fetch_array($SQLOrID);


	/*Get Products from Cart*/
		$SQLCuCart = "SELECT CartPrID, CartPrQty from tblCart Where CartSessionID ='" . $_COOKIE[phpSESSID] . "'";
Line 25:			$rsSQLCuCart = mysql_query($SQLCuCart);
		/*var_dump(mysql_fetch_array($rsSQLCuCart));*/

	/*Log individual products*/
	while($row = mysql_fetch_array($rsSQLCuCart)){
		$SQLPrInfo = "SELECT PrPrice,PrProvider from tblProduct where PrID='" . $row['CartPrID'] . "'";
			$rsSQLPrInfo = mysql_query($SQLPrInfo);
			$PrInfo = mysql_fetch_array($rsSQLPrInfo);

		$SQLCuOrder = "INSERT into tblOrderProduct (OpID, OpOrID, OpCartPrQty, OpPrPrice, OpPrTotal, OpPrMaker) values('$row[CartPrID]','$rsSQLOrID[OrID]','$row[CartPrQty]','$PrInfo[PrPrice]','$PrInfo[PrPrice] * $row[CartPrQty]','$PrInfo[PrProvider]')";
		$rsSQLCuOrder = mysql_query($SQLCuOrder);

	}	
	/*Remove tblCart Entries after Order is Placed*/
	$EmptyCartSQL = mysql_query("DELETE FROM tblCart Where CartSessionID='" . $_COOKIE[phpSESSID] . "'");

	session_destroy();
}?>

I know it will screw up the way your document looks, but try getting rid of the tab and space that is prior to the code. Basicly remove all indenting. Then save and try to execute it agian see if that solves the problem. If so then the special characters is the issue. It might have been a glitch though so you can try indenting it correctly agian after you have it working and save and execute to see if the glitch is still causing the problem.

I can't be sure this is the issue just an educated guess.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.