PHP: unexpected T_VARIABLE

Associate
Joined
18 Oct 2002
Posts
858
Location
Cheshire
I get the following error message....
Code:
[b]Parse error[/b]: syntax error, unexpected T_VARIABLE, expecting '(' in .....

oky, heres the first 10 lines....

Code:
<?php require_once('Connections/pink_db.php'); ?>
<?php
if $Auth=="y" { $Auth = "Y"; }
if $Auth=="" { $Auth = "N"; }
if $Auth=="n" { $Auth = "N"; }
if $Auth!=="N" {
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
if($Name=="" || $address1=="" || $address2=="" || $town=="" || $county=="" || $postcode=="" || $phone=="" || $DOB=="" || $bid=="" || $Auth=="" || $time_stamp=="" ){

I just can't spot it....

can anyone see it?

Thanks

:edit
oky, I added the brackets.....

now getting the error

Code:
[b]Parse error[/b]: syntax error, unexpected '}', expecting ',' or ';' in
 
Last edited:
Erm, I'm using register globals because the info is required by multiple pages and it's a pain in the arse to use URLENCODE and URLDECODE all the time.... not to mention messy.....

Sorted it now.... apart from an unexpected T_STRING error.....
 
oky, perhaps I lost the plot... I need to go home n sleep.... but this charity website is p***in me off....

Code:
[b]Parse error[/b]: syntax error, unexpected T_STRING, expecting ',' or ';' in ...... on line [b]35[/b]
lines 31 - 39 are....

Code:
31	mysql_select_db($database_pink_db, $pink_db);
32	$query="insert into Bids (name,address1,address2,town,county,post_code,Phone,email,DOB,bid,Auth,time_stamp) values ('".$name."','".$address1."','".$address2."','".$town."','".$county."','".$postcode."','".$phone."','".$email."','".$DOB."','".$bid."','".$Auth."','".$time_stamp."')";
33	mysql_query($query) or die(mysql_error());
34	}
35	echo "Your entry has been accepted. <br>Please click <a href="index.php">HERE</a> to go back to the main page.";
36	}
37	else
38	{ echo "You did not type a Y in the box to agree to bid. Please use your browsers back button."; }
39	?>

I got the matrix effect infront of my eyes..... :(
 
doh, arse....
it's coz I added that a href....

ok, pinkscooter is now known as a swearword....

www.pinkscooter.co.uk

I wonder if OCUK will be sending these forums pink for the day? ;)

:edit
It's friday, stop picking on me code... I do wonderfull coding on a monday
 
Last edited:
Back
Top Bottom