I have a list of numbers on a table like this:
n | Title— | Content
1 | Page1 | Page one content
2 | Page2 | Page two content
I’m tying to get the title and content from the number for example:
if (1) {
echo Title;
echo Content;
}
And get:
Page1 – Page one content
The code I have so far after I connect to the database is:
$page = 1;
$rows = mysql_fetch_array(mysql_query("SELECT * FROM $tbl_name"));
// Retrieve data from database
$sql="SELECT * FROM $tbl_name";
$result=mysql_query($sql);
//check data
while($page == mysql_fetch_array($result)){
$head = $rows['Title'];
$content = $rows['Content'];
}
It’s not to good but I don’t know where to start.
I found out how to do it..
This gets the Header and Content from the row where Page = $page.
Sorry if you miss understood the question.