Jump to content

amy.damnit

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Everything posted by amy.damnit

  1. Hi all! Well, after a 7 month sabbatical, I'm back to trying to learn PHP. Unfortunately, one of my first real PHP programs won't even run?! What a horrible way to get started. I'm using Larry Ullman's "PHP for the World Wide Web, 2nd Edition". He has a simple form that you fill out (i.e. "feedback.html") which is then supposed to launch a simple screen (i.e. "handle_form.php") printing what was entered. When I click on the "Send My Feedback" button, I get this... "; ?> Here are my two files... feedback.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Feedback Form</title> </head> <body> Please complete this form to sumbit your feedback: <br /> <!-- Added Form Attribute: method="post" --> <form action="handle_form.php" method="post"> Mr. <input type="radio" name="title" value="Mr." /> Mrs. <input type="radio" name="title" value="Mrs." /> Ms. <input type="radio" name="title" value="Ms."> <br /> Name: <input type="text" name="name" size="20" /> <br /> Email Address: <input type="text" name="email" size="20" /> <br /> Response: <select name="response"> <option value="excellent">This is excellent.</option> <option value="okay">This is okay.</option> <option value="boring">This is boring.</option> </select> <br /> Comments: <textarea name="comments" rows="3" cols="30"></textarea> <br /> <input type="submit" name="submit" value="Send My Feedback" /> </form> </body> </html> handle_form.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Your Feedback</title> </head> <body> <?php // This page receives data from the Feedback Form // It will receive: Title, Name, Email, Response, Comments, and Submit print "Thank you {$_POST['title']} {$_POST['name']} for your comments. <br />"; ?> </body> </html> The whole point of this exercise in the book was to show you how to work with Displaying Errors (i.e. 'display_errors=on' ), Error Reporting (e.g. 'error_reporting (E_ALL)' ) and The Register Globals Problem. I was originally doing this in NetBeans 6.5, but when I couldn't get anything working, I dumped each file in my Web Root Directory and just started using TextEdit, but to no avail?! I also played around substantially with my php.ini file, and I honestly could see where turning register_globals from "Off" to "On" solved anything?! He was showing how something like: print "Thank you $title $name for your comments. <br />"; worked when register_globals=On, but how you needed: print "Thank you {$_POST['title']} {$_POST['name']} for your comments. <br />"; when register_globals = Off I am soooo frustrated right now. I can't believe something so simple is so difficult for me to undestand and get working?! Any help would be appreciated! Sincerely, Amy
  2. Oh, I know it is a life-long pursuit, but at the same time, good "tools" can help get a person up-to-speed quicker. (This I know from experience.) It seems to me that being able to "step-through" code and trace variables is an enormous help, no?! I have done quite a bit of Access/VBA, and I know the IDE/Debugger that comes with MS Access has been a life-saver for me, so I was looking for something similar with PHP for Mac. My Eclipse PDT supposedly has a "Debugger", but I don't see how it works... Amy
  3. I am new to PHP, but eager to become a "pro" ASAP! What does everyone think about using an IDE with PHP? What tools do you use? I installed Eclipse PDT All-In-One on my MacBook. I am getting the hang of it, but it still doesn't seem as user-friendly as the code editors/IDE I'm used to in the Microsoft world. *sigh* It is also frustrating in that there aren't any active and dedicated forums on Eclipse PDT, so I am hoping my fellow PHP developers can help guide me. Happy Holidays, Amy
  4. I am trying to learn PHP, but first want to set up an IDE on my MacBook, because others have said it will speed up the learning process. I installed Eclipse PDT All-In-One v2.0.0M2 and it seems to work, but the "code completion" and "function list" features don't work. Without those features working, I might as well use TextEdit?! What am I doing wrong?? Thanks, Amy
  5. Hi, this is my first post on PHPFreaks. I am a beginner to PHP and would like to know what PHP Editors people use? (I have been told that a good editor can make your life easier - especially as a beginner.) My platform is OS X on a MacBook and MAMP. A free editor woud be preferable since I don't know how far this endeavor will go?! :-\ Thanks, Amy
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.