Hi! I've two tables: "Users" and "applicant".
I've configured that after successful registration, it will add the newly added userID into applicant.UserID table.
I want to configure that when the user login, it will redirect to the edit page of "applicant" with the correct ID reference.
I modified the code on the phprunner help page to get this:
global $dal;
$tblUsers = $dal->Table("appplicant");
$rs = $tblUsers->Query("UserID='".$username."'","");
$dat = db_fetch_array($rs);
//** Redirect to another page ****
header("Location:applicant_edit.php?editid1=".$dat["RegID"]);
exit();
RegID is the primary key of "applicant" table. While UserID is the username field in "applicant" which the userID was added after successful registration.
The code gives the following error after the user login: Fatal error: Call to a member function Query() on a non-object in C:\xampp\htdocs\admit\include\events.php on line 57
I'm not sure if that is the correct code. Any help would be greatly appreciated! Thanks in advance!