SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Nov 2012
    Location
    Canada
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    The Issue of HTML form calling PHP by using XAMPP

    I am new to PHP and learn it with the book of PHP & MYSQL NOVICE TO NINJA.

    I use XAMPP and typing the name.html and name.php two files from the page of 72 of the book. And I placed the two file at C:\xampp\htdocs folder.

    ----------------------------------------------------

    name.html:
    <form action="name.php method=post">
    <div><label for="name">name:
    <input type ="test" name="name" id="name"></lable>
    </div>
    <div><input type="submit" value="GO"/></div>
    </form>
    ----------------------------------------------------

    name.php:
    <?php
    $name = $_REQUEST['name'];
    if ($name == 'Kevin')
    {
    echo 'Welcome, oh glorious leader!';
    }
    ?>
    ----------------------------------------------------

    And I got the error:
    Object not found!

    The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

    If you think this is a server error, please contact the webmaster.
    Error 404
    localhost
    Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7

    ----------------------------------------------------
    I have no problems with localhost to show the other samples of the book so far, but this one.

    If anyone could help?

    Thanks,
    Linda

  2. #2
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    <form action="name.php method=post">

    SB

    <form action="name.php" method="post">

  3. #3
    SitePoint Member
    Join Date
    Nov 2012
    Location
    Canada
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great! It works now.
    Cups, thank you!!
    Lnida


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
  •