Hi, I have implemented an events system on my website which allows the administrator to add/edit events etc...
Currently, these events are displayed (via a pop up window) on the homepage. However, all the new lines entered in the text area of the admin form do not show in the pop-up, causing the text to merge into one long line.
Here is the URL of the homepage: http://www.something-simple.co.uk
Here is the code I am using inside the pop-up to display the events:
<?PHP
require("events/inc/conn.php");
?>
<!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">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Something Simple - The funk band to get you in moshun!</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<LINK REL="SHORTCUT ICON" HREF="somethingsimple.jpg">
<style type="text/css" media="screen">
/* <![CDATA[ */
@import url(event.css);
/* ]]> */
</style>
</head>
<body>
<div id="content">
<?php
if(isset($_GET['eventID']) ) {
$eventID = $_GET['eventID'];
$result=mysql_query("select * from tblEvents WHERE eventID=".$eventID);
while($row=mysql_fetch_array($result)) {
$details=$row['eventDetails'];
$date=$row['eventDate'];
$venue=$row['eventVenue'];
$details = str_replace("<BR>","<br />",$details);
?>
<h1><span class="orangeBackground"><? print $venue; ?> Details</span></h1>
<p></p>
<h2><span class="whiteBackground"> <? print $date . " - " . $venue; ?></span></h2>
<p></p>
<p><? print $details; ?></p>
<?php
}
mysql_close($conn);
}?>
</div>
</body>
</html>
You can see i am trying to replace all the <BR>s with a <BR /> to print to the browser, but it is not working. I chose the change from '<BR>' because that is what is listed in my MySQL entry:
"<BR> Something Simple @ Chats Palace:<BR> Chats Palace,<BR> Homerton,<BR> Hackney.<BR> <BR> Other bands include: AIRSTRIP ONE<BR> ONE SOCK<BR> BONE DEEP CRU<BR> MC DOORMATT<BR> £4 on door.<BR> Bring a video camera and film anything and everything for our documentory!<BR>"
For example.
Any ideas on how to get the new lines to display?
Also, how can i list the events on order of the closest date first on the home page?
Thanks