SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jul 2007
    Location
    Eastbourne on the English South Coast
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Kevin's PHP & MYSQL book

    I have cherry picked Kevin's book to good effect and I am pleased with the start I have made in converting my website to have dynamic pages. I am now going through the book systematically and running many of the examples on my ISP's server to get a better understanding of some of the more tricky bits. My ISP runs PHP Version 4.3.10 and I've know I've got the connection and database details correct because most of the examples are working so far. ...BUT! in samplepage.php, in challenge.php and in jokes.php the input form comes up correctly but when I type in a name and click on "GO" the computer just hangs. I have checked that $_SERVER['PHP_SELF'] does return the URL of the current page but beyond that I am a newby lost in PHP city. I must have missed something obvious...please will someone point out what it is? Best wishes.......Trevor

  2. #2
    SitePoint Member
    Join Date
    Jul 2007
    Location
    Eastbourne on the English South Coast
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Red face Think I have found it - but don't know why!

    The PHP variable has to be $_SERVER["SCRIPT_URI"] rather than $_SERVER["PHP_SELF"] to work for me. I seem to need the full path and $_SERVER["PHP_SELF"] only gives the last part of the path.

    Thanks for your patience - I probably would not have worked it out if I had not spelt out the problem fully in this forum. Best wishes.......Trevor


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
  •