Jump to content


Photo

link to db prob


  • Please log in to reply
4 replies to this topic

#1 soldier81

soldier81
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 02 March 2006 - 10:13 AM


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>

#2 willpower

willpower
  • Members
  • PipPipPip
  • Advanced Member
  • 296 posts
  • LocationWarrington, Cheshire, UK

Posted 02 March 2006 - 12:24 PM

How are you connecting to your DB?

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


Will
Wait...I've got it...Bollocks, it's gone again!

If at first you don't succeed....stop using ASP and get onto PHP

#3 soldier81

soldier81
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 02 March 2006 - 12:33 PM

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>


#4 shocker-z

shocker-z
  • Members
  • PipPipPip
  • Advanced Member
  • 864 posts
  • LocationNottingham

Posted 02 March 2006 - 12:43 PM

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

www: www.ukchat.ws | irc: irc.ukchat.ws chan: #blufudge

#5 soldier81

soldier81
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 02 March 2006 - 12:52 PM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users