AJxr Posted August 1, 2009 Share Posted August 1, 2009 hi all, im a super newb. ive been reading for a couple days now and i just cant find my problem. i have a movie website with a simple database using mysql and php etc. ive tried searching here but my terminology just isnt up to par i guess. anywho i have hosting with nexcess.net and it uses php 5.2.6... etc.... my problem is that i cannot get the variable (ie. page.php?id=2) to show up on the website page. even when i use this code to test. <?php print "the id is $id<br>\n"; ?> im trying to select data from tablex WHERE id=$id. if i type select * from tablex WHERE id=2 instead of the variable $id (when the browser says page.php?id=2) the info comes up. sorry for the confusion if any but my little head hurts from trying to figure this plain old stuff out. Link to comment https://forums.phpfreaks.com/topic/168353-solved-variable-wont-show-up/ Share on other sites More sharing options...
trq Posted August 1, 2009 Share Posted August 1, 2009 Variables passed through the url show up within the $_GET array. eg; print "the id is {$_GET['id']}<br>\n"; Link to comment https://forums.phpfreaks.com/topic/168353-solved-variable-wont-show-up/#findComment-888054 Share on other sites More sharing options...
AJxr Posted August 1, 2009 Author Share Posted August 1, 2009 SOLVED, thank you for your time!! Link to comment https://forums.phpfreaks.com/topic/168353-solved-variable-wont-show-up/#findComment-888056 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.