This is the forum to discuss the Wrox book Professional PHP5 by Ed Lecky-Thompson, Heow Eide-Goodman, Steven D. Nowicki, Alec Cove; ISBN: 9780764572821
Read more about Professional PHP5 or buy the book from your favorite retailer
You are currently viewing the BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
This is a relatively old post, but I just recently started to use this book and found the same errors listed here. Is there anyone out there who can help?
I suspect part of the problem is in the Code:
if(!isset($userid)) {
login_form();
exit;
I think the $userid should be $_POST['userid']
Also there is a problem in the SQL statement for:
$query = "SELECT username FROM $user_tablename
WHERE userid = '$userid'
AND userpassword = password('$userpassword')";