cmgmyr Posted October 16, 2006 Share Posted October 16, 2006 Hey All,I'm sure this is really easy, but I must be missing something. I'm trying to make an ad page where it has a frame on the top with the main site logo, and the bottom frame is the actual website that the user is viewing. I want to pass a value through forward.php through to forward_bottom.phpHere is what I have so far:the link would be forward.php?ad=1forward.php: [code]<?php global $ad; ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Richmond Critic</title></head><frameset rows="150,*" frameborder="no" border="0" framespacing="0"> <frame src="forward_top.php" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" /> <frame src="forward_bottom.php?ad=$ad" name="mainFrame" id="mainFrame" title="mainFrame" /></frameset><noframes><body></body></noframes></html>[/code]forward_bottom.php:[code]<?php global $ad;//this will be where it gets the url from the database echo $ad;?>[/code]Please let me know if you need any more info.Thanks,-Chris Quote Link to comment https://forums.phpfreaks.com/topic/24101-frames-w-php/ Share on other sites More sharing options...
Daniel0 Posted October 16, 2006 Share Posted October 16, 2006 Remove [code]<?php global $ad; ?>[/code]Change [code] <frame src="forward_bottom.php?ad=$ad" name="mainFrame" id="mainFrame" title="mainFrame" />[/code]to [code] <frame src="forward_bottom.php?ad=<?php echo $_GET['ad']; ?>" name="mainFrame" id="mainFrame" title="mainFrame" />[/code] Quote Link to comment https://forums.phpfreaks.com/topic/24101-frames-w-php/#findComment-109553 Share on other sites More sharing options...
cmgmyr Posted October 16, 2006 Author Share Posted October 16, 2006 Thanks, that helped me get where I wanted to.-Chris Quote Link to comment https://forums.phpfreaks.com/topic/24101-frames-w-php/#findComment-109571 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.