carbide20 Posted December 16, 2007 Share Posted December 16, 2007 Hi, I'm new to php - basically I'm trying to call a php file and pass it a variable. like if this was test.php: $var1; echo $var1; and I was trying to call that in an html file somewhat like this and pass it $var1: <a href="test.php?$var1='hello'>pass hello to test.php</a> how might I go about doing that? Quote Link to comment Share on other sites More sharing options...
teng84 Posted December 16, 2007 Share Posted December 16, 2007 you have to use GET variables eg.. teng.php?x=cool echo $_GET['x']; // give you cool Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.