Jump to content

Annoying syntax error...


ash992
Go to solution Solved by Ch0cu3r,

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 

 

 

 

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.