PHP adding data to a MySQL database

Hi there,

After following a simple tutorial to create a form that allows you to add data to a database, I’m having a bit of trouble working out how to add something that will show line breaks in the data added when I have it displayed on the web page. The form is basically made up of a few multiline text boxes and it goes into the database as a sort of list, but when its displayed on the web page its all pushed onto one line. Is there a simple solution to this? If you need to look at the code used for adding the data, I’ve posted it below,

Thanks for your time :slight_smile:

<?php
$host="localhost"; 
$username="predator_jeff"; 
$password="giggsy"; 
$db_name="predator_senior_matches"; 
$tbl_name="junior"; 

$month = $_POST['month'];
$day = $_POST['day'];
$date = $_POST['date'];
$comp = $_POST['comp'];
$venue = $_POST['venue'];
$draw = $_POST['draw'];
$fish = $_POST['fish'];

mysql_connect("$host", "$username", "$password")or die("cannot connect server "); 
mysql_select_db("$db_name")or die("cannot select DB"); 


$sql="INSERT INTO $tbl_name (month, day, date, comp, venue, draw, fish) VALUES ('$month', '$day', '$date', '$comp', '$venue', '$draw', '$fish')"; 
$result=mysql_query($sql); 

if($result){ 
echo "Successful"; 
echo "<BR>"; 
echo "<a href='senior.php'>Go Back</a>"; 
} 

else { 
echo "ERROR"; 
} 

mysql_close();
?>