Results 1 to 6 of 6

Thread: Passing variable to html pages

  1. #1
    Registered
    Join Date
    Jul 2005
    Posts
    43

    Passing variable to html pages

    Hello,
    hope this question doesn't sound stupid :
    how can i pass a variable from an html site to another (apart from using forms) something like site.html?variable=sometext and how can i display this variable in an html file?
    I am using mostly php (echo or print) but how can i do this in simple html??????

  2. #2
    Sean
    Join Date
    Nov 2005
    Posts
    139
    I don't think you can because the variable is only in the PHP... don't quote me on this thought because I'm always learning new stuff you can do with PHP.

  3. #3
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,055
    You can't, HTML does not contain the ability to parse a variable out from a query string.

    What you can do is setup your server to parse .html files as PHP code. This would allow you to keep the .html extension but use PHP within the file.
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

  4. #4
    Registered intelliot's Avatar
    Join Date
    Jul 2004
    Posts
    309
    In addition to what Chris said, I think it's also possible to use those variables in Javascript. Of course, it would all be done client-side.
    Elliot Lee
    Google Forums - Community for Google Fans!

  5. #5
    4x4
    Join Date
    Oct 2004
    Posts
    1,043
    Why does it have to be .HTML why not just convert to .PHP or do what Chris said?

  6. #6
    Registered
    Join Date
    Jul 2005
    Posts
    43
    Quote Originally Posted by ToddW
    Why does it have to be .HTML why not just convert to .PHP or do what Chris said?
    Because the landing page is not mine (is on different server). I think it is what Chris said. I have to look into that this way ...

Similar Threads

  1. Large Number of low PR pages v's fewer pages with higher PR
    By Blue Cat Buxton in forum Search Engine Optimization
    Replies: 4
    Last Post: 12-21-2004, 06:40 PM
  2. Creating centrered HTML pages with Fireworks (MX)
    By reinh in forum HTML, CSS, Layout, and Design
    Replies: 0
    Last Post: 09-15-2004, 08:04 AM
  3. SEO paying someone to do it.
    By jr1966 in forum Search Engine Optimization
    Replies: 21
    Last Post: 09-08-2004, 06:21 AM
  4. E-mailing html pages (not links or attachments)
    By Kenny L in forum HTML, CSS, Layout, and Design
    Replies: 2
    Last Post: 08-24-2003, 02:55 PM

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
  •