Help get this topic noticed by sharing it on Twitter, Facebook, or email.
I’m damn angry and frustrated

PHP & MySQL 2nd Edition: Chapter 2 - Broken Scripts??

I cannot get the Chapter 2 scripts working for the "PHP Talks Back" section. Specifically, the "sayHelloWeb.php" does not echo the input (your name) from the "sayHelloWeb.html" script. I've pored over both scripts in both the 1st and 2nd edition versions. I've typed them out using exactly what is in the book in the WAMP64 "www" folder and verified that all the files paths, etc are correct. I simply can't get it to echo. Online searches have been of little help. I've exhausted myself looking for a solution. Any help would be greatly appreciated. Thanks.
1 person has
this question
+1
Reply
  • Hi,

    I just tried that example on the XAMPP server on my Mac and I was able
    to get that example to work.
    I would recommend downloading the example code that is already typed out, because that spares the possibility of typos, etc.
    You can download the code for that book from here -
    https://resources.oreilly.com/example...
    Please let me know if you still have trouble when using the author's code.

    Please let me know if you have any further questions.

    Best regards,
    Chris Olson
    O'Reilly Customer Service
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned

  • I’m relived
    I figured out my two mistakes. First, I was opening sayHelloWeb.html file by navigating to it from my PC. I was doing that because I could not navigate to it from the "localhost" homepage in WAMP. After a little research into that, it turns out that WAMP uses the wrong URL. It tries to http://ch02/ which returns a "Can't Find Page" error. But if I change the URL to http://localhost/ch02 and hit enter, WAMP not only finds but shows the contents of that directory. From there, I can click on the sayHelloWeb.html file and it works fine (submitting returns my name).

    Thanks for your help, though. I really appreciated the quick response.

    P.S. the sayHelloWeb.php file does have an error but it's innocuous (a useless ""). Your link takes you to that form, which seems to be the same as those found here: http://www.oreilly.com/pub/missingman....
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned

  • I’m relived
    *a useless "left angle bracket forward slash FORM right angled bracket" - glad to see you're using data validation :)
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned