Your script includes some function what i have not used yet so i can't directly help with that script..
Hopefully these of script will give some help.. These scripts are in the use at my finnish site..
list.php
<?php
include("navi.html");
// Connect info to database
$connect = mysql_connect("localhost","user","pass") or
die("Time out !");
// Select database "members"
mysql_select_db("members",$connect) or
die("Database not found !");
// Geting all info from cinfo-table
$query = "SELECT * FROM cinfo ORDER BY lastname,firstname";
// Suoritetaan kysely
$search = mysql_query($query, $contact) or
die("Error in query !");
echo "<h1>Members list</h1>";
echo "<p>Members count: " . mysql_num_rows($search) .".</p>";
echo "<p><strong>Infor update need by pressing the link.</strong></p>";
echo "<table border=1>";
echo "<tr>";
echo "<td><b>Line</b></td>";
echo "<td><b>Lastname</b></td>";
echo "<td><b>Firstname</b></td>";
echo "<td><b>Email</b></td>";
echo "</tr>";
$j = 1;
for ($i = 0; $i < mysql_num_rows($search); $i++)
{
$line = mysql_result($search, $i, "line");
$lastname = mysql_result($search, $i, "lastname");
$firstname = mysql_result($search, $i, "firstname");
$email = mysql_result($search, $i, "email");
echo "<tr><td><a href=\"infor/index.php?id=$line\" target=\"_blank\">$j</a></td>";
echo "<td>$lastname</td>";
echo "<td>$firstname</td>";
echo "<td>$email</td></tr>";
$j++;
}
echo "</table>";
// Close the connect
mysql_close($connect);
?>
add-form.php
<form action="add-script.php" method="GET">
<h1>Add member</h1>
<p>Lastname:<br>
<input type="text" name="lastname" size="30">
</p>
<p>Firstname:<br>
<input type="text" name="firstname" size="30">
</p>
<p>Email:<br>
<input type="text" name="email" size="40">
</p>
<p> <input type="submit" value="Save">
<input type="reset" value="Reset">
</p>
</form>
add-script.php
<?php
include("navi.html");
// Get info from form
$fristname = $_GET['fristname'];
$lastname = $_GET['lastname'];
$email = $_GET['email'];
// Connect info to database
$connect = mysql_connect("localhost","user","pass") or
die("Time out !");
// Select database "members"
mysql_select_db("members",$connect) or
die("Database not found !");
// Adding info to cinfo-table
$query = "INSERT INTO cinfo (lastname, firstname, email)
VALUES ('$lastname', '$firstname', '$email')";
// Quering
$search = mysql_query($query, $connect) or
die("Error in query ! Infos not added.");
echo "Member have been added.";
// Printing tables info at the end
// Close database connect.
mysql_close($connect);
?>
"Hasty can't do, skilled don't rush"
"Life is like a camel; you can make it do anything except back up." - Marcelene Cox
"It's not who I am underneath, but what I do that defines me." - Batman begins