Wrox Programmer Forums
|
BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9
This is the forum to discuss the Wrox book PHP and MySQL: Create-Modify-Reuse by Timothy Boronczyk, Martin E. Psinas; ISBN: 9780470192429
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 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
 
Old November 1st, 2009, 11:49 PM
Registered User
 
Join Date: Nov 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default ch_01 - register.php

Dear..
I need to install the system of users' Record. The question is that register.php does not give of discharge to any user .. and me a page appears in target ... how can I solve the problem? bearing in mind that I have copied the code of User.php and register.php such a which as it appears in the book..

I will be very grateful by a help..
from already thank you very much
 
Old November 3rd, 2009, 02:10 PM
Authorized User
 
Join Date: Jul 2009
Posts: 77
Thanks: 4
Thanked 6 Times in 6 Posts
Default

hi rod.jeff

I am having trouble understanding the
problem, but I will try to help.

It appears you have typed in User.php and register.php
I assume you have the other functions done?
lib/db.php
lib/functions.php which has the random_text() function
public_files/img/captcha.php
templates/template-page.php

What is in the php.error.log file?

Try putting some print statements in register.php
Here are some key places to put them. page 14
about 30 lines down.
Code:
   // otherwise process incoming data
   else
   {
Put a print statement after this to see if you are getting to
this block of code.


There is a section of code in register.php that tests 4
conditions. All these conditions have to be met before
you can get to the section where you save the user.
Code:
     // add the record if all input validates
        if (User::validateUsername($_POST['username']) && $password &&
        User::validateEmailAddr($_POST['email']) && $captcha)
Before this statement, print out each of those 4 values separately.
If any of them are not set then you need to work on getting those set.
Often times it is the captcha that gives people trouble.

In register.php the statement that saves the record to the
database is on page 15 about 11 lines down

Code:
     $token = $user->setInactive();
The setInactive function calls the save function.
Both the setInactive function and save function are in User.php.

Put in a print statement and see if you are getting to
this part of the code.

It is hard to tell what the problem is.
These are just general troubleshooting ideas to get more
information on the problem.

I hope this helps.

Last edited by kenj; November 3rd, 2009 at 02:12 PM..





Similar Threads
Thread Thread Starter Forum Replies Last Post
does not work register.php in ch 11 begining php5 tanvir_math BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 3 February 7th, 2007 05:03 PM
chapter 12 modified register.php problem GOUR CHANDRA PAUL BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 June 6th, 2006 03:41 PM
chapter 12 modified register.php problem GOUR CHANDRA PAUL BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 April 27th, 2006 02:14 PM
PHP register globals question Charagrin BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 February 6th, 2006 06:02 PM
register.php: clearing html form fields lamada BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 October 26th, 2004 01:25 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.