cs1h Posted September 17, 2007 Share Posted September 17, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/69661-solved-help-with-more-info-button/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.