|
-
Jul 10th, 2007, 12:48 PM
#1
Thread Starter
Frenzied Member
How to search results, and post data
I wanted to make a text box, and the user put data into it, hit search, and have it post back to the page the data it found, i cant figure it out, any help?
PHP Code:
<!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=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<?php
require_once ('connect.php');
require_once ('opendb.php');
$query = "SELECT * FROM search_data";
$result = @mysql_query ($query);
$count = mysql_num_rows($result); //number of results
if ($count > 0){
echo "found $count results.<br /><br />\n";
while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
echo ' <tr><td align="left">' . $row['zipcode'] . '</td><td align="left">' . $row['redirect_url'] . '</td></tr>';
}
}else{
echo "No results found";
}
?>
</body>
</html>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|