Hi have confussed myself,
can you see why i cant get a new pic to be displayed in the box on click please ?
<HTML><HEAD><TITLE></TITLE><META content="text/html; charset=utf-8" http-equiv=Content-Type><META name=GENERATOR content="MSHTML 10.00.8400.0"><STYLE type=text/css>BODY {
FONT-FAMILY: verdana, arial, sans-serif
}</STYLE>
</HEAD><BODY>
<FORM style="BORDER-TOP-COLOR: ; BORDER-BOTTOM-COLOR: ; BORDER-RIGHT-COLOR: ; BORDER-LEFT-COLOR: " method=post action=refresh>
<TABLE cellSpacing=2 cellPadding=1 width="100%" border=1>
<TBODY>
<TR>
<TD><INPUT style="HEIGHT: 22px; WIDTH: 43px" size=1 value=0000 name="clickcount"></TD></TR>
<TR><php$con = mysql_connect("localhost", "bubber", "xyz");
if (!$con){ die('Could not connect: ' . mysql_error()); }mysql_select_db("base1", $con);
//----------------------------------------------//----------------------------------------------
$result = mysql_query("SELECT * FROM `xpic` ORDER BY RAND() LIMIT 0,1;");echo "<TABLE border=9><TBODY><TR>
<P></P><TH>xxxx</TH></TR>";
<TD>
while($row = mysql_fetch_array($result))
{
echo "<TR>";
echo '<TD><IMG border=0 name=abc hspace=0 alt=abc123 src="',$row['pic'],'" width=300 height=343></A></TD>';
echo "</TR>";
}
echo "</TBODY></TABLE>";
mysql_close($con);
?>;
</TD></TR>
<TR>
<TD><INPUT type=submit value="change pic" name=click onclick= picchange()></TD></TR></TBODY></TABLE></FORM>
<SCRIPT language=javascript type=text/javascript>
function pcchange()
{
A = document.frmOne.clickcount.value;
A = Number(A);
C = A+1;
document.frmOne.clickcount.value = C;
return colourchange();
<SCRIPT language=javascript type=text/javascript>
function colourchange()
{
var red=Math.floor(Math.random()*256)
var green=Math.floor(Math.random()*256)
var blue=Math.floor(Math.random()*256)
document.frmOne.clckcount.style.backgroundColor = "rgb("+red+","+green+","+blue+")";
return newpic();
<SCRIPT language=javascript type=text/javascript>
function newpic()
{
document.frmOne.cabc.value = <php$con = mysql_connect("localhost", "bubber", "xyz"); if (!$con){ die('Could not connect: ' . mysql_error()); }mysql_select_db("base1", $con);
//----------------------------------------------//----------------------------------------------
$result = mysql_query("SELECT * FROM `xpic` ORDER BY RAND() LIMIT 0,1;");echo "<TABLE border=9><TBODY><TR>
<P></P><TH>xxxx</TH></TR>";
while($row = mysql_fetch_array($result))
{
echo "<TR>";
echo '<TD><IMG border=0 name=abc hspace=0 alt=abc123 src="',$row['pic'],'" width=300 height=343></A></TD>';
echo "</TR>";
}
echo "</TBODY></TABLE>";
mysql_close($con);
?>
}
</SCRIPT>
}
</SCRIPT>
}</SCRIPT>
</BODY></HTML>