This topic is locked
[SOLVED]

 Redirect to edit page after login

4/30/2011 07:51:18
PHPRunner General questions
N
nwanzeo author

Hi, I have a problem trying to check if a record exist and then redirect a listpage and if not, redirect to editpage.

Please i need help. here is my code:

//********** Check if specific record exists ************

global $conn;

$strSQLExists = "select * from society_members where member_id='".$_SESSION["UserID"]."'";

$rsExists = db_query($strSQLExists,$conn);

$data=db_fetch_array($rsExists);

if($data)

{

header("Location: parishmembers_list.php");

exit();

}

else

{

header("Location: parishmembers_edit.php?editid1='".$_SESSION["UserID"]."'");

exit();

}


Thanks for your anticipated help!

Sergey Kornilov admin 4/30/2011

What exactly is the problem you having with this code? It looks good to me.

N
nwanzeo author 5/5/2011



What exactly is the problem you having with this code? It looks good to me.


The problem is that the redirect do not work. All i get is the list page.

Sergey Kornilov admin 5/5/2011

You need to troubleshoot this code. Try to print SQL query on the web page to see if this code is executed at all and if query looks right.
You can also post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.