Jump to content

Newbie - code problem with Janet Valades PHP & MySQL for Dummies Editon 3


mitchellyachting

Recommended Posts

Hi,

 

I have learn't a lot from this site and from Janet Valades book so I am hoping someone can help me with this problem I have been hitting the wall on for 2 days.

 

Firstly the environment. I am running php version 5.2.6 with Apache 2.2.9 and MySQL 5.0.67 on Windows XP Professional with SP3 installed.

 

Now the application form the book.

 

Basically a user enrolls in a site with from a php program called login.php. This uses login_form.inc. When everything is filled in the program inserts a row into a MySQL database then calls another php program called new_member.php. This is called by header("Location: New_member.php"); at the end of the login.php file. The new_member.php originally did not run and after a lot of hacking around I commented out the following snippet:-

 

  /*if (@$_SESSION['auth'] != "yes")                      {

    header("Location: login.php");

    exit();

  } */

 

And after that the new_member.php ran. Basically two Session variables $_SESSION['auth']="yes"; & $_SESSION['logname'] = $loginName; should be passed to New_member.php from login.php to enable it to pass the test that I had to comment out and to display the user name of the new member.

 

This is not happening and there is no help in Janet Valades book as to why.

 

I have attached Login.php and new_member.php.

 

I really hope someone can help me on this as I am totaly stuck now.

 

Thanks in advance.

 

Craig

 

[attachment deleted by admin]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.