#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    3
    Rep Power
    0
    Newbee question,

    Is it possible to pass a varialble to a page using just PHP/HTML.

    The object is to create a agenda page, with information comming from MySql, based on the choise of month in the index page in a different frame, i.e. the month is selected in frame 1.
    Now i want to sent the choice of the user to a page, to be shown in frame 2, that is created with PHP, and use the variable in the MySql query.

    I know this can be done using java, but i would like to avoid that.

    Hope somebody can help me out.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    63
    Rep Power
    15
    You can pass a variable in the URL of the child frame. Example:

    <a target=main href="../Home/Welcome.php?month=Jan">

    When Welcome.php loads, you'll have a variable $month that you can use in your query.

    $L_sql = "SELECT * FROM agenda WHERE month = $month";

    Good Luck

    ------------------
    ----------------------
    Ulysses J Ludwig
    Consultant
    Ujludwig@yahoo.com
    310.678.8324
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    3
    Rep Power
    0
    Yes, this works exactly like i hoped it would be possible, thank you very much, this saves me a lot of roaming source code :-)

    b.t.w. would it also be possible to pass more then one variable, lets say month #, Year # and type of agenda # or $.
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    24
    Rep Power
    0
    sure, just say:

    myPage.php3?var1=this&var2=that&var3=something

    in your php you will have the respective variables, $var1, $var2 and $var 3

Similar Threads

  1. help with assigning variables, variable passing/ retrieval
    By pinkipodmini in forum PHP Development
    Replies: 0
    Last Post: February 13th, 2004, 10:40 PM
  2. Replies: 4
    Last Post: February 13th, 2004, 04:31 PM
  3. PHP Session help...variable not passing
    By mrpilz in forum PHP Development
    Replies: 8
    Last Post: February 3rd, 2004, 10:02 AM
  4. passing array from page to page...
    By apek in forum PHP Development
    Replies: 3
    Last Post: January 30th, 2004, 03:47 PM
  5. passing the url from HTML page to a php
    By lordorkus in forum PHP Development
    Replies: 10
    Last Post: January 20th, 2004, 06:36 PM

IMN logo majestic logo threadwatch logo seochat tools logo