RE: [PHP-WIN] One link - two changes

From: Date: Thu, 08 Mar 2001 20:20:54 +0000
Subject: RE: [PHP-WIN] One link - two changes
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-5887@lists.php.net to get a copy of this message
At 04:35 PM 3/8/01 +0000, Daniel Furse wrote:
Both new pages are PHP scripts, and I need to pass a value to each one. How can I do this, given that the link is implemented generally like this: window.open("http://www.devshed.com/popup.html".... Or similar... Can I pass the new PHP script a value like www.domain.com/test.php?value=something I'm not using PHP in CGI mode, so I guess probably not. In short, how do I pass a value without using a form?
YES, you can do this. Whether or not you are in CGI mode, PHP will parse the parameters. You can use $value or $QUERY_STRING or $argv or .... Here is a really neat program to help you see what is in the PHP GLOBAL variables..... ________cut here__________________ <H2>PHP</h2> <table> <tr><td align=right><b>$GLOBALS<td>value <tr><td colspan=2><hr> <?php foreach ($GLOBALS as $k => $v): echo "<tr><td valign=top align=right>\$$k<td valign=top>= $v "; if (gettype($v)=='array' and $k != 'GLOBALS')
    foreach ($v as $k => $i)
      echo "<br>$k = $i ";
endforeach; ?> </table> ________________________________
John Henckel          alt. mailto:henckel@iname.com
Zumbro Falls, Minnesota, USA (507) 753-2216 http://geocities.com/jdhenckel/

« previous php.windows (#5887) next »