post complete code, $row is not used anywhere in your code,
so better you write php code where needed,
dont include all static html code in php echo.
urtrivedi
Posting Virtuoso
1,724 posts since Dec 2008
Reputation Points: 299
Solved Threads: 366
Skill Endorsements: 24
just need whole code otherwsie cant find error
urtrivedi
Posting Virtuoso
1,724 posts since Dec 2008
Reputation Points: 299
Solved Threads: 366
Skill Endorsements: 24
i dont find error in ur code, its compiles well
urtrivedi
Posting Virtuoso
1,724 posts since Dec 2008
Reputation Points: 299
Solved Threads: 366
Skill Endorsements: 24
are u sure u going to put some $row value in this javascript?, if not, then just keep this script out of php, becasue if u keep it in loop, the script will generate number of times the records are in ur query.
or use something like,
title="<?php echo $row['somevalue']; ?>";
urtrivedi
Posting Virtuoso
1,724 posts since Dec 2008
Reputation Points: 299
Solved Threads: 366
Skill Endorsements: 24
Question Answered as of 4 Months Ago by
urtrivedi Do what urtrivedi has advised and remove all your html and javascript from the php and see if your problem is resolved
while($row = mysql_fetch_array($result)){ ?>
<div class="BoxContainer">
<div class="contentBox">
<span class="inBoxTitle green">A box</span>
<!-- Demo Button! -->
<button class="botGreen" id="botSmallPic1">Picture 1</button>
</div>
</div> <!-- .BoxContainer -->
<script type="text/javascript">
// ======== Box
$("#botSmallPic1").click(function(){
$.smallBox(
{
title: "",
content: "",
color: "#ec008c",
img: "",
icon: ""
}
);
});
</script>
<?php } ?>
And you won't need to call the external js file in your while loop so move <script src="/css/static/js/box.js"></script> to your head
simplypixie
Practically a Master Poster
642 posts since Oct 2010
Reputation Points: 157
Solved Threads: 118
Skill Endorsements: 5