Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 109,493 PHP Programmers for FREE! Ask your question and get quick answers from experts. There are 1,187 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



PHP/MySQL and lightbox intergration problem.

 
Reply to this topicStart new topic

PHP/MySQL and lightbox intergration problem.

Ändrew
post 29 Jun, 2008 - 05:36 PM
Post #1


New D.I.C Head

*
Joined: 21 Apr, 2008
Posts: 46


My Contributions


Ok iv been trying to make a place where i can show off my screenshots but it seems not to be working with this error!
CODE
Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in /home/donclurd/public_html/82ndairborn/screenshots.php on line 20

But to my brain tells me HTML and Php wont go together with out alot of tweeking!
php
<?php
include 'header.php';
include 'body.php';
?>
<head>
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
</head>
<?php
include 'config.php';
include 'opendb.php';

$query = "SELECT filePath, name FROM screenshots ";
$result = mysql_query($query);

while($row = mysql_fetch_assoc($result))

echo "<a href="$row['title']" rel="lightbox"" .
"title="$row['content']"></a>";


include 'closedb.php';
?>
<?php
include 'footer.php';
?>

Can any body see it because iv gone over it over and over!
User is offlineProfile CardPM

Go to the top of the page


MitkOK
post 29 Jun, 2008 - 10:22 PM
Post #2


D.I.C Regular

Group Icon
Joined: 9 Aug, 2007
Posts: 281



Thanked 9 times

Dream Kudos: 225
My Contributions


Here is your fixed line, but I don't see the text of the link ?
php
echo "<a href=\"".$row['title']."\" rel=\"lightbox\" title=\"".$row['content']."\"></a>";


This post has been edited by MitkOK: 29 Jun, 2008 - 10:25 PM
User is offlineProfile CardPM

Go to the top of the page

Ändrew
post 30 Jun, 2008 - 11:48 PM
Post #3


New D.I.C Head

*
Joined: 21 Apr, 2008
Posts: 46


My Contributions


Thank-you
The link is kept in a the database is called apon through filepath.

This post has been edited by Ändrew: 30 Jun, 2008 - 11:48 PM
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 9/7/08 02:17PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month