JSHINER Posted November 13, 2007 Share Posted November 13, 2007 <iframe src="http://www.site.com/page.php?id=000017" frameborder="0" scrolling="no" height="290" width="310"></iframe> I get the 000017 in there with a variable, and in the code it shows up correctly - but for some reason the iframe does not pull it up. Any idea why? Quote Link to comment Share on other sites More sharing options...
btherl Posted November 13, 2007 Share Posted November 13, 2007 Do you see it in the HTML source when viewed in the browser? If so, it's a problem in your page.php script. FYI, your description is a little vague. What does "does not pull it up" mean? Do you see nothing in the iframe? Do you see the wrong content? Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted November 13, 2007 Share Posted November 13, 2007 Is your "id" variable defined and/or is your mysql accurate? Quote Link to comment Share on other sites More sharing options...
JSHINER Posted November 13, 2007 Author Share Posted November 13, 2007 Yes I see it in the HTML code - sorry for a vagueness $page['var'] = get($db, $_GET['id']); That's the code from the page. When I view the source of the iframe I only see page.php?id= - the id does not show up. Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted November 13, 2007 Share Posted November 13, 2007 try this: page.php?id=<?php echo $_GET['id']; ?> and see if that helps. use this if your pass the id with a string. Quote Link to comment Share on other sites More sharing options...
JSHINER Posted November 13, 2007 Author Share Posted November 13, 2007 It shows up fine the HTML code. Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted November 13, 2007 Share Posted November 13, 2007 is your mysql or sql correct Quote Link to comment Share on other sites More sharing options...
JSHINER Posted November 13, 2007 Author Share Posted November 13, 2007 Yes. As far as I know. When I call up the page outside the iframe it works fine with page.php?id=0017 Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted November 13, 2007 Share Posted November 13, 2007 is your frame target set? by this I am assuming you are pass the variable in a query string to your iframe - right? Quote Link to comment Share on other sites More sharing options...
JSHINER Posted November 13, 2007 Author Share Posted November 13, 2007 <iframe src="http://www.site.com/page.php?user=<?php echo $_SESSION['id']; ?>" frameborder="0" scrolling="no" height="290" width="310"></iframe> Which displays in the HTML as <iframe src="http://www.site.com/page.php?user=17" frameborder="0" scrolling="no" height="290" width="310"></iframe> But nothing comes up in the iframe. And when I go to http://www.site.com/page.php?user=17 the page comes up fine. Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted November 13, 2007 Share Posted November 13, 2007 do you have a url; I could test or code I can review? Quote Link to comment Share on other sites More sharing options...
JSHINER Posted November 13, 2007 Author Share Posted November 13, 2007 <?php function get($db, $id = false) { $arr = $db->getArray("SELECT . . . "); return $arr; } $db = new Database(); $page = array(); $page['id'] = get($db, $_GET['id']); $db->close(); ?> Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted November 13, 2007 Share Posted November 13, 2007 see if you can do this in one page: <iframe name="myframe" src="http://www.site.com/page.php" frameborder="0" scrolling="no" height="290" width="310"></iframe> <br><br> <a href="http://www.site.com/page.php?user=17" target="myframe">User 17 Wants In</a> just for testing purposes - see if this works........... Quote Link to comment Share on other sites More sharing options...
JSHINER Posted November 13, 2007 Author Share Posted November 13, 2007 That worked . Quote Link to comment Share on other sites More sharing options...
JSHINER Posted November 13, 2007 Author Share Posted November 13, 2007 Ok great I wasn't going crazy here - there was apparently another "id" on that page which conflicted with the second one. Changed to "ida" and it worked great. Sorry about that Long day. Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted November 13, 2007 Share Posted November 13, 2007 no worries - glad you figured it out - good luck 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.