Jump to content

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


rockonxox

Recommended Posts

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>"); 
} 
} 

?>

Link to comment
Share on other sites

  • 2 weeks later...

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

**Bump**

 

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

 

Your two links give me an HTTP 404...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.