NickG21 Posted August 11, 2009 Share Posted August 11, 2009 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(); }?> Link to comment https://forums.phpfreaks.com/topic/169825-solved-parse-error-syntax-error-unexpected-in/ Share on other sites More sharing options...
WolfRage Posted August 11, 2009 Share Posted August 11, 2009 If you look at your code as it is posted you will see you have several special characters of which are probably being added by your text editor. These special characters are probably giving PHP the error. Link to comment https://forums.phpfreaks.com/topic/169825-solved-parse-error-syntax-error-unexpected-in/#findComment-895930 Share on other sites More sharing options...
NickG21 Posted August 11, 2009 Author Share Posted August 11, 2009 Do you think you could give me an example of what they are? i've been using crimson forever and this site was working earlier, i can't figure out what change i've made that made this error start happening. Link to comment https://forums.phpfreaks.com/topic/169825-solved-parse-error-syntax-error-unexpected-in/#findComment-895933 Share on other sites More sharing options...
WolfRage Posted August 11, 2009 Share Posted August 11, 2009 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. Link to comment https://forums.phpfreaks.com/topic/169825-solved-parse-error-syntax-error-unexpected-in/#findComment-895954 Share on other sites More sharing options...
NickG21 Posted August 11, 2009 Author Share Posted August 11, 2009 that didn't change anything, i've been using this indenting in all of my pages and there has never been an error with it Link to comment https://forums.phpfreaks.com/topic/169825-solved-parse-error-syntax-error-unexpected-in/#findComment-895959 Share on other sites More sharing options...
WolfRage Posted August 11, 2009 Share Posted August 11, 2009 Did you actually try my recomendation? Because that was pretty fast. You can also try creating a new file and then pasting the code, perhaps that file is corrupted. Beyond that not sure, good luck. Link to comment https://forums.phpfreaks.com/topic/169825-solved-parse-error-syntax-error-unexpected-in/#findComment-895969 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.