Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5
This is the forum to discuss the Wrox book Beginning PHP4 by Wankyu Choi, Allan Kent, Chris Lea, Ganesh Prasad, Chris Ullman; ISBN: 9780764543647
Welcome to the p2p.wrox.com Forums.

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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 10th, 2005, 09:57 AM
Registered User
 
Join Date: Mar 2005
Location: Dhaka, , Bangladesh.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to tanvir_math Send a message via Yahoo to tanvir_math
Default does not work register.php in ch 11 begining php5

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.
Reply With Quote
  #2 (permalink)  
Old September 10th, 2005, 03:17 AM
Registered User
 
Join Date: Sep 2005
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

My solution at your problem is to add, before the last "switch" code, this:

else $_POST['action'] = "register";

Infact this specify another condition of "action".

With this code I have resolved this problem, that It was been my problem too.

Bye



Reply With Quote
  #3 (permalink)  
Old December 22nd, 2006, 09:10 AM
Registered User
 
Join Date: Dec 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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">



Reply With Quote
  #4 (permalink)  
Old February 7th, 2007, 04:03 PM
Registered User
 
Join Date: Feb 2007
Location: Davao City, , Philippines.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.:

<?php
for($i=0; $i < count($position_array); $i++){
   if(!isset($userposition) && $i == 0){
     echo "<OPTION SELECTED VALUE=\"". $position_array[$i] . "\">" . $position_array[$i] . "</OPTION>\n";
   }else if($position == $cposition_array[$i]){
     echo "<OPTION SELECTED VALUE=\"". $position_array[$i] . "\">" . $position_array[$i] . "</OPTION>\n";
   }else{
     echo "<OPTION VALUE=\"". $position_array[$i] . "\">" . $position_array[$i] . "</OPTION>\n";
   }
}
?>

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
begining PHP, input box dungey Beginning PHP 11 February 28th, 2012 06:03 AM
PHP5: Ch 3, p. 102-105 JaneDean BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 2 January 31st, 2007 01:15 PM
Beg. PHP 5 > Ch. 11 - fetch_field.php crater BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 January 2nd, 2007 11:20 AM
Ch 15 Register.asp query daveyarwood BOOK: Beginning ASP 3.0 0 July 16th, 2005 12:52 PM
Example 4 Ch 5 -Begining JavaScript flyn Javascript How-To 4 November 27th, 2003 03:35 AM



All times are GMT -4. The time now is 12:02 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.