[Beds] PHP AND MYSQL
Lee Larcombe
lee at larcombe.uk-internet.org.uk
Sat Nov 26 15:31:25 GMT 2005
I don't really do php - if you wanted perl then I could help more. However,
I think the query should be something like this:
<?
mysql_connect(localhost);
@mysql_select_db(contacts) or die( "Unable to select database");
$query="SELECT firstname, lastname FROM addressbook";
@result=mysql_query($query);
mysql_close();
$details=mysql_result($result,$i,"addressbook");
echo "$details";
?>
Sorry I can't help you fully, but it might be a start. If you want a
solution in perl, then I would be happy to send you something a bit more
useful.
Regards
Lee
On 26/11/05 11:21 am, "Stephen Elliott" <techweb at ntlworld.com> wrote:
> Hi,
>
> I have got a database called contacts with a table called addressbook inside
> it. I need to create a PHP/HTML form where the user can enter the contacts
> firstname or lastname and it will run a query and display the results in a
> table.
>
> Does anyone have any ideas on how to do this?
>
> Cheers
> Steve...
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.362 / Virus Database: 267.13.8/183 - Release Date: 25/11/2005
>
>
> _______________________________________________
> Beds mailing list
> Beds at mailman.lug.org.uk
> http://mailman.lug.org.uk/mailman/listinfo/beds
More information about the Beds
mailing list