Jump to content
Larry Ullman's Book Forums

confusion about logout.php


Recommended Posts

Dear sir,

First of all i am big fan of your work. i purchased almost all your books on PHP and MySQL. I am post graduate doctor (MD - Biochemistry) from India and by reading your books i created intranet based 'laboratory information system' for electronic blood lab reports.

i Have one confusion in your logout.php script (chapter - 4). -> what is the need of require(MYSQL); line???? without this line also this should work fine.

Edit: Immedietly after posting above question i realized that MYSQL is required as content in sidebar needs it to query the database.

But i have new confusion as mentioned below

 

When i log out and redirected to index.php. but when i refresh that logged out page i am being redirected to http://http//localhost/ecommerce1/index.php and of-course this address is wrong so my browser displays server not found error.

Thank you

Edited by Kalpeshkumar
Now i know the answer but have another confusion
Link to comment
Share on other sites

Thanks so much for the nice words. I really appreciate it. Kudos for figuring out the MySQL question! As for the redirect it sounds like you just have a bug in your code somewhere. Find the redirect line and see that you aren't adding an extra "http//" somewhere. 

Link to comment
Share on other sites

Thank you sir for prompt reply.

I am using xampp and changed confing.inc.php file

earlier i used define('BASE_URL', 'http://localhost/ecommerce1/');

i had replaced above line with define('BASE_URL', 'localhost/ecommerce1/'); and voila... it worked. as our defined function redirect_invalid_user($check='user_id', $destination='index1.php', $protocol='http://') is also adding http://

 

Thanks larry for help. You are awsome

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...