How to display 20 columns in html design - php

Hello I'm new to php development... I want to understand how to get details from database and display on HTML CSS... I have a database i'm saving hotel data... Now I want to pull these data and display it on website.. please find below html codes design...
<div class="offset-2">
<div class="col-md-4 offset-0">
<div class="listitem2">
<img src="images/items/item7.jpg" alt=""/>
<div class="liover"></div>
<a class="fav-icon" href="#"></a>
<a class="book-icon" href="details.html"></a>
</div>
</div>
<div class="col-md-8 offset-0">
<div class="itemlabel3">
<div class="labelright">
<img src="images/filter-rating-5.png" width="60" alt=""/><br/><br/><br/>
<img src="images/user-rating-5.png" width="60" alt=""/><br/>
<span class="size11 grey">18 Reviews</span><br/><br/>
<span class="green size18"><b>$36.00</b></span><br/>
<span class="size11 grey">avg/night</span><br/><br/><br/>
<form action="http://demo.titanicthemes.com/travel/details.html">
<button class="bookbtn mt1" type="submit">Book</button>
</form>
</div>
<div class="labelleft2">
<b>Mabely Grand Hotel</b><br/><br/><br/>
<p class="grey">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nec semper lectus. Suspendisse placerat enim mauris, eget lobortis nisi egestas et.
Donec elementum metus et mi aliquam eleifend. Suspendisse volutpat egestas rhoncus.</p><br/>
<ul class="hotelpreferences">
<li class="icohp-internet"></li>
<li class="icohp-air"></li>
<li class="icohp-pool"></li>
<li class="icohp-childcare"></li>
<li class="icohp-fitness"></li>
<li class="icohp-breakfast"></li>
<li class="icohp-parking"></li>
<li class="icohp-pets"></li>
<li class="icohp-spa"></li>
</ul>
</div>
</div>
</div>
</div>
Please Suggest at the earliest

Example:
<?php
$database_data = array(
array(
'name' => 'A', 'age' => 28, 'email' => 'a#abc.com'
),
array(
'name' => 'B', 'age' => 27, 'email' => 'b#abc.com'
),
array(
'name' => 'C', 'age' => 26, 'email' => 'c#abc.com'
),
);
?>
Now loop through data and echo your value
<table>
<thead>
<tr>
<th>Name</th>
<th>Age</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<?php foreach($database_data as $data): ?>
<tr>
<td><?php echo $data['name']; ?></td>
<td><?php echo $data['age']; ?></td>
<td><?php echo $data['email']; ?></td>
</tr>
<?php endforeach ; ?>
</tbody>
</table>

There are so many tutorials available online around pagination with PHP and database (for example MySQL). Follow some of the below and you will understand the concept and be able to apply to your page easily.
http://www.tutorialspoint.com/php/mysql_paging_php.htm
http://php.about.com/od/phpwithmysql/ss/php_pagination.htm
http://www.developphp.com/view_lesson.php?v=289

plz use limit tag of mysql to display the as your required data ..
I want ot provide some link
1). if i use LIMIT on a mysql query, should the result set be equal to the limit?
2). Limit
and then you should set the next button which tag a parameter as Start like index.php?start=20&limit=20 and then get on your query page like
$start=isset($_GET['start'])?$_GET['start']:0;
$limit=isset($_GET['limit'])?$_GET['limit']:20;
$query = mysql_query("select * from table limit $start,$limit ");
i Hope this help ful and if you want to set the pagination in your page then follow follow links
1). Pagination of MySQL Query Results
2). Simple Pagination With PHP & MYSQL
3). PHP Pagination
hope you get solution ...

Related

How to display data from mysql embed in html

Hey i want to display some html/css depending on how many rows there are in database basically. Is there a way to do this without echo? Because i'm lost when i have to use many ' '. Here is code sample
<?php foreach ($result as $row) {
}?>
<div id="abox">
<div class="abox-top">
Order x
</div>
<div class="abox-panel">
<p>lorem ipsum</p>
</div>
<br>
<div class="abox-top">
lorem</div>
<div class="abox-panel">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ac convallis diam, vitae rhoncus enim. Proin eu turpis at ligula posuere condimentum nec eu massa. Donec porta tellus ante, non semper risus sagittis at. Pellentesque sollicitudin sodales fringilla. Ut efficitur urna eget arcu luctus lobortis. Proin ut tellus non lacus dapibus vehicula non sit amet ante. Ut nibh justo, posuere sit amet fringilla eget, aliquam mattis urna.</p>
</div>
There's nothing complicated about it:
Simple/ugly:
<?php while($row = fetch()) { ?>
<div>
<?php echo $row['somefield'] ?>
</div>
<? } ?>
Alternative:
<?php
while ($row = fetch()) {
echo <<<EOL
<div>
{$row['somefield']}
</div>
EOL;
}
and then of course there's any number of templating systems, which claim to separate logic from display, and then litter the display with their OWN logic system anyways.
you can simply use <?= short opening tag introduced in php 5.3 before PHP 5.4.0 came out you had to enable short_open_tag ini but after 5.4.0 tag
here is an example
<?php $var='hello, world'; ?>
<?=$var ?> // outputs world
hope it helps.
Templates engines makes your life a pie
Take Smarty for example, it's pretty good template library. What template engine does is fetch variables to pre defined templates.
Your code in simple php:
<?php
echo 'My name is '. $name. ', that's why I'm awesome <br>';
foreach ($data as $value) {
echo $value['name'].' is awesome to!';
}
?>
Code in smarty:
My name is {$name}, that's why I'm awesome <br>
{foreach $data as $value}
{$value} is awesome to!
{/foreach}
Template engines pros:
Templates are held in separate custom named files. (i.e users.tpl, registration.tpl etc)
Smarty Caches your views (templates).
Simple to use i.e {$views + ($viewsToday/$ratio)}.
A lot of helpers.
You can create custom plugins/functions.
Easy to use and debug.
Most importantly: It separates your php code from html!
Template engines cons:
Sometimes hard to grip the concept of working for beginner.
Don't know any more actually
When I dont want to use a template engine (I like Twig, btw), I do something like this:
1) Write a separate file with the html code and some custom tags where data should be presented:
file "row_template.html":
<div class="abox-top">{{ TOP }}</div>
<div class="abox-panel"><p>{{ PANEL }}</p></div>
2) And then, read that file and do the replacements in the loop:
$row_template = file_get_contents('row_template.html');
foreach ($result as $row) {
$replaces = array(
'{{ TOP }}' => $row['top'],
'{{ PANEL }}' => $row['panel']
);
print str_replace(
array_keys($replaces),
array_values($replaces),
$row_template
);
}
In addition, you can change the content of "row_template.html" without touching the php code.
Clean and nice to the eye!

PHP Fetching Data From Specific MySQL Row

