Jump to content

Retrieving Record From MySQL


ChompGator

Recommended Posts

Hello,

 

I have a script, that retrieves a record from a MySQL database,but right now its displaying all the information it retrieves on one line...But I want it to display the ID and Article Name on one line, then the "Article" on the line below that...So How would I create like a line break after the article name, so the description displays below ID and Article Name

 

Code:

<?php
$con = mysql_connect("","","") or die('Could not connect: ' . mysql_error());
mysql_select_db("legion", $con);
$result = mysql_query("SELECT * FROM signalscadet");

while($row = mysql_fetch_assoc($result)){

echo "ID: ".$row['id'].", Article Name:".$row['articlename']

.", Date:".$row['date'].", Description:".$row['description']."<br/>";

}
?>

 

 

Thanks,

Link to comment
https://forums.phpfreaks.com/topic/140403-retrieving-record-from-mysql/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.