Faqts

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

19 of 29 people (66%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

Why does when I write stg like <A href="b.php?parm=myparm"> in a html, the $parm var is void in b.php script? it should be $parm="myparm" isn't it
I'm just trying a simple link between a html file and a php script with an url get method. http_get_
Thanks a lot Mike. It works fine now.
Just a question yet: what's the meanning of the
two dots before and after get_vars in your example?

Sep 12th, 2009 18:03
forum net tr, Jason David, seo webmaster, osama said, i can do it, Mike Boucher, Dom Galli, http://www.videotrtube.com


Right, so in the html file you have a list of links that pass $parm to 
b.php
<A href="b.php?parm=lazy">lazy</A><BR>
<A href="b.php?parm=fierce">fierce</A><BR>
<A href="b.php?parm=fat">fat</A><BR>
<A href="b.php?parm=old">old</A><BR>
. . . . more content etc. . . .
Then lets say in your b.php file you simply want to print $parm to 
the browser, have a function that uses $parm in a sentence and 
also prints the new sentence to the browser.
<?
     echo  "This is the original value passed: 
".$HTTP_GET_VARS["parm"]."<BR>";
function myParmFunction()
{
global $HTTP_GET_VARS;
     echo "This is the new string using the variable parm. The red 
fox jumped over the ".$HTTP_GET_VARS["parm"]." brown dog.";
}
    myParmFunction(); 
?>
If you were to click on the link "lazy" then b.php would produce:
This is the original value passed: lazy
This is the new string using the variable parm. The red fox jumped 
over the lazy brown dog. 
Hope this clears it up for you.
Good Luck!
--------------
If you are using $parm inside of a function then you have to declare 
it as a global variable. Also try $HTTP_GET_VARS["parm"].
Good Luck!
full program full oyun http://www.forumnettr.com
full forum http://www.forumnettr.com/forum 
secilmis youtube videolari http://www.youtubevideolari.net youtube videos
online video tr tube http://www.videotrtube.com
firmalar sirketler rehberi http://www.sirketfirmarehberi.com firma
sirket rehberi adres telefon bilgileri