SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Mar 2002
    Location
    Oklahoma City
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Query String problems

    I'm trying to get query strings to work using Chapter 3 in Kevin Yank's book. When I copy the example files to my hosting service, they work just fine. But when I copy them to the folder that is localhost on my development system, the variable doesn't get passed.

    My development system is WinXP with Apache 2.0 and PHP 4.3.1.

    One of the examples that doesn't work on my development system is:

    welcome.html:
    <html>
    <head>
    <title> Query String Link Example </title>
    </head>
    <body>
    <a href="welcome.php?name=Kevin"> Hi, I'm Kevin! </a>
    </body>
    </html>

    welcome.php:
    <html>
    <head>
    <title> Query String Link Example </title>
    </head>
    <body>
    <?php
    echo( "Welcome to our Web site, $name!" );
    ?>
    </body>
    </html>

    When I go to welcome.html and click on the link to welcome.php, welcome.php appears displaying the following:

    Welcome to our Web site, !

    Since this works okay on my hosting service's server but not on my development server, I figure the problem must be with my installation or configuration of Apache 2.0 or PHP 4.3.1.

    Any suggestions will be very greatly appreciated!

    Ken Elder

  2. #2
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that book causes so many problems. ugh. he doesn't use the now proper way to access variables. see my PHP and MySQL coding tips thread, particularly the register_globals section there at the top.
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR


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
  •