Thundarfoot Posted February 3, 2008 Share Posted February 3, 2008 I am a noob, building a script. I would like to be able to use the url line to assign a variable. Can anyone show an example of how to make $cn get its numerical value from the url line? Thanks! Quote Link to comment Share on other sites More sharing options...
trq Posted February 3, 2008 Share Posted February 3, 2008 <?php if (isset($_GET['cn'])) { $cn = $_GET['cn']; } ?> Quote Link to comment Share on other sites More sharing options...
Thundarfoot Posted February 3, 2008 Author Share Posted February 3, 2008 forgive my ignorance, but how would I type the url to pass that value? mypage.php<variable> Quote Link to comment Share on other sites More sharing options...
trq Posted February 3, 2008 Share Posted February 3, 2008 http://site.com/page.php?cn=foo Quote Link to comment Share on other sites More sharing options...
Thundarfoot Posted February 3, 2008 Author Share Posted February 3, 2008 many thanks 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.