logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > PHP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 05-21-2012, 08:49 PM   #1
tony09uk
 
Join Date: Oct 2010
Posts: 340
Default Dynamic link displays lightbox :s

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
tony09uk is offline   Reply With Quote
Old 05-22-2012, 07:43 AM   #2
davidj
davidj's Avatar
 
Join Date: Sep 2005
Location: The Toon (newcastle upon Tyne)
Posts: 8,256
Default

I cant really help without seeing the code in action. Contact me via my signature and I will try and help.
__________________
Would you like to learn PHP from me? Check out -> www.codezenith.co.uk
davidj is offline   Reply With Quote
Old 05-23-2012, 12:00 AM   #3
tony09uk
 
Join Date: Oct 2010
Posts: 340
Default

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.
tony09uk is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:16 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com