Recently I've set it up so I can update my sites news via my administration panel and now I've been seeking across the web for a solution to print specific lines.
$query = "SELECT * FROM BananzaNews";
$result = mysql_query("SELECT * FROM BananzaNews", $con);
$num_rows = mysql_num_rows($result);
The above tells me how many rows I have and for my five most recent which will be shown on my home page, I want to fetch the data for $num_rows, $num_rows -1, $num_rows -2, $num_rows -3 and $num_rows -4.
The data to fetch;
title
newsDate
imagePath
content
websitePath
My current dummy filled code is the following dubplicated five times;
<div class="Feed">
<div class="Img"><img alt="" src="http://www.davidreneke.com/wp-content/uploads/2013/12/News-Briefs.png"></div>
<div class="Title">My Testing Title</div>
<div class="Date">
<div class="Day">22</div>
<div class="Month">Jan</div>
<div class="Year">2015</div>
</div>
<div class="Brief">Vivamus consectetur et sapien vel rhoncus. Maecenas gravida posuere hendrerit. Duis lobortis justo ac justo malesuada commodo. Proin iaculis, erat ac aliquet eleifend, neque felis tristique turpis, at dictum tellus lectus et lorem. Nunc turpis enim, auctor sed purus nec.</div>
<div class="More"></div>
<div class="Divider"></div>
</div>
My PHP
<?php
$query = 'SELECT title,newsDate,imagePath,content,websitePath FROM BananzaNews ORDER BY id Desc LIMIT 5';
$resultSe = mysql_query($query, $con);
if (mysql_num_rows($result) > 0) {
while($row = $resultSet->fetchRow ( DB_FETCHMODE_OBJECT )){
echo "<div class=\"Feed\">
<div class=\"Img\"><img alt=\"\" src=\"" $row->imagePath "\"></div>
<div class=\"Title\">" $row->title "</div>
<div class=\"Date\">
<div class=\"Day\">" $row->newsDate "</div>
<div class=\"Month\">" $row->newsDate "</div>
<div class=\"Year\">" $row->newsDate "</div>
</div>
<div class=\"Brief\">" $row->content "</div>
<div class=\"More\">" $row->websitePath "</div>
<div class=\"Divider\"></div>
</div>";
}
}
?>
Database View
You want to use MySQL's ORDER BY. You don't need to use num_rows to get the 5 latest posts. Simply order them by their id columns and then LIMIT it to 5. If they don't have id columns, they should have an id column that auto_increments and is a PRIMARY KEY. With that, this code will help you:
//Load your mysql_query into a variable SELECTing not *, but only the rows you need.
$query = mysql_query("SELECT title, newsDate, imagePath, content, websitePath FROM BananzaNews ORDER BY newsid DESC LIMIT 5") or die(mysql_error()); //<- Error handling.
//This loads up each row into an associative array into the variable $row
//So, $row['title'] will be equal to the 'title' column at that row in your database
while($row = mysql_fetch_array($query)){
//Output your repeating code
//Notice how I've used concat operators (dots) to stop the echo and start it again.
//I'd recommend looking those up if you haven't.
echo
'<div class="Feed">
<div class="Img"><img alt="" src="'.$row['imagePath'].'"></div>
<div class="Title">'.$row['title'].'</div>
<div class="Date">
<div class="Day">22</div>
<div class="Month">Jan</div>
<div class="Year">2015</div>
</div>
<div class="Brief">'.$row['content'].'</div>
<div class="More"></div>
<div class="Divider"></div>
</div>';
}
I would actually also use mysqli over mysql, mainly because it's well... mysql-improved. Do look into it, I highly recommend it. Even better, use PDO.
I hope this was helpful!
if you want to get the data to fetch run your query in while loop
$result=mysqli_query("select * from table_name order by id desc limit 0,5")
while($each=mysqli_fetch_array($result ))
{
//your code goes here
}
Use this query it will work for you
$query = 'SELECT title,newsDate,imagePath,content,websitePath FROM BananzaNews ORDER BY id Desc LIMIT 5';
$resultSet = mysql_query($query);
if (mysql_num_rows($query) > 0) {
while($row = mysql_fetch_array($resultSet)){
echo $row['title'];
echo $row['newsDate'];
}
}
You can loop your data like this.
Try this it will work :
1. use mysqli or pdo instead of mysql extension. It already depreciated and will be remove in future.
2. Loop your result set to get all the data from the table.
<?php
$result = mysqli_query($con,"SELECT * FROM BananzaNews LIMIT 0,5");
$rs = mysqli_fetch_array($result);
?>
<table>
<?php
do
{
?>
<tr>
<td><?php echo $rs['title']; ?></td>
<td><?php echo $rs['newsDate']; ?></td>
<td><?php echo $rs['imagePath']; ?></td>
<td><?php echo $rs['content']; ?></td>
<td><?php echo $rs['websitePath']; ?></td>
</tr>
<?php
}while($rs = mysqli_fetch_array($result));
?>
</table>

Parsing WordPress post content

