Alright... I've been futzing with this all night without getting it to work. I keep getting a parse error on line 28 (in case you're wondering, it's the line that contains the "?>" tag in the php file. Here is the complete php code. Any suggestions?
I've changes the mySQL login stuff for security reasons (obviously), but I'm certain that's not the issue.
<?php
require("functions.php");
$login_done = $loglib->logged_ok();
if (!$login_done) {
echo "You are not logged in. Login and try again.";
exit;
}
else {
mysql_connect("localhost", "db_user", "db_pass");
mysql_select_db("database");
$query = mysql_query("select data.name from data where data.id = $login_done[1]);
$name = mysql_fetch_row($query);
mysql_close();
echo $name;
exit;
}
?>
Thanks in advance for your help!