Adamb10 Posted May 29, 2006 Share Posted May 29, 2006 Hey all,[a href=\"http://adamb10.com/ub2/index.php?action=login\" target=\"_blank\"]http://adamb10.com/ub2/index.php?action=login[/a] See that the guestbook header(the menu on the bottom) is being printed well on the bottom? :p I dont want it there. I only want it on the top.Time for some code. Index.php....[code]<?//index.php//Start the sessionsession_start();//Load required filesrequire('sources/functions.php');require('sources/actions.php');require('sources/actions2.php');//Essential Functionsdb_connect();//Prepare for Query in 5..4..3..2..1function query($query){ $sql = "$query"; $result = mysql_query($sql); return mysql_fetch_array ($result); }//Query time!$row = query("SELECT * FROM settings");$row = query("SELECT * FROM colors");//Lets output the htmlecho '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html lang="en"><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style type="text/css"><!--a:link { color: #'.$row['link'].'; text-decoration: none;}a:visited { color: #'.$row['vistedlink'].'; text-decoration: none;}a:active { color: #'.$row['activelink'].'; text-decoration: none;}a:hover { color: #'.$row['hoverlink'].'; text-decoration: underline; }body { background-color: #'.$row['bodybg'].'; font-family: '.$row['fontfamily'].'; font-size: 11px; color: #'.$row['font'].'; margin:0px; }.titlebg { background-color: #'.$row['titlebg'].'; font-family: '.$row['fontfamily'].'; font-size: 11px; color: #'.$row['titlefont'].'; }.windowbg { background-color: #'.$row['windowbg'].'; font-family: '.$row['fontfamily'].'; font-size: 11px; color: #'.$row['font'].'; }.windowbg2 { background-color: #'.$row['window2bg'].'; font-family: '.$row['fontfamily'].'; font-size: 11px; color: #'.$row['font'].'; }.border { background-color: #'.$row['border'].'; }td { font-size: 11px; }input,textarea { font-family: '.$row['fontfamily'].'; font-size: 11px; }select { font-family: '.$row['fontfamily'].'; font-size: 11px; } --!> </style> <title>'.$row['title'].'</title></head><body>';//echo out the Guestbook Headerguestbook_header();echo '</body></html>';?>[/code]Login.php...[code]<?//login.php//essential functions to lifedb_connect();guestbook_header();echo '<br><center><table class="border" style="width: 25%; text-align: left; margin-left: auto; margin-right: auto;" border="0" cellpadding="4" cellspacing="1" class="border"> <tr class="titlebg"> <td>Login</td> </tr> <tr class="windowbg2"> <td> Pleaselogin using your details below:<br><table style="width: 25%; text-align: left; margin-left: auto; margin-right: auto;" border="0" cellpadding="4" cellspacing="1"><tr> <br> <form method="post" action="?action=loggingin" name="Login">Username: <input size="20" name="Username"></tr><tr>Password: <input size="20" name="Password" type="password"></tr><br><br></table> <div style="text-align: center;"><input value="Login" type="submit"></div> </td> <br> </form> </td> </tr></table></center>';?>[/code]actions.php....[code]<?//actions.php$action = $_GET['action'];if($action == "login"){ require('login.php');}if($action =="admin"){ require('admin.php');}?>[/code]actions2.php....[code]<?//actions2.phpif (isset($_GET['action'])) {$action = $_GET['action'];if($action == "login"){return('actions.php');}elseif ($action == "processlogin"){return('actions.php');}}?>[/code]The code in actions2.php is supposed to prevent what is happening right now but it's not now. Any help is greatly welcomed! [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /] Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/10673-indexphp-being-printed-on-pages-i-dont-want-it-on/ 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.