I have a php script that has HTML in it.
I start by creating the top header section with menu buttons. Now the buttons work and you can click them.
Then there is a php code section where I connect to a MYSQL database and then use echo statements to output some HTML code. THen i close the PHP section add some HTML code the close the BODY and HTML.
Problem is ALL links created using the echo statements are "dead" they ARE displayed as links but you cant click them. Why is this?
Is seems like all the links before the php code work and all those in and after the php code statement dont...
Heres the code (shortened)
Code:<HTML><HEAD> <TITLE>test</TITLE> <style type="text/css"> .divScrollAuto {overflow:auto; white-space:nowrap;}</style> <script type="text/javascript"> function changeWidth(iid,img,divh) { var elem = document.getElementById(iid); var newImg = new Image(); newImg.src = img; var height = newImg.height; var width = newImg.width; elem.width=(divh/height)*width; elem.height=divh; } </script> </HEAD><BODY style="width: 1000px;height: 1000px;background-color: #FFFFFF; background-image: url(images/background1.png);background-repeat:no-repeat;"> <?php //get our vars $location = $_POST['searchLocation']; //etc...etc.... //connect to mysql database //get values while ($row = mysql_fetch_assoc($result)) { echo "<a href=\"/test/".strval($row["id"]).".php\" target=\"_blank\">".$row["test2"]."</a> - £".$row["test4"]."<br />"; } echo "</DIV><br /><br /><br /><br />Copyright © 2012, UK"; mysql_free_result($result); mysql_close($dbc); ?> <a href='http://www.mysite.co.uk' target='_blank'>GO BACK</a><br />//this link doesnt work either </BODY></HTML>




Reply With Quote