Hi everyone,
I have the following data which is inserted by our director using a page that I created in php. This data is inserted using only one field.
I would like to display the data exactly the way it shows here in this example, one row under the other one. Is that possible?
December 9, 10 – Spanish/Sociales Exams
December 10 – 5:30 pm – Christmas Show
December 16, 17 – Secondary English subject area Exams
December 17 – Last day of school before the Holidays
January 11, 2010 – First day back to school after the Holidays
This is the select that I have to bring the information from my database:
$host="Host name";
$username="Mysql username";
$password="Mysql password";
$db_name="Database name";
$tbl_name="Table name";
//<font face="Arial, Helvetica, sans-serif"></font>Connect to server and select databse.
$con=mysql_connect("$host", "$username", "$password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
$db_selected = mysql_select_db("$db_name", $con);
mysql_select_db("$db_name")or die("cannot select DB");
$sql= "select post from my_table order by id desc limit 1";
$result=mysql_query($sql);
$row3 = mysql_fetch_assoc($result);
mysql_close($con);
This is how I'm displaying the data right now:
echo $value['sport'] . '<br>';