I have a paid website and after the transaction is complete i have a page with posted variables of the user that just paid. Want to create a script to take those posted variables and create a new user in the database.
have this so far but does not work
<?
$_POST['customer_fn'];
$_POST['customer_ln'];
$_POST['email'];
$_POST['username'];
$_POST['password'];
$password = $_POST['password'];
$con = mysql_connect("-----","-----","-------");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("deyette_gallery", $con);
mysql_query("INSERT INTO `deyette_gallery`.`deyette_gallery_User` (g_id, g_userName, g_fullName, g_hashedPassword, g_email, g_language, g_locked )
VALUES ('', '$_POST[username]','$_POST[customer_fn]$_POST[customer_ln]', '$password', '$_POST[email]', '$_POST[en_US]', '0')");
mysql_close($con);
?>
Table structure for table deyette_gallery_User
Field Type Null Default
g_id int(11) No
g_userName varchar(32) No
g_fullName varchar(128) Yes NULL
g_hashedPassword varchar(128) Yes NULL
g_email varchar(255) Yes NULL
g_language varchar(128) Yes NULL
g_locked int(1) Yes 0
Posts: 7994
That's a G2 table. Moving this to the G2 forums.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git
Posts: 8339
You should use the gallery framework to create the user, other things need to happen besides the DB entry.
pass your user $_POST for $args, but hash your pass first.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2