Page 1 of 1

Profile card

Posted: Fri Mar 01, 2019 8:26 pm
by HankRock
I've been working on creating a way to do a type of profile card for each person who signs up and have come up with the following:

$servername = "";
$username = "username";
$password = "password";
$dbname = "users";
$conn = mysqli_connect($servername, $username, $password, $dbname) or die("Connection failed: " . mysqli_connect_error());
$sql = "SELECT avatar, fullname, extra7, extra1, extra2, extra3, extra4, extra8, extra9 FROM data WHERE extra8<>'Guest' and active='1'";
$resultset = mysqli_query($conn, $sql) or die("database error:". mysqli_error($conn));
while( $record = mysqli_fetch_assoc($resultset) ) {
<div class="card hovercard">
<div class="cardheader">
<div class="avatar">
<img alt="No Image Available" src="<?php echo IMAGE_DIR . $record[avatar]; ?> "height="100px" width="100px" >
<div class="card-body info">
<div class="title">
<div class="desc"><?php echo $record['fullname']; ?></div>
<div class="desc">Cell- <?php echo $record['extra7']; ?></div>
<div class="desc"><?php echo $record['extra1']; ?></div>
<div class="desc"><?php echo $record['extra2']; ?>, <?php echo $record['extra3']; ?>, <?php echo $record['extra4']; ?></div>
<div class="desc"><?php echo $record['extra9']; ?></div>
<?php } ?>

It works great, creating what basically is a list showing the records... I'd like to get it into 2 columns, but have been unable to figure out how.

Any suggestions?