PDA

View Full Version : Dynamic link displays lightbox :s


tony09uk
05-21-2012, 07:49 PM
I have created two pages, page one:

include("includes/connect.php");

$article = mysql_query("SELECT article_id, title, content, DATE_FORMAT(date, '%d %b %y')
FROM article
ORDER BY article_id
DESC
LIMIT 10");

while($row = mysql_fetch_array($article)){

echo "<p><span class='news_date'><strong>" . $row['3'] . "</strong></span><br/>";
echo "<span class='news_heading'><strong>" . $row['1'] . "</strong></span>";
echo "<br/>";

$wstring = explode("\n", wordwrap($row['content'], 200, "\n") );
echo $wstring[0];
echo "<a href=\"fullArticle.php?id=" . $row['article_id'] . "\"> ...(Read More)</a>";

echo "</p>";

echo "<img src='images1/r_bg.gif' alt='picture' width='100%' height='8' class='floated' />";

}

page two:


include("includes/connect.php");

$fullArticle = mysql_query("SELECT content FROM article WHERE article_id = $_GET[id]");

while($row = mysql_fetch_array($fullArticle)){
echo $row['content'] . "</br><a href=\"articles.php\">Go Back</a>";
}


I have tried to include these scripts into some files on a site I am building, but when I use include() all I get when I click on a link is a lightbox in the middle of my screen, what am I doing wrong.....they work fine until i include them.

Ive had a play and it seems it the links, but I cant work out what. Even the link in the while loop in page two does the same

davidj
05-22-2012, 06:43 AM
I cant really help without seeing the code in action. Contact me via my signature and I will try and help.

tony09uk
05-22-2012, 11:00 PM
david thanks for the offer. Im not the type of person who likes to give up without a fight though and Ive worked it out :)

My problem was in the head of the document, there was a jquery lightbox command, god knows why it was there, but getting rid of it has sorted the problem, thanks again for the offer.