SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist
    Join Date
    May 2005
    Location
    Houston, Texas, USA
    Posts
    418
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [QUOTE=Mittineague]Can't you just use a GET variable

    Quote Originally Posted by Mittineague
    Can't you just use a GET variable like
    http://domain.com/rooms/house.html?rooms=variable
    Dear Mittineague-- I was looking through the forum and happened upon this. I wonder if you could give me an example of what the code might look like that would display a page with the above link. It would be php, no? I'm familiar with php, but not asp. I wasn't sure if starting a new link for this was appropriate, but I did anyway

    by the way, that js calendar works just fine now--thanks! I think I was having an xhtml conflict too.
    Opportunity favors the prepared mind.

  2. #2
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Private messages are there for a reason...

  3. #3
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,161
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)

    GET vars

    ...... when the forum member has their PM feature enabled

    I think in that thread the OP was trying to link to a site that most likely is using Apache to use the variable in the URL to go to a specific page.
    How to use GET variables? I wouldn't use them for anything sensitive to attact or criticaly essential. But you could do a redirect or content load dependent on them. Maybe something like
    PHP Code:
    <?php
    $var 
    $_POST['variable'];
    header(location: ./folder/$var\.php);
    or
    PHP Code:
    <?php
    $var 
    =  $_POST['variable'];
    ....
    echo 
    "<img src='./images/" $var "' />";

  4. #4
    SitePoint Evangelist
    Join Date
    May 2005
    Location
    Houston, Texas, USA
    Posts
    418
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you so much, and also thanks for your comment about the PM (because I did check that first).
    Opportunity favors the prepared mind.


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
  •