Hi all,

I'm a self taught at PHP so I've probably made a really silly mistake but I can't see any issue with this code but I keep getting the following message:
Parse error: syntax error, unexpected T_VARIABLE in blah blah on line 816.

I know it will be a missing brace or colon but I've no idea what or where.

Here is the code line 816 is the one beginning with $retval==

function procCompetitions(){
		global $session, $form;
		$retval ==$session->competitions($_POST['competition'], $_POST['competition_dates'], $_POST['entries_close'], $_POST['venue'], $_POST['acrobatics_sections'], $_POST['syllabus'], $_POST['comp_contact'], $_POST['comp_email'] $_POST['contactshown']);
		if ($retval == 0){
			$_SESSION['competition_success'] = true;
			header("Location" .$session->referrer);
		}
		elseif ($retval == 1){
			$_SESSION['value_array'] = $_POST;
			$_SESSION['error_array'] = $form->getErrorArray();
			header("Location" .$session->referrer);
		}
		elseif ($retval == 2){
			$_SESSION['competition_success'] = false;
			header("Location:".$session->referrer);
		}
	}

Any insights would be greatly appreciated.

put only one equall '$retval =' insted of '$retval =='

Thanks, unfortunately, no luck:)

Sorry for wasting your time, silly me forgot to put a comma between two post values.....I've been looking at too many codes of line for too long think I'll go get some fresh air.

Thanks for your help :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.