...

View Full Version : Parse Error in the "return header" line



Philosophaie
03-01-2012, 09:20 AM
I keep getting a parse error in the "return header" line. I can not see it. Maybe you can.


Parse error: syntax error, unexpected T_STRING in /path/file.php on line 15


function securityid() {
$urlsec = $_GET['sec'];
$conn = mysql_connect('localhost', 'rubeum', 'electrical0248');
mysql_select_db('rubeum_astronomy');
$sqli = "SELECT `index` FROM `security`;
$resulti = mysql_query($sqli, $conn);
$indexi = mysql_fetch_array($resulti, MYSQL_ASSOC);
$indexurl = FALSE;
foreach ($indexi as $urlsec) {
$indexurl = TRUE;
}
if ($indexurl == FALSE){
return header("Location: http://www.site.com/index.htm");
}
mysql_close($conn);
}

>ssp-cdr<
03-01-2012, 09:35 AM
It's the $sqli = "SELECT `index` FROM `security`; line that is probably causing the problem. No " at the end.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum