Pass Variable to New Window

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jongyoo
    New Member
    • Jul 2005
    • 3

    Pass Variable to New Window

    Hey guys, I was doing some mysql database stuff and I wanted to have a pop up window with some other forms on it.

    The problem I'm having is that I have no clue how to pass a variable for PHP to retrive from the page before. I know I can do a "GET" method to put the variables in the URL but I don't think you can get that variable with PHP.

    Anyone know a loop hole around this? :confused:

    Thanks alot
  • Niheel
    Recognized Expert Moderator Top Contributor
    • Jul 2005
    • 2432

    #2
    Your question was a bit unclear, but i took a shot at it.


    Yes, you can access the GET variables via php.

    if your url is:


    then in your php file you can access this variable in the following method.

    Code:
      
    <?
    $access_variable = $_GET['variable'];
     
    // $access_variable should now be "vavoom"
    ?>
    niheel @ bytes

    Comment

    • srijan2005
      New Member
      • Apr 2007
      • 4

      #3
      Your first page should be
      <a href="page.php? message=hi">Mes sage</a>

      then create a new page name page.php
      then give there the following code....
      <?php
      echo $_GET['message'];
      ?>
      Hope ur code will run properly.

      Comment

      Working...