I have been trying to learn php and have been getting better day by day but still fighting cant wait till everything just falls into place and flow. (With other programming languages it worked that way for me fight for a while then everything just works)
but I am trying to make it return a random account and display all there photos along with data.
Here is my example code
<?php
$config['db'] = array(
'host' => 'DATA',
'username' => 'WOULD',
'password' => 'GO',
'dbname' => 'HERE'
);
$db = new PDO('mysql:host=' . $config['db']['host'] . ';dbname=' . $config['db']['dbname'], $config['db']['username'], $config['db']['password']);
$query = $db->query("SELECT `content`.`ProfilePic` FROM `content`");
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
$Hello = $row['ProfilePic'];
echo '<html><img src="http://www.MYDOMAIN.COM/Content/';
echo $Hello;
echo '"></html>';
}
?>
So what this is doing is returning everyones profile pics on one page Not quite what I want
I have it where in a feild on my mysql data base it has a unique Id for each account I would like it to randomly pic one of those then return all the data for that row
FirstName
LastName
Gender
City
State
FacebookUrl
BirthMonth
BirthDay
BirthYear
AccountNumber - This is the one I want to pull and use to return everything
ProfilePic
ProfilePicCaption
So basically pick a random row and pull all the data instead of displaying all the data for one column
Thank you any and all help is awesome and at least now im using secure code