digi24 Posted June 8, 2007 Share Posted June 8, 2007 <? $phpself = $_SERVER['PHP_SELF']; switch($_GET['id']) { case indx: include('home.php'); break; case link: include('link.php'); break; case dl: include('dl.php'); break; } echo "<a href=?id=indx>Home</a><br><a href=?id=link>Links</a><br><a href=?id=dl>Downloads</a>"; ?> im kinda new at this, but the problem, is that i cant get the pages to open where i want. so i guess im doing somthing wrong.. http://www.norsandboxcommunity.com/test2/test/ <-- so you can see what i mean, if it helps Quote Link to comment https://forums.phpfreaks.com/topic/54806-help-me/ Share on other sites More sharing options...
Dragen Posted June 8, 2007 Share Posted June 8, 2007 where did you want them? Quote Link to comment https://forums.phpfreaks.com/topic/54806-help-me/#findComment-271024 Share on other sites More sharing options...
digi24 Posted June 8, 2007 Author Share Posted June 8, 2007 more to the right Quote Link to comment https://forums.phpfreaks.com/topic/54806-help-me/#findComment-271051 Share on other sites More sharing options...
Dragen Posted June 8, 2007 Share Posted June 8, 2007 well you need to change your html code to position it correctly then Quote Link to comment https://forums.phpfreaks.com/topic/54806-help-me/#findComment-271058 Share on other sites More sharing options...
penguin0 Posted June 8, 2007 Share Posted June 8, 2007 echo "<a href=?id=indx>Home</a><br><a href=?id=link>Links</a><br><a href=?id=dl>Downloads</a>"; ?> How is all the other html on the page displayed? If it is all in a table, then it is in the wrong cell. Quote Link to comment https://forums.phpfreaks.com/topic/54806-help-me/#findComment-271103 Share on other sites More sharing options...
digi24 Posted June 8, 2007 Author Share Posted June 8, 2007 <style type="text/css"> <!-- #apDiv1 { position:absolute; left:252px; top:158px; width:696px; height:531px; z-index:2; background-color: #000000; background-image: url(dfsf.jpg); } #apDiv2 { position:absolute; left:190px; top:23px; width:203px; height:87px; z-index:2; } body { background-color: #000000; } #apDiv3 { position:absolute; left:218px; top:18px; width:760px; height:176px; z-index:2; } #apDiv4 { position:absolute; left:156px; top:733px; width:858px; height:19px; z-index:3; background-color: #333333; } a:link { color: #CCCCCC; } .style2 { color: #666666; font-weight: bold; } #indx { position:absolute; left:424px; top:223px; width:514px; height:458px; z-index:3; } #apDiv5 { position:absolute; left:172px; top:251px; width:67px; height:368px; z-index:4; } #apDiv6 { position:absolute; left:168px; top:236px; width:73px; height:259px; z-index:4; } #mny { position:absolute; left:161px; top:234px; width:82px; height:217px; z-index:4; } #apDiv7 { position:absolute; left:167px; top:219px; width:73px; height:241px; z-index:4; } #apDiv8 { position:absolute; left:56px; top:166px; width:142px; height:35px; z-index:3; } #apDiv9 { position:absolute; left:988px; top:158px; width:170px; height:531px; z-index:3; background-color: #333333; } #apDiv10 { position:absolute; left:273px; top:223px; width:668px; height:465px; z-index:4; } #apDiv11 { position:absolute; left:49px; top:702px; width:1111px; height:35px; z-index:5; background-color: #333333; } #apDiv12 { position:absolute; left:261px; top:224px; width:143px; height:314px; z-index:3; } #apDiv13 { position:absolute; left:218px; top:219px; width:508px; height:398px; z-index:4; } a:visited { color: #CCCCCC; } a:hover { color: #999999; } a:active { color: #CCCCCC; } .style7 {color: #FFFFFF} --> </style> <div id="apDiv1"> <p> </p> <p> </p> </div> <div id="apDiv3"><img src="front.jpg" width="760" height="175" border="3"></div> <div id="apDiv12"> <? $phpself = $_SERVER['PHP_SELF']; switch($_GET['id']) { case indx: include('home.php'); break; case link: include('link.php'); break; case dl: include('dl.php'); break; } echo "<a href=?id=indx>Home</a><br><a href=?id=link>Links</a><br><a href=?id=dl>Downloads</a>"; ?> </div> </div> <p class="style2"> </p> This is how it all looks Quote Link to comment https://forums.phpfreaks.com/topic/54806-help-me/#findComment-271108 Share on other sites More sharing options...
Dragen Posted June 8, 2007 Share Posted June 8, 2007 try this: <style type="text/css"> <!-- #apDiv1 { position:absolute; left:252px; top:158px; width:696px; height:531px; z-index:2; background-color: #000000; background-image: url(dfsf.jpg); } #apDiv2 { position:absolute; left:190px; top:23px; width:203px; height:87px; z-index:2; } body { background-color: #000000; } #apDiv3 { position:absolute; left:218px; top:18px; width:760px; height:176px; z-index:2; } #apDiv4 { position:absolute; left:156px; top:733px; width:858px; height:19px; z-index:3; background-color: #333333; } a:link { color: #CCCCCC; } .style2 { color: #666666; font-weight: bold; } #indx { position:absolute; left:424px; top:223px; width:514px; height:458px; z-index:3; } #apDiv5 { position:absolute; left:172px; top:251px; width:67px; height:368px; z-index:4; } #apDiv6 { position:absolute; left:168px; top:236px; width:73px; height:259px; z-index:4; } #mny { position:absolute; left:161px; top:234px; width:82px; height:217px; z-index:4; } #apDiv7 { position:absolute; left:167px; top:219px; width:73px; height:241px; z-index:4; } #apDiv8 { position:absolute; left:56px; top:166px; width:142px; height:35px; z-index:3; } #apDiv9 { position:absolute; left:988px; top:158px; width:170px; height:531px; z-index:3; background-color: #333333; } #apDiv10 { position:absolute; left:273px; top:223px; width:668px; height:465px; z-index:4; } #apDiv11 { position:absolute; left:49px; top:702px; width:1111px; height:35px; z-index:5; background-color: #333333; } #apDiv12 { position:absolute; left:300px; top:224px; width:143px; height:314px; z-index:3; } #apDiv13 { position:absolute; left:218px; top:219px; width:508px; height:398px; z-index:4; } a:visited { color: #CCCCCC; } a:hover { color: #999999; } a:active { color: #CCCCCC; } .style7 {color: #FFFFFF} --> </style> <div id="apDiv1"> <p> </p> <p> </p> </div> <div id="apDiv3"><img src="front.jpg" width="760" height="175" border="3"></div> <div id="apDiv12"> <? $phpself = $_SERVER['PHP_SELF']; switch($_GET['id']) { case indx: include('home.php'); break; case link: include('link.php'); break; case dl: include('dl.php'); break; } echo "<a href=?id=indx>Home</a><br><a href=?id=link>Links</a><br><a href=?id=dl>Downloads</a>"; ?> </div> </div> <p class="style2"> </p> all I've done is change the left position of apDiv12 Quote Link to comment https://forums.phpfreaks.com/topic/54806-help-me/#findComment-271115 Share on other sites More sharing options...
digi24 Posted June 8, 2007 Author Share Posted June 8, 2007 didnt help. since the links still open in the wrong place Quote Link to comment https://forums.phpfreaks.com/topic/54806-help-me/#findComment-271122 Share on other sites More sharing options...
chigley Posted June 8, 2007 Share Posted June 8, 2007 Instead of including, why not use file_get_contents() and output it where required? <?php $phpself = $_SERVER['PHP_SELF']; switch($_GET['id']) { case indx: $contents = file_get_contents('home.php'); break; case link: $contents = file_get_contents('link.php'); break; case dl: $contents = file_get_contents('dl.php'); break; } echo "<a href=?id=indx>Home</a><br><a href=?id=link>Links</a><br><a href=?id=dl>Downloads</a><br /><br />{$contents}"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/54806-help-me/#findComment-271125 Share on other sites More sharing options...
Dragen Posted June 8, 2007 Share Posted June 8, 2007 oh right.. sorry. I missunderstood... Your include clauses are in the wrong place. try this: <style type="text/css"> <!-- #apDiv1 { position:absolute; left:252px; top:158px; width:696px; height:531px; z-index:2; background-color: #000000; background-image: url(dfsf.jpg); } #apDiv2 { position:absolute; left:190px; top:23px; width:203px; height:87px; z-index:2; } body { background-color: #000000; } #apDiv3 { position:absolute; left:218px; top:18px; width:760px; height:176px; z-index:2; } #apDiv4 { position:absolute; left:156px; top:733px; width:858px; height:19px; z-index:3; background-color: #333333; } a:link { color: #CCCCCC; } .style2 { color: #666666; font-weight: bold; } #indx { position:absolute; left:424px; top:223px; width:514px; height:458px; z-index:3; } #apDiv5 { position:absolute; left:172px; top:251px; width:67px; height:368px; z-index:4; } #apDiv6 { position:absolute; left:168px; top:236px; width:73px; height:259px; z-index:4; } #mny { position:absolute; left:161px; top:234px; width:82px; height:217px; z-index:4; } #apDiv7 { position:absolute; left:167px; top:219px; width:73px; height:241px; z-index:4; } #apDiv8 { position:absolute; left:56px; top:166px; width:142px; height:35px; z-index:3; } #apDiv9 { position:absolute; left:988px; top:158px; width:170px; height:531px; z-index:3; background-color: #333333; } #apDiv10 { position:absolute; left:273px; top:223px; width:668px; height:465px; z-index:4; } #apDiv11 { position:absolute; left:49px; top:702px; width:1111px; height:35px; z-index:5; background-color: #333333; } #apDiv12 { position:absolute; left:300px; top:224px; width:143px; height:314px; z-index:3; } #apDiv13 { position:absolute; left:218px; top:219px; width:508px; height:398px; z-index:4; } a:visited { color: #CCCCCC; } a:hover { color: #999999; } a:active { color: #CCCCCC; } .style7 {color: #FFFFFF} --> </style> <div id="apDiv1"> <p> </p> <p> </p> </div> <div id="apDiv3"><img src="front.jpg" width="760" height="175" border="3"></div> <div id="apDiv12"> <? $phpself = $_SERVER['PHP_SELF']; echo "<a href=?id=indx>Home</a><br><a href=?id=link>Links</a><br><a href=?id=dl>Downloads</a>"; ?> </div> </div> <p class="style2"><?php switch($_GET['id']) { case indx: include('home.php'); break; case link: include('link.php'); break; case dl: include('dl.php'); break; } ?></p> EDIT: Just saw chigley's reply. It might be a better idea. Quote Link to comment https://forums.phpfreaks.com/topic/54806-help-me/#findComment-271127 Share on other sites More sharing options...
digi24 Posted June 8, 2007 Author Share Posted June 8, 2007 ok, so i guess it would be better, but i dont know so mutch about this yet , so how do i output ? Quote Link to comment https://forums.phpfreaks.com/topic/54806-help-me/#findComment-271131 Share on other sites More sharing options...
chigley Posted June 8, 2007 Share Posted June 8, 2007 Just place <?php echo $contents; ?> Where you want to output! Quote Link to comment https://forums.phpfreaks.com/topic/54806-help-me/#findComment-271132 Share on other sites More sharing options...
digi24 Posted June 8, 2007 Author Share Posted June 8, 2007 ok:) Thanks for the help Quote Link to comment https://forums.phpfreaks.com/topic/54806-help-me/#findComment-271163 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.