Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple display error has evolved , but cant work out why...

Status
Not open for further replies.

pjwraith

Technical User
May 17, 2002
12
GB
I have a simple search and results display page designed. Its been working fine but suddenly over xmas it has changed...

One of the fields in the database is a weblink to a page, I have set a default value of (sample) in the database in case no link was contained, this leads to a page saying no webpage available for this person. However this is no longer happening, the link bar at the bottom of explorer shows the links when hovering pointing to
I have put the PHP code snippet below, is this still ok? Can anyone think of a reason this would happen?

Code:
$sql = "select * from aromaol where town = '".$_POST['seek']."' or postcode = '". $_POST['seek'] ."'"; 
$result = mysql_query($sql,$conn)or die (mysql_error());  


if (mysql_num_rows($result)==0){
echo "No Match Found";
}else{
while ($row = mysql_fetch_assoc($result)){
echo &quot;Name: &quot; .$row['forename'].&quot; &quot;.$row[&quot;surname&quot;].&quot;<br>&quot;;
echo &quot;&quot;.$row[&quot;town&quot;].&quot;<br>&quot;; 
echo &quot;Tel No: &quot;.$row['telno'].&quot;&quot;; 
echo &quot;  Mobile No: &quot;.$row[&quot;mobno&quot;].&quot;<br>&quot;;

echo &quot;Link:  <a href=\&quot;[URL unfurl="true"]http://&quot;.$row[/URL]['weblink'].&quot;\&quot;>Visit their webpage</a><br><br>&quot;;
?>



Thanks for you help in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top