SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2013
    Posts
    35
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Help with Chapter 1 Novice to Ninja

    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:
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <title>Query String Link Example</title>
    </head>
    <body>
    <p><a href="name.php?name=Kevin">Hi, I&rsquo;m Kevin!</a></p>
    </body>
    </html>

    I copied the code from https://github.com/spbooks/PHPMYSQL5...hapter3/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.

  2. #2
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    69 Post(s)
    Tagged
    0 Thread(s)
    Well the second file in the location you linked to is called name.php, not name.php.html...
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.

  3. #3
    SitePoint Enthusiast
    Join Date
    Feb 2013
    Posts
    35
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by StarLion View Post
    Well the second file in the location you linked to is called name.php, not name.php.html...
    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.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •