Jump to content

Annoying syntax error...


ash992

Recommended Posts

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

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.