ash992 Posted October 5, 2013 Share Posted October 5, 2013 Hi guys, so I've been getting this syntax error for the past 2 days, and I can't get it to work at all... though I'm sure it's probably something quite simple that I just haven't noticed. the error is Quote Parse error: syntax error, unexpected '[', expecting ';' in /home/folklore/public_html/AS/Engines/updatebasket.php on line 14 in the document there is the following code; <?php session_start(); $name = $_SESSION['name']; $rows = $_SESSION['rows']; $price = $_SESSION['price']; $choice = $_SESSION['choice']; $quan = $_SESSION['quantity']; $remove1 = $_POST['remove1']; //CHECK FOR ITEMS TO BE REMOVED if ($remove1 == 'yes'){ $rows = $rows - 1; $_SESSION['rows'] = $rows; unset($_SESSION['name']); unset($_SESSION['price']); unset($_SESSION['choice']); unset($_SESSION['quantity']); unset($_SESSION)['AVA']); } Line 14 is empty, but the line follows is the line that reads $remove1 = $_POST['remove1]; I can't see a syntax error, but possibly I've missed something simple. any advice would be much appreciated! thank-you in advance Link to comment https://forums.phpfreaks.com/topic/282740-annoying-syntax-error/ Share on other sites More sharing options...
Ch0cu3r Posted October 5, 2013 Share Posted October 5, 2013 The thing I see wrong with that code is only line 32 unset($_SESSION)['AVA']); The ) shouldn't be there after $_SESSION. make sure you're saving your .php files as UTF-8 encoding (without the BOM) Link to comment https://forums.phpfreaks.com/topic/282740-annoying-syntax-error/#findComment-1452705 Share on other sites More sharing options...
ash992 Posted October 5, 2013 Author Share Posted October 5, 2013 Goddd. Thank-you very much! it's working now, can't believe I didn't see this. thanks a lot though ) Link to comment https://forums.phpfreaks.com/topic/282740-annoying-syntax-error/#findComment-1452706 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.