Menu
Hi All,
I am totally new to php and, although I have managed to make a sucessful feedback and search/view_search page, I have no idea how to make the returned results link back to the relevant html pages. The results are just static and uselessif they cannot link to a page. If you want to look at the page concerned, the url is: [url]http://www.stracwebdesign.co.uk/mannerings/pages/search.php
I am a student and this is my project, any help would be welcome!
I realise this question has been asked many times across various forums but I can’t make sense of the replies.
[code=php]
<tr>
<td align="left">22</td>
<td align="left">Denmark</td>
<td align="left">Detached</td>
<td align="left">4</td>
<td align="left">999.999</td>
<td align="left">Yes</td>
<td align="left">Double</td>
</tr>
[/code]
[code=php]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Manning & Davidson - Estates of Distinction</title>
<link href="../css/manning&davidson.css" rel="stylesheet" type="text/css" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</style>
<script language="JavaScript1.2" type="text/javascript" src="mm_css_menu.js"></script>
<script src="../Scripts/swfobject_modified.js" type="text/javascript"></script>
<link href="../css/manning&davidson.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div align="center">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="800" height="125" align="absmiddle" id="FlashID" title="Manning & Davidson logo">
<param name="movie" value="../includes/nonmusiclogo.swf" />
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="8.0.35.0" />
<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
<param name="expressinstall" value="../Scripts/expressInstall.swf" />
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object data="musiclogo.swf" type="application/x-shockwave-flash" width="800" height="125" align="absmiddle">
<!--<![endif]-->
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="8.0.35.0" />
<param name="expressinstall" value="../Scripts/expressInstall.swf" />
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player unless you are using a 64 bit browser. Adobe currently offer no support for 64 bit browsers.</h4>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
</div>
<p> </p>
<script type="text/javascript">
swfobject.registerObject("FlashID");
</script>
</body>
</html>
<link href="../css/manning&davidson.css" rel="stylesheet" type="text/css" />
<h1 id="mainhead">Search For Houses</h1>
<h5>View Houses for Sale by Country</h5>
<div align="center">
<form action="view_search.php" method="post">
<select name="country">
<option value="null">Please select a country</option>
<option value="Denmark">Denmark</option>
<option value="France">France</option>
<option value="Germany">Germany</option>
<option value="Iceland">Iceland</option>
<option value="Iraq">Iraq</option>
<option value="Mexico">Mexico</option>
<option value="Portugal">Portugal</option>
<option value="Saudi Arabia">Saudi Arabia</option>
<option value="South Africa">South Africa</option>
<option value="Spain">Spain</option>
<option value="Sweden">Sweden</option>
<option value="United Kingdom">United Kindom</option>
<option value="United States">United States</option>
</select>
<input type="submit" name="submit" value="Search" />
<input type="hidden" name="submitted" value="TRUE" />
</form>
</div>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="../css/manning&davidson.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id ="footer">
<div align="center">© Copyright 2010- <a href="http://www.stracwebdesign.co.uk">Stracwebdesign.co.uk</a> [Site last updated by Paul Strachan on 25/06/2010]
<p></p></div>
<div align="center">
<a href="mailto:[email protected]">Please click here to email us with any queries you may have.</a>
</div>
<div align="center"><div id ="footer"></div>
<div align="center"><a href="index.php">Home</a>||<a href="detached.php">Detached</a>||<a href="semi.php">Semi Detached</a>||<a href="terraced.php">Terraced</a>||<a href="search.php">Search</a>||<a href="feedback.php">Feedback</a></p><p></p></div>
[/code]
the code looks promising, so, in the example of Header1, Header2, I would just continue with Header3 etc and an additional href echo to each page?[/QUOTE]-exactly.
<td align="left"><b>House ID</a></b></td>
<td align="left"><b>Country</a></b></td>
<td align="left"><b>House Type</a></b></td>
<td align="left"><b>Bedrooms</a></b></td>
<td align="left"><b>Price</a></b></td>
<td align="left"><b>Heating</a></b></td>
<td align="left"><b>Garage</a></b></td>
echo '<tr>
<td align="left">' . $row['house_id'] . '</td>
<td align="left">' . $row['country'] . '</td>
<td align="left">' . $row['house_type'] . '</td>
<td align="left">' . $row['bedrooms'] . '</td>
<td align="left">' . $row['price'] . '</td>
<td align="left">' . $row['heating'] . '</td>
<td align="left">' . $row['garage'] . '</td>
</tr>
';
$query = "SELECT house_id, country, house_type, bedrooms, price, heating, garage FROM houses WHERE country = '$name' ORDER BY $order_by";
$result = mysql_query ($query); // Run the query.
if(mysql_num_rows($result)>0)
{
echo '<table cellpadding="1" cellspacing="1" border="0">';
echo '<th>1</th>';
echo '<th>2</th>';
while($row=mysql_fetch_row($result))
{
echo '<td><a href="t1.php">'.$row[0].'</a></td>';
echo '<td><a href="t2.php">'.$row[1].'</a></td>';
}
}
?>[/QUOTE]
0.1.9 — BETA 5.6