You are currently viewing the BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 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
hello every body, i am continuously having problem with chaptar 11
register.php. i am using iis in xp. i can connect with my mysql
database named "sample_db". user name "phpuser" and password "phppass"
though i have copied all files from chapter11 source folder to wwwroot.
i can open the file register.php without having any problem. but when i give some input and press submit, nothing have happened. no error message or confirmation of creating the user. i also submit the page without filling any input field. thus a error page should be displayed. but nothing happens. what can i do now? could any body please help me?
please. i am looking forward to someone's help. please help me.
stefanocinfo has overcome the problem by changing the way the switch works. He's saying if there is $_POST['action'] then it must be "register". That's OK in this case but in a more general case there could be more than one value for $_POST['action'] so more than one case within the switch.
The real cause of the problem is on page 436 - two lines from the bottom:
<input type="hidden" name="action">
this sets $_POST['action'] but leaves the value NULL
it should be
<input type="hidden" name="action" value="register">
Me too... I have a problem here in Chapter 11 in Beginning PHP5. Every I execute the sample code of the chapter it will appear an error message, states that there was an error in this code.: