You are here: Re: Splitting a Search into Pages « PHP Programming Language « IT news, forums, messages
Re: Splitting a Search into Pages

Posted by Alec on 09/05/05 10:02

Sorry guys but have now come a little unstuck with this after trying
some of the methods.

Its only day 6 of learning php......

So back to basics. The page below allows a user to type in a name of a
town, and search for companies from this town with certain criteria
(using two tables to cross check the town name).

What exactly do I need to split this search into groups of say 5
companies.

Sorry guys, but this is early days for me.... Thanks in advance

Alec

<title>New Page 1</title>
</head>

<body>

<?php
$connection = mysql_connect('localhost', 'uks49179', 'FWE4872xd');
$db = mysql_select_db("test", $connection);
?>

<?php $townsearch = $_GET['town']; ?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">
<p align="center">
<input type="text" name="town" size="20" value="<?php echo
$townsearch; ?>" />&nbsp;
<input type="submit" value="GO" />
</form>

<?php
$result = @mysql_query ("SELECT name, townname, town, townid FROM
site01_towns, site01_details WHERE townname='$townsearch' AND
town=townid AND code='kids'");
while ($row = mysql_fetch_array($result))
{
$company = $row['name'];
echo $company;
}
?>

</body>

</html>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация