Jump to content

Archived

This topic is now archived and is closed to further replies.

soldier81

link to db prob

Recommended Posts


this is part of a rollover script im using on my site it works wen the target is just another php page but fails wen it has to call on the database any ideas where i went wrong

<td width="7%" bgcolor="#<?php echo "$bgcolor" ?>"><a href="profile.
<php?fileId=<?php echo $row["id"]; ?>"><onMouseOver="hiLite('k','k2','Your Comment Here')"
onMouseOut="hiLite('k','k1','')"><img name="k" src="images/k1.png" img border="0px"></td>

Share this post


Link to post
Share on other sites
How are you connecting to your DB?

You do not show the code which accesses $row["id"];


Will

Share this post


Link to post
Share on other sites
wen the code is like this it connects to the db no prob but i want to insert a rollover imgage and the way i went about that was the way i done it on my other buttons but the other buttons dont request the db

<--connects to db no probs-->
<tr>
<td width="7%" bgcolor="#<?php echo "$bgcolor" ?>"><a href="profile.php?fileId=<?php echo $row["id"]; ?>"><img border="0" title="View Profile" src="images/theme/<?php echo "$theme_col" ?>/k1.png"</a></td>

<--connects to db but rollover has stopped working-->

<td width="7%" bgcolor="#<?php echo "$bgcolor" ?>"><a href="profile.php?fileId=<?php echo $row["id"]; ?>"><onMouseOver="hiLite('k','k2','Your Comment Here')" onMouseOut="hiLite('k','k1','')"><img name="k" src="images/k1.png" img border="0px"></td>

Share this post


Link to post
Share on other sites
try using

<td width="7%" bgcolor="#<?php echo "$bgcolor" ?>"><a href="profile.php?fileId=<?php echo $row['id']; ?>"><onMouseOver="hiLite('k','k2','Your Comment Here')"
onMouseOut="hiLite('k','k1','')"><img name="k" src="images/k1.png" img border="0px"></td>


Think u had you PHP tags messed up a bit.


Edit: sorry i'm at work and a bit slow! lol

Share this post


Link to post
Share on other sites
is there any diff in that code and the second one i posted if so its made no change and i cant seem to spot the difference

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.