Question RE: fetch_row() output?
Posted: Mon Jun 18, 2007 5:22 am
I keep getting the error above from my sendValidationEmail() function.Parse error: syntax error, unexpected '[', expecting T_STRING or T_VARIABLE or '{' or '$' in /home/creative/public_html/demo1/scripts/validate.class.php on line 193
I'm trying to output content from the database using the $row[''] method but i assume its not likeing the braces i am using to output. Could someone shed some light on this for me? Thanks...
Code: Select all
private function sendRequestEmail($value)
{
$results = $this->mMysqli->query('SELECT * FROM users '.
'WHERE email = "'.$value.'"');
$row = $results->fetch_row();
$time_of_enquiry = date('r');
$recipient = $value;
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\n";
$headers .= "X-Mailer: php\n";
$headers .= 'IPI';
$subject = "Username and Password Request from IPI";
$mail = '
Dear IPI Memeber,
You requested to know your username and password, these are below
Username:'.$row['username'].'
Password:'.$row['password'].'
Regards,
IPI
';
$result = mail($recipient, $subject, $mail, $headers);
}