Page 1 of 1

what is wrong in this

Posted: Sun Oct 25, 2009 3:52 am
by Naeem
what is wrong in this i couldn't find any mistake in this it's give me this error.
Parse error: parse error, unexpected T_STRING in C:\EasyWAMP\www\funapnaapna\inc\functions.php on line 4
here is the code:

Code: Select all

<?php
session_start();
include("../inc/connection.php");
include("../inc/functions.php");
$username = cleanString($_POST['username']);
$password = cleanString(md5($_POST['password']));
$checking_admin_account = ("SELECT admin_username,admin_password FROM administrator WHERE admin_username = '$username' AND admin_password = '$password' ");
$retrieving_admin_account = mysql_query($checking_admin_account);
$$retrieving_admin_account_row = mysql_num_rows($retrieving_admin_account);
if($retrieving_admin_account_row == 1){
    $_SESSION['username'] == $username;
    $_SESSION['loggedin'] == "loggedin";
    header("Location: index.php");
} else {
    $common_error("Wrong Username OR Password");
}
?>
And this is functions.php file

Code: Select all

<?php
function cleanString($clstr)
{
    $cstr = trim($clstr);
    $cstr = htmlspecialchars($cstr);
    $cstr = addslashes($cstr);
    return $cstr;
}
?>

Re: what is wrong in this

Posted: Sun Oct 25, 2009 8:03 am
by markusn00b
Very strange - I don't see an error either.. nor does PHP pick it up.