I still haven't been able to figure out how to write the form info into a database when submitting the form. maybe I'm going about it wrong but I would normally do this to write to a database, this code is working right now as an action page locally:
<?php
$con = mysql_connect("localhost","root","root");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("registration_db", $con);
$sql="INSERT INTO registrants (FirstName, LastName, City, State, Zip, Address, Address2, Phone, Email, Function)
VALUES('$_POST[FirstName]','$_POST[LastName]','$_POST[City]','$_POST[State]','$_POST[Zip]','$_POST[Address]','$_POST[Address2]','$_POST[Phone]','$_POST[Email]','$_POST[Function]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "1 record added";
mysql_close($con)
?>
In the generated ecart form the action is already assigned using a PHP_SELF statement.
What I want to do is have the information write to the database but also continue on to the shopping cart display for confirmation, then to PayPal for payment.
so I guess I'm saying that the problem isn't writing to the database but integrating the above action into the ecart generated files.