nerves — 2013-10-11T04:18:23-04:00 — #1
I'm having a problem with this same example. I'm on a mac and set up my server with MAMP as outlined in the book. I was able to successfully complete the "today" example from chapter 1 but with this example when I type the URL into my browser (http://localhost/name.html) all I get is a page of code:
<title>Query String Link Example</title>
<p><a href="name.php?name=Kevin">Hi, I’m Kevin!</a></p>
I copied the code from https://github.com/spbooks/PHPMYSQL5/tree/master/chapter3/links1 and pasted them into text edit files and saved them as name.html and name.php.html in the htdocs folder in the MAMP folder in Applications.
starlion — 2013-10-14T08:37:39-04:00 — #2
Well the second file in the location you linked to is called name.php, not name.php.html...
nerves — 2013-10-14T11:58:06-04:00 — #3
Thanks. I ended up downloading the files from github but still had problems. I guess the server kept accessing the old html file even though I moved it to the trash. Once I emptied the trash folder it used the new file. I'm guessing the reason it didn't work in the first place was because I used textedit to create the html file. I'll use textwrangler for html and netbeans for php from now on.