Jump to content


Photo

Link to query based on %id, but show on new page w/ just that id's data...


  • Please log in to reply
2 replies to this topic

#1 rockonxox

rockonxox
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 01 December 2005 - 12:22 AM

Okay, another ? but since it pertains to a different database I'm using a new topic. Click on a link, and you will see that the results show between the previous code... which is expected because I don't know how to do this any other way. Also, when I click on the ID, no info is shown... at least not on the 0_horselist.php link. Don't mind the layout, I'm not worried about looks till I get the queries & all working.

Here is the site in it's current state: [a href=\"http://visionseq.com/hfhorses/0_horselist.php\" target=\"_blank\"]http://visionseq.com/hfhorses/0_horselist.php[/a]
What I want it to look like: [a href=\"http://visionseq.com/hfhorses/0_listhorseinfo.php\" target=\"_blank\"]http://visionseq.com/hfhorses/0_listhorseinfo.php[/a]

Is this possible?

I'm also looking for information on how to let users search my database, so any resources I can look at would rock. I've got the search form, now I just need to figure out how to make it do something!

---------

Here is my code for 0_horselist.php:


<?php
include 'horsesearch_connect.php';
include 'opendb.php';

 if(isset($showdetails)){ 

  $id=(int)$_GET['showdetails']; 
  
  $result=mysql_query("SELECT * FROM hlist WHERE ID=$id");
  $row=mysql_fetch_array($result);
   
  echo "<center><h3>{$row['title']} {$row['name']}</h3>" .
         "<hr color=black width=25%>" .
         "<font color=grey>#{$row['id']}</font> {$row['year']} {$row['color']} {$row['breed']} {$row['sex']}<br>" .
         "{$row['sire']} x {$row['dam']}" .
         "<hr color=black width=25%><P>" .
         "A Picture would go here<P>" .
         "<table width=80% border=1 bordercolor=white cellpadding=5 cellspacing=0><tr><td bgcolor=black width=40%><center><font color=white><b>Sire Info</b></font></center></td><td bgcolor=black width=40%><center><font color=white><b>Dam Info</b></font></center></td></tr>" .
         "<tr><td>Sire info would go here</td><td>Dam info would go here</td></tr></table><p>" .
         "<table width=80% border=1 bordercolor=white cellpadding=5 cellspacing=0><tr><td bgcolor=black width=40%><font color=white><center><b>Offspring</b></center></font><td bgcolor=black width=40%><font color=white><center><b>Notes</b></center></font></td></tr> " .
         "<tr><td>{$row['progeny']}</td><td>{$row['notes']}</td></tr></table><p>" .
         "<table width=80% border=1 bordercolor=white cellpadding=5 cellspacing=0><tr><td bgcolor=black><center><center><font color=white><b>Show Record</b></font></center></td></tr>" .
         "<tr><td>" .
         "<b>Competes In:</b> {$row['discipline']}<P>" .
         "{$row['showrecordlink']}</td></tr></table>" .
         "<p>" .
         "<table width=80% border=1 bordercolor=white cellpadding=5 cellspacing=0><tr><td bgcolor=black><center><center><font color=white><b>View Photos</b></font></center></td></tr>" .
         "<tr><td>" .
         "Not working, this really sucks!<P>";
}
else{
$result=mysql_query("SELECT * FROM hlist"); 

while($row=mysql_fetch_array($result)){

echo("<tr><td><a href=?showdetails=$id>"."{$row['id']}</a></td>"."<td>{$row['title']} {$row['name']}</td>"."<td>{$row['year']}</td>"."<td>{$row['breed']}</td>"."<td>{$row['sex']}</td>"."<td>{$row['forsale']}</td>"."<td>{$row['canbreedto']}</td>"); 
} 
} 

?>


#2 rockonxox

rockonxox
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 14 December 2005 - 03:45 PM

**Bump**

Can anyone help... or do I need to explain myself better? Hopefully it's understandable!!!

#3 Cook

Cook
  • Members
  • PipPipPip
  • Advanced Member
  • 64 posts
  • LocationSingapore

Posted 15 December 2005 - 03:30 AM

[!--quoteo(post=327441:date=Dec 14 2005, 11:45 PM:name=rockonxox)--][div class=\'quotetop\']QUOTE(rockonxox @ Dec 14 2005, 11:45 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
**Bump**

Can anyone help... or do I need to explain myself better? Hopefully it's understandable!!!
[/quote]

Your two links give me an HTTP 404...
Cook




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users