• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Syntax Error?

Custom Title Activated
Loyal Member
Joined
Jun 27, 2009
Messages
1,571
Reaction score
170
Hey Y'all,

So I decided to recode my home page. But I think I'm getting Syntax Error.

When I use this Code; the website works fine.

PHP:
<?php
$getmyphoto = mysql_query("SELECT * FROM camera_web WHERE user_id='$id'");
while($rowing = mysql_fetch_assoc($getmyphoto)){
$photo = $rowing['url'];
$time = $rowing['timestamp'];
echo '
<div class="habblet-container">
<div class="cbb clearfix green">
<div class="habblet box-content" style="align:left">
								<b>Posted on:</b>
								<hr>
								<div><img src="'.$photo.'">
								<hr>
								</div>
								</div>
								</div>
								</div>


';
}
?>

When I add this line to where it shows Posted On: it breaks the page making it all white.

Code:
' . date('l d F Y g:i:s', .$timestamp. '

I'm trying to get it to show Date that the image was posted on.
 
Last edited:
Junior Spellweaver
Joined
May 21, 2011
Messages
154
Reaction score
47
You need to use the close parenthesis and you missplaced the concatenation operator.

Code:
' . date("l d F Y g:i:s", $timestamp) . '
 
Upvote 0
Back
Top