JamesFlowers
Programmer
My Code (as below), connects to the DB , returns a list of customers from the table , how can I pass this to a second php page to read into a sql on that PHP to return the clients details?
Many thanks
James
<?php
$link = mysql_connect('*******') or die('Could not connect: ' . mysql_error());
mysql_select_db('*****') or die('Could not select database');
$query = "select customerName from customers order by customerName";
$result = mysql_query($query) or die(mysql_error());
$dropdown = "<select name='users'>";
while($row = mysql_fetch_assoc($result)) {$dropdown .= "\r\n<option value='{$row['customerName']}'>{$row['customerName']}</option>";}
$dropdown .= "\r\n</select>";
echo $dropdown;
?>
James Flowers
Crystal Consultant
Many thanks
James
<?php
$link = mysql_connect('*******') or die('Could not connect: ' . mysql_error());
mysql_select_db('*****') or die('Could not select database');
$query = "select customerName from customers order by customerName";
$result = mysql_query($query) or die(mysql_error());
$dropdown = "<select name='users'>";
while($row = mysql_fetch_assoc($result)) {$dropdown .= "\r\n<option value='{$row['customerName']}'>{$row['customerName']}</option>";}
$dropdown .= "\r\n</select>";
echo $dropdown;
?>
James Flowers
Crystal Consultant