Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Going from Signup to Add a Record

Quote Reply
Going from Signup to Add a Record
I wanted to send users after signing up straight to 'add a record' to fill their profiles without having to login. I searched the forums and found a solution by JPD for DBMan flat file version.

Here is the code:
___________________________________________________________
You can add the following to sub signup, after the new password is written to the file. The code needs to go after the username is written to the .pass file:

print PASS "$in{'userid'}:$encrypted:$permissions\n";
close PASS;

# This should send the new signup straight into the script instead of making them login again.
$in{'login'} = 1;
$db_uid = "";
($status, $uid, $per_view, $per_add, $per_del, $per_mod, $per_admin) = &auth_check_password;

if ($status eq "ok") {
$db_script_link_url = "$db_script_url?db=$db_setup&uid=$db_uid";
($db_userid) = $db_uid =~ /([A-Za-z0-9]+)\.\d+/; } &html_signup_success;
}

JPD
________________________________________________________

I tried this with SQl version but it does not work. Need help in adapting this to the SQL version. Would greatly appreciate any suggestion on how to approach this.


Quote Reply
Re: Going from Signup to Add a Record In reply to
Welp, the reason it won't work is that the codes are meant to open a flat file and print data to it...

What you could do use hard-coded SQL statements to add the "encrypted" password in the MySQL table, although you will have to set the Password field to BINARY for this to work.

Regards,

Eliot Lee