Jump to content
Larry Ullman's Book Forums

nadi

Members
  • Posts

    4
  • Joined

  • Last visited

nadi's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thanks for the info and suggestion. I chose not to let the users bookmark. POST is a little more secure than GET (GET allows bookmarks) and security is a priority because our server attracts a lot of hackers. I added this code to the pages. I could have just redirected them but I wanted the visitor to know why they were not able to access the page and so I did it this way. if (empty($_POST)) { echo 'You must log into the ...... Internship site. <br />'; echo '<a href="login.php"> Login page</a>'; exit; }
  2. The global error handler has been working fine but some of my users seem to be bookmarking the search pages and then when they reload the page, errors are generated. Is there any way to 1) stop them from bookmarking, or 2) filter out errors caused by bookmarking. Using PHP 5.2.14 and MySQL 5.1.56. I am using Sessions and POST. The user uses the search form to generate a list of jobs (page 1); then each job entry has a link to a longer description (several different page 2's). Thanking you in advance for any help you may give.
  3. Solved. Thanks for the suggestion! On login_page.inc.php, I changed my code to : include_once ('../includes/config.inc.php'); require_once (MYSQL); There was a side effect of this code change in my site. My login page has a limited number of users and so I have a select box of user's names which is queried from the database. If someone puts in the wrong password, Larry's original script shows the error and then below it the form again. Well, my form displayed but the select box collapsed because it needed a MySQL connection but can no longer get it because of the "require_once." So I replaced the display of the form with a link "back" to the original page. I mention this for any other newbies out there.
  4. I also want to echo the applause for this book. I can find bits and pieces on the web; the php manual is great BUT if you are new to the topic (like me) and have no context, no understanding why to do these things this way and how to put them all together, it is a very painful trial and error. So thanks, Larry! I have set up my error_handler in config.inc.php. It is working fine except with my login script (Chap. 12). I am using login_functions.inc.php (Script 12.2) and the errors are not printing to the screen. Instead I get this error message. Fatal error: Cannot redeclare my_error_handler() (previously declared in C:\wamp\www....\includes\config.inc.php:45) in C:\wamp\www\...\includes\config.inc.php on line 75 The function check_login() is being used. I do get content into errors array. I did do a var_dump of the errors array and did check that. But I don't know why it is causing the error. I don't see where I have redeclared my_error_handler(). Thank you for any help you may give. N.
×
×
  • Create New...