PHP - Footer Showing Up As Header.
I have written a page that works perfectly on showing the data I need in question. The problem is my footer is showing up as my header... I don't know why. Can someone explain? I put it at the end of the page, after all the php code, and it seems to me it should be inserted there, but for some reason it shows on the top.
If anyone can help it be greatly appreciated. Here is the page: http://kaboomlabs.com/testbed/print.php?id=1 Here is the code: Code: [Select] <?php require_once('tb/connectvars.php'); echo '<div id="printwrap">' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>PDI NCMR - Print</title> <link rel="stylesheet" type="text/css" href="tb/postie.css" /> </head> <body> <div id="logo"> <img src="tb/PDI_Logo_2.1.gif" alt="PDI Logo" /> </div> <?php // Connect to the database $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); // Grab the profile data from the database if (!isset($_GET['id'])) { $query = "SELECT * FROM ncmr WHERE id = '$id'"; } else { $query = "SELECT * FROM ncmr WHERE id = '" . $_GET['id'] . "'"; } $data = mysqli_query($dbc, $query); if (mysqli_num_rows($data) == 1) { // The user row was found so display the user data $row = mysqli_fetch_array($data); echo'<div id="title"><h3 id="NCMR2">Non-Conforming Materials Report (NCMR: ' . $row['rma'] . ')</h3></div>'; echo '<form id="all">'; echo '<fieldset>'; //Part, Rev, Part Description, NCMR Qty echo '<div id="box1p">'; if (empty($row['ab'])) $row['ab'] = "Empty"; if (empty($row['date'])) $row['date'] = "Empty"; if (empty($row['part'])) $row['part'] = "Empty"; if (empty($row['rev'])) $row['rev'] = "Empty"; if (empty($row['partdesc'])) $row['partdesc'] = "Empty"; if (empty($row['ncmrqty'])) $row['ncmrqty'] = "Empty"; echo '<div id="abp"><span class="b">Added By: </span>' . $row['ab'] . '</div>'; echo '<div id="datep"><span class="b">Date Filed: </span>' . $row['date'] . '</div>'; echo '<div id="partp"><span class="b">Part Number: </span>' . $row['part'] . '</div>'; echo '<div id="revp"><span class="b">Part Revision: </span>' . $row['rev'] . '</div>'; echo '<div id="partdescp"><span class="b">Part Description: </span>' . $row['partdesc'] . '</div>'; echo '<div id="ncmrqtyp"><span class="b">NCMR Qty: </span>' . $row['ncmrqty'] . '</div>'; echo '</div>'; //Part, Rev, Part Description, NCMR Qty, JO, SN and INV echo '<div id="box2p">'; if (empty($row['comp'])) $row['comp'] = "Empty"; if (empty($row['ncmrid'])) $row['ncmrid'] = "Empty"; if (empty($row['rma'])) $row['rma'] = "Empty"; if (!empty($row['NCMR_Qty'])) $row['NCMR_Qty'] = "Empty"; echo '<div id="comp"><span class="b">Company: </span>' . $row['comp'] . '</div>'; echo '<div id="ncmrid"><span class="b">Customer NCMR ID: </span>' . $row['ncmrid'] . '</div>'; echo '<div id="rma"><span class="b">Internal RMA: </span>' . $row['rma'] . '</div>'; echo '<div id="jno"><span class="b">Job #: </span>' . $row['jno'] . '</div>'; echo '</div>'; //Inventory On Hand, Inventory Check, Supplier Name, Supplier Number, Manufacturer Part Number, Manufactuer Serial Number and NCMR ID echo '<div id="box3p">'; if (empty($row['fdt'])) $row['fdt'] = "Empty"; if (empty($row['cof'])) $row['cof'] = "Empty"; echo '<h2>Failures</h2>'; echo '<div id="fdt"><span class="b">Failure Due To: </span><br />' . $row['fdt'] . '</div>'; echo '<div id="cof"><span class="b">Class of Failu </span><br />' . $row['cof'] . '</div>'; echo '</div>'; //Nonconformity, Disposition, Comments and Comments & Additional Details echo '<div id="box4p">'; if (empty($row['fab1'])) $row['fab1'] = "Empty"; if (empty($row['fab2'])) $row['Disposition'] = "Empty"; if (empty($row['fab3'])) $row['Comments'] = "Empty"; echo '<h2>Fabricators</h2>'; echo '<div id="fab1"><span class="b"></span>' . $row['fab1'] . '</div>'; echo '<div id="fab2"><span class="b"></span>' . $row['fab2'] . '</div>'; echo '<div id="fab3"><span class="b"></span>' . $row['fab3'] . '</div>'; echo '</div>'; //PO, PO Date, and Date Recieved echo '<div id="box5p">'; if (empty($row['non'])) $row['non'] ="Empty"; if (empty($row['dis'])) $row['dis'] ="Empty"; if (empty($row['comm'])) $row['comm'] ="Empty"; if (empty($row['caad'])) $row['caad'] ="Empty"; echo '<div id="non"><span class="b">Nonconformity: <br /></span>' . $row['non'] . '</div><br /><br />'; echo '<div id="dis"><span class="b">Disposition: <br /></span>' . $row['dis'] . '</div><br /><br />'; echo '<div id="comm"><span class="b">Comments: <br /></span>' . $row['comm'] . '</div><br /><br />'; echo '<div id="caad"><span class="b">Comments and/or Additional Details: <br /></span>' . $row['caad'] . '</div>'; //PO, PO Date, and Date Recieved echo '<div id="podrp">'; if (empty($row['po'])) $row['po'] ="Empty"; if (empty($row['pod'])) $row['pod'] ="Empty"; if (empty($row['dri'])) $row['dri'] ="Empty"; echo '<div id="pop"><span class="b">PO: </span>' . $row['po'] . '</div>'; echo '<div id="podp"><span class="b">PO Date: </span>' . $row['pod'] . '</div>'; echo '<div id="drip"><span class="b">Date Recieved: </span>' . $row['dri'] . '</div>'; echo '</div>'; echo '</div>'; echo '<div id="box6p">'; //NCMR Supplier Response & Comment if not empty if (empty($row['ncmrsr'])) $row['ncmrsr'] ="Empty"; if (empty($row['ncmrsc'])) $row['ncmrsc'] ="Empty"; echo '<div id="ncmrsr"><span class="b">NCMR Supplier Response:</span><br />' . $row['ncmrsr'] . '</div><br /><br />'; echo '<div id="ncmrsc"><span class="b">NCMR Supplier Comment:</span><br />' . $row['ncmrsc'] . '</div><br /><br />'; echo '</div>'; echo '</fieldset>'; echo '</div>'; echo '</form>'; } mysqli_close($dbc); echo '</div>'; require_once('tb/pfooter.php'); ?> </body> </html> Similar TutorialsI've finished designing my website home page and I've now moved on the some of the other pages, I want my header and footer to appear the same on every page. I've tried this basic way of linking the same stylesheet that makes up my header/footer in the second HTML file (already used in the homepage):
<link rel="stylesheet" href="footer.css" type="text/css"/> <link rel="stylesheet" href="header.css" type="text/css"/> I now understand that this isn't going to work. Would a server-side scripting language be my best bet here? Something like PHP? If so, would anyone be able to link me with an article on how I could do this in PHP, I presume with the include function? I've had answers elsewhere but this, for me, isn't working: "You are currently only linking the css for the header and footer. If you want to include the html as the same, create two separate files header.php and footer.php, then include them into each webpage. <?php include('path/to/header.php');?> // in the location you want the header in the page <?php include('path/to/footer.php');?> // in the location you want the footer Essentially, you're making partials and placing them wherever you want them" Any help would be greatly appreciated. Edited by Coplestone, 15 January 2015 - 11:52 AM. I have implemented this slider http://kgperazim.com/test/film2 , however I'd like my header and footer to stay on screen whenever I'm scrolling horizontally.
What would be the best solution to do that with css?
Thx for any advice.
Hi All, I am a newbie to php and I have this issue. I would appreciate if anyone can help out. I tried a few things but was not able to come up with a solution. From reading few codes and learning from it, I created this function in query.php and am calling this function in uk.php file, but the problem is that it loads and shows the data in table, but then it stops loading page from there on and the footer which is in html code after the place where I am calling this function does not load. I tried removing return false; command, but with that it loads the footer, but it shows the table after the footer. I want the table with data to show in between header and footer. Can you guys let me know what I need to do to achieve that? File Name: query.php
function uk() { $output = ''; $result = db_query("SELECT * FROM lecture where groups='uk'"); if(mysqli_num_rows($result) > 0) { $output .= '<div id="style2" style="overflow-x:auto;"> <table> <tr> <th class="text-center">Date</th> <th class="text-center">Title</th> <th class="text-center">Venue</th> <th class="text-center">Duration</th> <th class="text-center">Size (MB)</th> <th class="text-center">Link</th> </tr>'; while($row = mysqli_fetch_array($result)) { $output .= ' <tr> <td>'.$row["mydate"].'</td> <td>'.$row["title"].'</td> <td>'.$row["venue"].'</td> <td>'.$row["duration"].'</td> <td>'.$row["size"].'</td> <td><a href="../'.$row["path"].$row["file_name"].'">Save</a></td> </tr> '; } echo $output; } else { echo 'Data Not Found'; } }
File Name: uk.php
Header html code here Some body text <?php include '../includes/query.php'; uk(); return false; ?> Footer html code here
I am pretty new to PHP and am trying to create a simple (so I assumed) page to takes data from one html page(works fine) and updates a MYSQL Database. I am getting no error message, but the connect string down to the end of the body section is showing up as plain text in my browser window. I do not know how to correct this. I have tried using two different types of connect strings and have verified my names from the HTML page are the same as listed within the php page. Suggestions on what I need to look for to correct would be great. I have looked online, but so far all I am getting is how to connect, or how to create a comment, so I thought I would try here. Thank you for any assistance I may get!! - Amy - Code: [Select] <body><font color="006600"> <div style="background-color:#f9f9dd;"> <fieldset> <h1>Asset Entry Results</h1> <?php // create short variable names $tag=$_POST['tag']; $serial=$_POST['serial']; $category=$_POST['category']; $status=$_POST['status']; $branch=$_POST['branch']; $comments=$_POST['comments']; if (!$tag || !$serial || !$category || !$status || !$branch) { echo "You have not entered all the required details.<br />" ."Please go back and try again."; exit; } if (!get_magic_quotes_gpc()) { $tag = addslashes($tag); $serial = addslashes($serial); $category = addslashes($category); $status = addslashes($status); $branch = addslashes($branch); $comments = addslashes($comments); } //@ $db = new mysqli('localhost', 'id', 'pw', 'inventory'); $db = DBI->connect("dbi:mysql:inventory:localhost","id","pw") or die("couldnt connect to database"); $query = "insert into assets values ('".$serial."', '".$tag."', '".$branch."', '".$status."', '".$category."', '".$comments."')"; $result = $db->query($query); if ($result) { echo $db->affected_rows." asset inserted into Inventory."; } else { echo "An error has occurred. The item was not added."; } $db->close(); ?> </fieldset> </div> </body> This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=350027.0 Hello everyone, I'm just starting out with PHP as I need to create an online bookstore for a school project. I'm working by a magazine which should teach you exactly how to do this using PHP, but I've had a bunch of problems with the code they use and I don't really know what's going on. Anyway, this looks really simple and basically what it does is allows you to post a comment on a book, then returns you to the book's page. Problem is, I'm getting the Header may not contain more than a single header, new line detected. error and I can't figure out why. I've tried researching into the matter but all the cases I found had to do with returning to an url, which is not my case. Anyway, here's the snippet of code: The form: Code: [Select] <div style="width:400px; border:1px solid #ffffff; background-color:#F9F1E7; padding:5px"> <b>Adauga opinia ta:</b> <hr size="1"> <form action="adauga_comentariu.php" method="POST"> Nume: <input type="text" name="nume_utilizator"><br><br> Email: <input type="text" name="adresa_email"><br><br> Comentariu: <br> <textarea name="comentariu" cols="45"></textarea><br><br> <input type="hidden" name="id_carte" value="<?=id_carte?>"> <center><input type="submit" value="Adauga"</center> </form> </div> The script adaugare_comentariu.php: Code: [Select] <?php ob_start(); include("conectare.php"); $numeFaraTags=strip_tags($_POST['nume_utilizator']); $emailFaraTags=strip_tags($_POST['adresa_email']); $comentariuFaraTags=strip_tags($_POST['comentariu']); $sql="insert into comentarii (id_carte, nume_utilizator, adresa_email, comentariu) values(".$_POST['id_carte'].", '".$numeFaraTags."','".$emailFaraTags."','".$comentariuFaraTags."')"; mysql_query($sql); $inapoi="carte.php?id_carte=".$_POST['id_carte']; header("location:urldecode($inapoi)"); ob_end_flush(); ?> conectare.php connects to the mysql database. $inapoi is the variable which returns the user to carte.php (the book he posted a comment on), where id_carte is the book's unique id. I'm getting Header may not contain more than a single header, new line detected on line ten, which is the header line. Can anyone help me? I've been stumped on this for a few days now and I've just let it pass and started working on other bits, but it's bugging me too much and I'd like to fix it. Any idea why I can't see the footer on my index page? this is index.php <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <TITLE>Seare</TITLE> <script language="JavaScript">function parentTop(){ parent.window.location.hash = '#top';}</script> <script language="JavaScript"> <!-- function calcHeight() { //find the height of the internal page var the_height= document.getElementById('the_iframe').contentWindow. document.body.scrollHeight; //change the height of the iframe document.getElementById('the_iframe').height= the_height; } //--> </script> <style type="text/css"> #nav-menu ul p { font-family: verdana ; } p { font-size: 20px; } { list-style: none; padding: 0; margin: 0; } #nav-menu li { float: left; margin: 0 0.15em; } #nav-menu li a { height: 2em; line-height: 2em; float: left; width: 10em; display: block; color: #000000; text-decoration: none; text-align: center; border-bottom: 1px solid white; } /* Hide from IE5-Mac \*/ #nav-menu li a { float: none } /* End hide */ #nav-menu { width:90em } </style> </HEAD> <BODY > <p id="start"></p> <DIV style="position:absolute;left:0px;top:0px;width:100%;height:100%;z-index:1" align="left"> <TABLE width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <img src="seare.jpg" width="1259" height="170" /> </TABLE></DIV> <div id="nav-menu" style="position:absolute;center:0px;top:143px;width:100%;height:100%;z-index:1" align="left"> <ul> <li><a href="fode.php" target="kasp"><p>Fode</p></a></li> <li><a href="sg.php" target="kasp"><p>Sing</p></a></li> <li><a href="bed.php" target="kasp"><p>Bed</p></a></li> <li><a href="orog.php" target="kasp"><p>Orog</p></a></li> <li><a href="/wordpress/" target="kasp"><p>Blog</p></a></li> <li><a href="tilannce.php" target="kasp"><p>Til annoer</p></a></li> <li><A href="takt.php" target="kasp"><p>takt</p></a></li> </ul> </div> <DIV style="position:absolute;center:0px;top:165px;width:100%;height:100%;z-index:1" align="left"><TABLE width="100%" height="100%" border="0" cellpadding="0" cellspacing="1"><TR><TD align="left" valign="top" width="100%" height="40"><FONT style="font-size:16px" color="#000000" face="Arial"><B><hr></B></FONT></TD></TR></TABLE></DIV> <iframe width="100%" id="the_iframe" name="kasp" onLoad="calcHeight();" style="position:absolute;center:1px;top:175px;z-index:1" src="forside.php" scrolling="NO" frameborder="0" height="1"> iframe capable browser is required to view this web site.</iframe> </BODY> </HTML> <?php include 'footer.php'; ?> This is footer.php <hr> <small>Copyright 2008 My Site</small><br> </body> </html> I am trying to implement a sticky footer on my site, but I cannot get it to work. I've done it on about 5 sites prior to this, but this one is just not working.
The footer sticks to the bottom of the window, not the bottom of the document. I need it to be the bottom of the document.
This is the current state of the page: http://www.aspyrhosting.com/index.php
HTML:
<!DOCTYPE html> <html lang="en-US"> <head> <title></title> <meta charset="utf-8" /> <meta content="index, follow" name="robots" /> <meta content="0.0.1" name="revision" /> <link href="http://cdn2.aspyr.us/imgs/aspyrhosting/favicon.ico?v=0.0.1" rel="shortcut icon" /> <link href="http://cdn2.aspyr.us/css/aspyrhosting/style.css?v=0.0.1" rel="stylesheet" type="text/css" /> </head> <body> <div id="container"> <header role="banner"> <section id="wrapper"> <div id="logoWrapper"> <img id="logo" src="./transparent.png?v=0.0.1" /> </div> <div id="headerRight"></div> </section> <section id="menuWrapper"> <div id="menuInnerWrapper"> <div id="menu"> </div> </div> <div id="searchbox"> Search: <input type="text" /> </div> </section> </header> <main id="content" role="main"> <p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p> </main> <footer> <section id="left"> <div id="copyright" role="copyright"></div> </section> <section id="right"> </section> </footer> </div> </body> </html>CSS: article, aside, figure, footer, header, hgroup, main, menu, nav, section{display: block;} html,body { margin:0; padding:0; height:100%; } #container { height:100%; min-height:100%; min-width: 1115px; position:relative; } header { } #logo { background: url('http://cdn2.aspyr.us/imgs/aspyrhosting/logo.png'); } main { padding-bottom: 100px; /* Height of the footer */ } footer { position:absolute; bottom:0; width:100%; height: 100px; /* Height of the footer */ background:#39f; } #menuWrapper { background: #080000; clear: both; width: 100%; height: 40px; } #menuInnerWrapper { float: left; width: 850px; } #menu { margin: 0 auto; width: 710px; } ul{ padding: 0 3px; margin: 0 auto; list-style-type: none; display: block; float: left; } ul li{ display: inline-block; padding: 0 5px; margin: 0 auto; text-align: center; height: 40px; width: 90px; line-height: 40px; } ul li a { text-decoration: none; color: #fff; } #searchbox { float: right; line-height: 40px; padding-right: 10px; min-width: 200px; width: 10%; } my footer renders ontop... weird huh? tested in chrome & firefox any idea how to fix? footer.php <?php $footer = '<div id="footer" >Copyright © 2011 davidknag.com<br/>Part of the <a href="http://www.davidknag.com/">David Knag Network</a></div>' ?> style.css a { text-decoration:none; color:#888888; } a:hover { color:#999999; text-decoration:underline; } #footer { margin-left:60%; color:#666666; } body { background-color:#191919; color:#FFFFFF; } #box { color:#000000; position: fixed; top: 200px; left: 32%; width:550px; background:#afc8de; padding:2em 0 2em 0; border:solid 10px #1f1f1f; } form{width:500px; margin:0 auto 0 auto;} fieldset {border:none; padding:0 0 2em 0; } #boxfix{width:500px; margin:0 auto 0 auto;} fieldset {border:none; padding:0 0 2em 0; } index.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>Todo</title> <link rel="stylesheet" href="style.css" type="text/css" media="screen" charset="utf-8"/> </head> <body> <?php error_reporting(0); require "mysql.php"; $today = getdate(); if ($_POST['logout']) { setcookie("loggedin", "0", time()-3600); } else { } if ($_COOKIE["loggedin"] == 1) { ?> hi! <br/> <form autocomplete="off" action="logout.php" method="POST"> <input value="Log Out" class="logout" type="submit" name="logout"> </form> <?php } else{ $usere = $_POST['user']; $pwe = $_POST['password']; if ($_POST['login']){ $qry="SELECT * FROM users WHERE username='$usere' AND password='$pwe'"; $result=mysql_query($qry); if(mysql_num_rows($result)>0) { echo "<div id='box'><div id='boxfix'>Login Correct! <br/> 1 Second...</div></div>"; $expire=time()+60*60*24*30; setcookie("loggedin", "1", $expire); header('Location: index.php'); } else { echo "<div id='box'><div id='boxfix'><strong>Login Incorrect!</strong><br/>Your Username or Password was Incorrect!</div></div>"; } }else{ ?> <div id="box"> <form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST"> User:<br/><input type="text" name="user"><i>*</i><br/> Password:<br/><input type="password" name="password"><i>*</i><br/> <input value="Login" class="submit" type="submit" name="login"> </form> </div> <?php include "footer.php"; echo $footer; ?> <?php } } ?> </body> <head> <html> I have just installed a new theme for my site at JamesGeddes.com however I want to edit the php footer file This, however, is coded in base64; fine for browsers, not so great for people! The file is at http://jamesgeddes.com/wp-content/themes/techno/footer.php but so that you can look at it I have copied the contents to a text file http://jamesgeddes.com/wp-content/themes/techno/txt/footer.txt How can I turn this base64 nonsense in to normal PHP code? Thanks for your help! James Hi all, I have PDF file online i want to edit dynamic footer and page no. at the end of page. Can anyone help me ? thanks in Advance. Manoj Hey, I have a downloaded theme which appears to have hidden spam link in the footer somewhere, but I'm having a hard time locating the source. Here is the site: www.yourvancouvermortgagebroker.ca At the very bottom of the source, you can see: Code: [Select] <script type='text/javascript' src='http://www.yourvancouvermortgagebroker.ca/wp-content/plugins/contact-form-7/jquery.form.js?ver=2.47'></script> <script type='text/javascript' src='http://www.yourvancouvermortgagebroker.ca/wp-content/plugins/contact-form-7/scripts.js?ver=2.4.2'></script> <a href ="http://wp2blog.com"><img src="http://www.yourvancouvermortgagebroker.ca/wp-content/themes/Minimal/images/blank.gif" height="1" width="1" /></a> </body> </html> I've tried de-activating the plugins and it's still there (so it's not a plugin). I've also changed themes and it disappears, so it's only this theme. Here is functions.php: Code: [Select] <?php require_once(TEMPLATEPATH . '/epanel/custom_functions.php'); require_once(TEMPLATEPATH . '/includes/functions/comments.php'); require_once(TEMPLATEPATH . '/includes/functions/sidebars.php'); load_theme_textdomain('Minimal',get_template_directory().'/lang'); require_once(TEMPLATEPATH . '/epanel/options_minimal.php'); require_once(TEMPLATEPATH . '/epanel/core_functions.php'); require_once(TEMPLATEPATH . '/epanel/post_thumbnails_minimal.php'); $wp_ver = substr($GLOBALS['wp_version'],0,3); if ($wp_ver >= 2.8) include(TEMPLATEPATH . '/includes/widgets.php'); ?> and footer.php: Code: [Select] <div id="footer" > <div id="footer-content"> <ul id="bottom-menu"> <?php global $is_footer, $page_menu, $category_menu; $is_footer = true; elegant_init(); if (get_option('minimal_home_link') == 'on') { ?> <li <?php if (is_front_page()) echo('class="current_page_item"') ?>><a href="<?php bloginfo('url'); ?>"><?php _e('Home','Minimal'); ?></a></li> <?php }; ?> <?php if ($category_menu <> '<li>No categories</li>') echo($category_menu); ?> <?php echo $page_menu; ?> </ul> <!-- end ul#bottom-menu --> </div> <!-- end #footer-content --> </div> <!-- end #footer --> </div> <!-- end #page-wrap --> <?php include(TEMPLATEPATH . '/includes/scripts.php'); ?> <?php wp_footer(); ?> </body> </html> Where should I look from here? The link switches every once and a while if that's relevant. I've tried a full text search of all the files for the actual link and it never shows up. Thanks Simplified for everyone's sanity and re-posted.
Got a Wordpress Conference theme, lets you enter speakers into a database and assign each one a category/role. In the settings for the theme, there's a dropdown from which you can select one of the roles you create. Doing so will display all the speakers assigned that role in the footer of the homepage and also populate a stand-alone Speakers page with the same role. I want to make it so that the footer on the homepage displays one role and the stand-alone speaker page displays another. Here's the PHP for the Speakers page (identical to the footer PHP) <?php Here's the HTML for the "dropdown" portion of the settings, where you can see the role categories available. "Speaker" is the default created by the Theme, "whyattend" is the one I made. <!-- Speakers Category --> I want "whyattend" to show on the Footer and "Speaker" to populate the Speakers page. Can this be done? Hi
I want to get my <footer> to appear at the bottom of my page, but I dont want it to be fixed there.
So if the middle contents of a page is very short, the <footer> will be visibled at the bottom of the browser, but if the page contents is long, then the <footer> would just disappear at the bottom of the contents.
Can this be done?
Thanks
Dear All, Hope all are fine. Need one hep to align the logo in the center of the footer. I tried align = Center but didn't help, please see below code ad advise. <div class="image"> <img src="images/icon/logo.jpg" alt="John Doe"/> </div>
Kind Regards, Naveed. Edited August 2, 2020 by Naveed786Hi all,
Wondered if anyone could assist?
On the following website the footer is not displaying as expected and cannot see why:
http://www.urxltd.com/index.php
Any other pages on the website show the footer correctly.
Thanks.
I decided to redo the individual roster page I have on my site and came up with this. <?php if(isset($_GET['username']) && $_GET['username'] != '') { $username = $_GET['username']; $query = "SELECT bio.username AS username, bio.charactername AS charactername, bio.id AS id, bio.style_id AS style FROM `efed_bio` AS bio ON bio.id = ebw.bio_id WHERE bio.username = '$username'"; if(!$result = mysql_query($query)) while ($row = mysql_fetch_assoc($result)) { $fieldarray=array('id','username','charactername','style'); foreach ($fieldarray as $fieldlabel) { if (isset($row[$fieldlabel])) { $$fieldlabel=$row[$fieldlabel]; $$fieldlabel=cleanquerydata($$fieldlabel); } } } } ?> <h1><?php echo $charactername; ?>'s Biography</h1> <?php echo getBioMenu($style,$username); ?> <? //If the GET page variable is biography, display the biography page if ($page == 'biography') { echo getBiopgrahy($style,$id); } //Or if the GET page variable is gallery, display the gallery page elseif ($page == 'gallery') { echo getGallery($style,$id); } //If the GET page variable is news, display the news page elseif ($page == 'news') { echo getNews($$id); } //If the GET page variable is segments, display the segments page elseif ($page == 'segments') { echo getBioSegments($id,S); } //If the GET page variable is matches, display the matches page elseif ($page == 'matches') { echo getBioSegments($id,M); } elseif ($page == 'chronology') { echo getChronology($id); } //Otherwise display the bio else { echo getBio($style,$id); } ?> The list of characters are listed he http://kansasoutlawwrestling.com/roster An example of someone's individual roster page is located he http://kansasoutlawwrestling.com/bio?username=oriel Hi everyone, I have a login area, and i also have set up for me is a view page... the view page is each user's sort of profile, it gets id and displays relevant content. i was wondering if i could get the id or post rather through a re-direct on log in? for example user logs in with username and password, user is re-directed to the view page like this: header( "refresh:5;url=view00=id.php " ); echo '<h1>You will be re-directed in 5 seconds...</h1>'; user is taken to view page where they can edit bit on it. So far though i'm getting page not found error? first of all is this possible? if not whats the correct way/better way? Thanks Can some one help please i always get this wrong dont now why keep saying header already been sent any help please and how to fix it Code: [Select] <?php session_start(); $conn = mysql_connect(""); $db = mysql_select_db("", $conn); if(isset($_POST['submit'])){ $user = mysql_escape_string($_POST['user']); $pass = mysql_escape_string($_POST['pass']); } if(empty($user) && empty($pass)){ exit; }else{ } ?> <?php $sql = mysql_query("SELECT * FROM useradmin WHERE dbusername= '".$user."' AND dbuserpass= '".$pass."'")or die(mysql_error()); $row = mysql_fetch_assoc($sql); $count = count($sql); $u = $row['dbusername']; $p = $row['dbuserpass']; if($u == $user && $p == $pass){ $_SESSION['access'] = "$u"; header("location: index.php"); }else { echo "Sorry there as been a problem!"; exit; } ?> Hi is there a way that i can set header not go anywhere like the problem with this is that it still goes to the second header is there a way i can set if none do nothing exit? and else do the second header?? Code: [Select] <?php if ($_POST['agents']=="none") { header("location:#"); exit; // header("Location: {$_SERVER['PHP_SELF']}"); } else { header("location:http://www.xxxxxx.co.uk/tv/".$_POST['agents']."/index.php"); } ?> |