I've got a weird layout to get around and am at a loss, even in the planning stage. Essentially I need to separate out all content that's not a .gallery and put it into an <aside />. I initially considered a plugin using the edit_post hook from the Plugin API, but have since decided against it because this content change is layout specific and I want to maintain a clean database. So...
How can I parse through WP's the_content for content that's not .gallery? Admittedly not a PHP guy, so I doubly appreciate the help!
As per Michael's comment below - here's an example of WP's the_content class output:
HTML
<div class="entry-content">
<div class="gallery">
<dl class="gallery-item">
<dt class="gallery-icon portrait">
<img src="/imagePath/etc.jpg" class="attachment-thumbnail">
</dt>
</dl>
<dl class="gallery-item">
<dt class="gallery-icon portrait">
<img src="/imagePath/etc.jpg" class="attachment-thumbnail">
</dt>
</dl>
<dl class="gallery-item">
<dt class="gallery-icon portrait">
<img src="/imagePath/etc.jpg" class="attachment-thumbnail">
</dt>
</dl>
</div>
<p>Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed molestie augue sit amet.</p>
<ul>
<li>Item A</li>
<li>Item B</li>
<li>Item C</li>
</ul>
</div>
Desired Output
<div class="entry-content">
<div class="gallery">
<dl class="gallery-item">
<dt class="gallery-icon portrait">
<img src="/imagePath/etc.jpg" class="attachment-thumbnail">
</dt>
</dl>
<dl class="gallery-item">
<dt class="gallery-icon portrait">
<img src="/imagePath/etc.jpg" class="attachment-thumbnail">
</dt>
</dl>
<dl class="gallery-item">
<dt class="gallery-icon portrait">
<img src="/imagePath/etc.jpg" class="attachment-thumbnail">
</dt>
</dl>
</div>
<aside>
<p>Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed molestie augue sit amet.</p>
<ul>
<li>Item A</li>
<li>Item B</li>
<li>Item C</li>
</ul>
</aside>
</div>
You'll want to use a Dom Parser for this. Here's an example in how you can go about it using your markup as an example. Testing yielded the desired results, so hopefully this will give you the head start you need:
add_filter( 'the_content', 'wrap_nongallery_aside', 20 );
function wrap_nongallery_aside($content){
$dom = new DOMDocument();
$dom->loadHTML($content); // Replace with Edit below if PHP >= 5.4
$aside = $dom->createElement('aside');
$xpath = new DOMXPath($dom);
$not_gallery = $xpath->query('//div[#class="entry-content"]/*[not(contains(#class, "gallery"))]');
foreach($not_gallery as $ng){
$aside->appendChild($ng);
}
$dom->getElementsByTagName('div')->item(0)->appendChild($aside);
return $dom->saveHTML();
}
Edit:
If you're using PHP >= 5.4, then you can easily remove any extra <html> and <body> tags from the generated markup by using the following:
$dom->loadHTML($content, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
Maiorano84's answer worked beautifully, but prior to his reply I worked out an alternate method that's less specific to my situation, so I figured it'd be good to share.
I had originally written off the plugin approach because it requires changing post content itself - not just the format of the output, but realized that plugins live independent of the theme installation. Below is a very simple, developer targeted plugin that converts a [aside /] shortcodes into HTML elements. It's entirely based on BSD Aside by Sean D Burkin. I'll eventually include a button for the WP text editor and open source it.
<?php
/*
Plugin Name: RW Content Aside
Description: Inserts aside formatting into post content via shortcodes
Author: Daniel Redwood
Version: 0.1
Author URI: http://www.rdwd.fm/
Based on SBD Aside by Sean B. Durkin:
Original Plugin: http://seanbdurkin.id.au/pascaliburnus2/archives/51
Author: http://www.seanbdurkin.id.au
*/
if ( !is_admin() ){
add_filter('the_content', 'handle_rw_aside');
}
function generate_random_str( $length=10)
{
return substr(md5(rand()), 0, $length);
}
function generate_place_marker()
{
return '#' . generate_random_str( 10) . '#';
}
function GetBody( $aside_instruction) {
return preg_replace( '~^((<p>)? \S+\s*=\s*.*?(<br \/>|<\/p>)\n?)*~mi', '', $aside_instruction);
}
function handle_rw_aside($the_content)
{
$begin = generate_place_marker();
$end = generate_place_marker();
$new_content = preg_replace(
'~^((<p>)?\[aside\](<br />|</p>))(.*?)(^(<p>)?\[\/aside\](<br />|</p>))~ms',
$begin . '$4' . $end,
$the_content);
$new_content = preg_replace_callback(
'~^(<p>)?(!+\[\/?aside\])~m',
function ($match) {
return $match[1] . substr( $match[2], 1);
},
$new_content);
$pattern = '~'.$begin.'(.*?)'.$end.'~s';
return preg_replace_callback(
$pattern,
function ($match) {
$aside_instruction = $match[1];
$body = GetBody( $aside_instruction);
$aside = '<aside class="contentAside">' . $body . '</aside>';
return $aside;
},
$new_content);
}
?>

Add line breaks to mysql textarea

I create a simple backed area for my client to post new job openings and was wanting to give them the ability to format the text a little by adding line breaks in the job description text that will be visible on the front end.
The job openings are stored in a MySQL database.
Example of what I'm talking about:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla quis quam sollicitudin, bibendum enim a, vulputate turpis.
Nullam urna purus, varius eget purus quis, facilisis lacinia nibh. Ut in blandit erat.
I've would like the breaks to happen when my client hits enter / return on the keyboard.
Any help on this matter would be appreciated.
------------UPDATE------------
okay so after much trial and error I got it somewhat working.
I added this line in my upload / action code.
$description = nl2br(htmlspecialchars($_POST['description']));
Full upload code is:
<?php
include($_SERVER['DOCUMENT_ROOT'] . "/connections/dbconnect.php");
$date = mysql_real_escape_string($_POST["date"]);
$title = mysql_real_escape_string($_POST["title"]);
$description = mysql_real_escape_string($_POST["description"]);
$description = nl2br(htmlspecialchars($_POST['description']));
// Insert record into database by executing the following query:
$sql="INSERT INTO hire (title, description, date) "."VALUES('$title','$description','$date')";
$retval = mysql_query($sql);
echo "The position was added to employment page.<br />
<a href='employment.php'>Post another position.</a><br />";
?>
Then on my form I added this to the textarea, but I get an error.
FYI that is line 80 the error is refering to.
Position Details:<br />
<textarea name="description" rows="8"><?php echo str_replace("<br />","",$description); ?></textarea>
</div>
Here is what the error looks like.
Here is my results page code:
<?php
$images = mysql_query("SELECT * FROM hire ORDER BY ID DESC LIMIT 10");
while ($image=mysql_fetch_array($images))
{
?>
<li data-id="id-<?=$image["id"] ?>">
<div class="box white-bg">
<h2 class="red3-tx"><?=$image["title"] ?> <span class="date-posted blue2-tx"><?=$image["date"] ?></span></h2>
<div class="dotline"></div>
<article class="blue3-tx"><?=$image["description"] ?><br />
<br />
For more information please call ###-###-####.</article>
</div>
</li>
<?php
}
?>
If I delete all that error copy and write out a real position with line breaks it works.
I have no idea how to fix the error though.
Again any help would be appreciated.
Thanks!
you can use str_replace
$statement = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla quis quam sollicitudin, bibendum enim a, vulputate turpis.
Nullam urna purus, varius eget purus quis, facilisis lacinia nibh. Ut in blandit erat."
$statement = str_replace(chr(13),"<br/>", $statement);
query example : INSERT INTO table (statement) VALUES ('$statement');
hope this can help you
EDIT :
if you want display the result at textarea from database u can using this code
$des = $row['description'] //my assumption that your feild name at table inside mySQL is description
Position Details:<br />
<textarea name="description" rows="8"><?php echo str_replace("<br />",chr(13),$des); ?></textarea>
</div>
hope this edit can help your second problem
I would start by answering a couple of questions first
Do I want my database to store html-formatted user input?
Is the data going to be editable afterwards?
Since you seem to want only nl2br, a simple approach would be to save the content as is in the database, then use nl2br() on the output side as Marcin Orlowski suggested.

What’s wrong with my HTTP redirect?

I’m using the following code to redirect the user if he/she logged in correctly (see comments in code). But I’m getting an error. What am I doing wrong?
<?php
require 'inc/header.php';
require 'inc/config.php';
require 'inc/functions.php';
?>
<?
$login = $_POST['login'];
if($login==1)
{
$username = mysql_escape_string(trim($_POST['username']));
$passwd = mysql_escape_string(trim($_POST['passwd']));
$QUERY = "
SELECT
*
FROM
login
WHERE
username = '$username' and password='$passwd'
";
$result = send_query($QUERY);
$num_rows = mysql_num_rows($result);
$flag=0;
if($num_rows == 0)
{
//show_error('Invalid username');
$flag=1;
}
else
{
//this is correct login so i am trying to forward but i am geting error
//here
header('Location: admin_home.php');
exit;
}
}
?>
<div class="left">
<div class="left_articles">
<h2>ADMIN LOGIN</h2>
<p class="description"><?if($flag== 1 ) echo "invalid login" ; ?> </p>
<p><form action="admin.php" method="POST">
<table border="0">
<tbody>
<tr>
<td>Username</td>
<td><input type="text" name="username" value="" /></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" name="passwd" value="" /></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Login" /></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<input type="hidden" name="login" value="1" />
</form>
</p>
</div>
<B> AFTER LOGING INTO ADMIN PANEL YOU CAN DO FOLLOWING THINGS <B>
<p align="center">
<ul>
<li>Add new Jobtype</li>
<li>Add new Questions</li>
<li>Modify Selection Cretiria</li>
</ul>
</p>
</div>
<div id="right">
<div class="boxtop"></div>
<div class="box">
<p><img src="images/image.gif" alt="Image" title="Image" class="image" /><b>Akshay ipsum dolor sit amet</b><br />consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis.<br /></p>
<div class="buttons"><p>Read Mark</p></div>
</div>
<div class="boxtop"></div>
<div class="box">
<p><img src="images/image.gif" alt="Image" title="Image" class="image" /><b>Pako dolor sit amet</b><br />consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis.<br /></p>
<div class="buttons"><p>Read Mark</p></div>
</div>
</div>
<? require 'inc/footer.php' ?>
You'll want to issue a HTTP Header to redirect the client:
if ($redirect == true) {
//redirect
header("Location: http://www.mysite.com/noauth.php");
//And exit
exit;
}
See PHP Manual on Headers. You need to exercise some care when using headers: they have to be sent before any other output to the client. This includes any rogue white space you might have at the top of your php scripts, which will throw an error if you try and issue a new header.
If you haven't already printed any headers you could use header to redirect as below:
<?php
header("Location: B.php");
?>
Use
Header('Location: filename.php');
and you will be redirected to the filename.php.
This should do:
<?php
header('Location: page.php');
?>
See the header function. For more complicated redirect URLs, you might want to look at the http_redirect function.
You need to make sure you output the headers before outputting any regular content, or it won't work. You can check with headers_sent if necessary.
Content after outputting the HTTP header is allowed, but it won't be shown to the user under most circumstances. Usually it makes sense to just do an exit; right after the header statement.
The header("location: b.php";) is the way to go, on the comment by Thorarin, there should be no more output after the header command, other than either a die; or an exit();. Having content that should not be acted upon may be visible to search engine spiders that do not act upon the header("location"); command and they may follow links on the page that you don't want followed.
Also it wasnt mentioned, but if redirect is to a page that can only be accessed by a person that has logged in, you should be setting a session or use some other method so that you can be sure the person entering b.php actually is a verified / logged in user.
Bill H
header() technically expects a full url (i.e. http://example.com), but that's not the problem here.
headers must be sent before anything else is printed on the page (even whitespace)—take a look at line 5: that's one carriage return, that will cause your header()-call to fail
< ? php
require 'inc/header.php';
require 'inc/config.php';
require 'inc/functions.php';
? >
<-- what about this newline character?
< ?

Categories