Hey guys,
as part of my project I am trying to make it so each record in my database has it's own page in a fashion similar to:
http://domain.com/Customer.php?customer_name="John Doe"
And this will echo all the information in the table about John Doe. (In the future I would like to have an edit button which takes me to Customeredit.php?customer_name="John Doe"
So far I have grabbed the name and echo'd it into the header.
Here is what I have so far:
<?PHP
Require 'Configuration.php';
?>
<h2>
<?PHP
$sql="SELECT id,customer_name FROM Customers";
$result =mysql_query($sql);
while ($data=mysql_fetch_assoc($result)){
?>
<?php echo $data['customer_name']; } ?>
</h2>
I am slightly confused as to why it is echoing all the information. into the header. I have these two records in my database:
John Doe
Jeff
It is making the header
John Doe Jeff
As seen here:
http://rhino.minepress.co.uk/Customer.php?customer_name="Jeff"
Thanks in advance!