Here’s what I am trying to achieve:
I’m using MYSQLi objectively.
I connect to the database with:
<?php
$mysqli= new mysqli(
'xxxxx', #host
'xxxxx', #username
'xxxxx', #password
'xxxxx'); #database name
if ($mysqli->connect_error)
{
die("Connect Error: $mysqli->connect_error");
}
?>
I have an auto-incrementing ID field, a ‘Title’ Field, ‘Description’ field and a field which contains the URL to an image so I can use
<img src="<url from database>" alt="<title from database>" />
I need to have it formatted the same way as the picture and I’m stuck on how to separate the data so each row is formatted this way to form what will be a portfolio of artwork.
Doing this for a school project so any help is greatly appreciated.
1 Answer