Hi Everyone,
I'm currently using the following code to insert information into a database using a form. How can all this information be selected from the table and inserted into an Array.
Code:
<?php
$con = mysql_connect("localhost","peter","abc123");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("WB", $con);
$sql="INSERT INTO Birds (Name, Species, Sex)
VALUES
('$_POST[Name]','$_POST[Species]','$_POST[Sex]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "1 record added";
mysql_close($con)
?>
Resulting in each record having its own "numeric array store" starting at 0
Many Thanks,