Jump to content

Recommended Posts

Hi,

 

I have written a database search php script for my database, but what I want to do now is add a more inforamtion button to it. I have tried searching for help on the internet but not found any. The more information button will be on each result and will display all the information for a result on a new page but I am not sure how to do this.

 

My script so far is,

 

<?


mysql_connect("localhost","adder","clifford"); 


mysql_select_db("real") or die("Unable to select database"); 

$keywords = preg_split("/[\s,]+/", trim($_POST['keyword']));
$sql = "SELECT * FROM items WHERE country='" . mysql_real_escape_string($_POST['menuFilesDMA']) . "' AND type='" . mysql_real_escape_string($_POST['Type']) . "' AND Abstract LIKE '%$keyword%'";

$result = mysql_query($sql);
$num_rows = mysql_num_rows($result);
if($num_rows == 0) {
echo "No results please try a different <a href=asearch.html>search</a>.";
} else {
while($row = mysql_fetch_array($result)) {
$Country = $row['country']; 
$Type = $row['type'];
echo "<img src=http://www.myroho.com/searchthumbs/$Country$Type.png> <br>"; // <---I want this line to get the picture--->
echo "<b>Name:</b> ".$row['name'] . "<br> "; 
echo "<b>Email:</b> ".$row['Email'] . " <br>"; 
echo "<b>Country:</b> ".$row['Country'] . "<br> "; 
echo "<b>Type:</b> ".$row['Type'] . " <br>";
echo "<b>Title:</b> ".$row['Title'] . "<br> "; 
echo "<b>Abstract:</b> ".$row['Abstract'] . " <br>"; 
echo "<b>Article:</b> ".$row['Article'] . " <hr>"; 
}
}
?> 

 

If any one can help it will be much appriciated,

 

Thanks

Colin

Link to comment
https://forums.phpfreaks.com/topic/69661-solved-help-with-more-info-button/
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.