Hi! My department had annouced a educational program. I want them to register the program online and created username & password to edit/update their information later (Which will be a secure area for every applicants). Email notification for every submission and edited to the applicant. Is there such scripts out there ? Thanks for any advice!
My server specification:
-WIN2000AdvancedServer
-IIS 5.0
-MySQL
Create online registration?
Moderator: General Moderators
- tecktalkcm0391
- DevNet Resident
- Posts: 1030
- Joined: Fri May 26, 2006 9:25 am
- Location: Florida
Create a database and table for users. Have every piece of information as a coulmn have it add the username password ect. then email them (try SwiftMailer (google it)) then have them check there email and then when they open the link a column named accountactive would be set to 1 and then they can login and add there information.
http://www.swish-db.com/tutorials/view.php/tid/601
This is a bit overhelming but describes everithing what u need...
Focus on recording data to MySQL
here is sample code from myself:
Note: You gotta have your mysql table structure build first before you use this script. and im too lazy to do a ful tutorial here
This is a bit overhelming but describes everithing what u need...
Focus on recording data to MySQL
here is sample code from myself:
Code: Select all
<?
//Register New Profiel
$db_server="server.com";
$db_user="username_of_server";
$db_pass="password";
$db_name="database_name";
$db = mysql_connect($db_server, $db_user, $db_pass);
mysql_select_db($db_name, $db);
//Record data to db
if(isset($submit_registration)){
$date=date("Y-m-d");
$sql = "INSERT INTO user SET " .
"user='$user',".
"pass='$pass',".
"email='$email',".
"fullname='$fullname',".
"address='$address',".
"city='$city',".
"state='$state',".
"zip='$zip',".
"reg_date='$date'";
if (mysql_query($sql)) {
//echo "<center><b>$name added<b></center><br>";
//echo "Row ID:". mysql_insert_id();
$reg_status="ok";
session_register("username"); // register name
session_register("password"); // register username and password as session variables.
}else{
if( mysql_errno() == 1062){
//echo "Username $username alredy exist!";
$reg_status="username_error";
}else{
$reg_status="error";
//echo("<P><b>Error:</b> " .mysql_error() . "</P> Error#:". mysql_errno());
//exit();
}
}
}
?>Note: You gotta have your mysql table structure build first before you use this script. and im too lazy to do a ful tutorial here
Thank you so much! I will try it myself!
alexus wrote:http://www.swish-db.com/tutorials/view.php/tid/601
This is a bit overhelming but describes everithing what u need...
Focus on recording data to MySQL
here is sample code from myself:Code: Select all
<? //Register New Profiel $db_server="server.com"; $db_user="username_of_server"; $db_pass="password"; $db_name="database_name"; $db = mysql_connect($db_server, $db_user, $db_pass); mysql_select_db($db_name, $db); //Record data to db if(isset($submit_registration)){ $date=date("Y-m-d"); $sql = "INSERT INTO user SET " . "user='$user',". "pass='$pass',". "email='$email',". "fullname='$fullname',". "address='$address',". "city='$city',". "state='$state',". "zip='$zip',". "reg_date='$date'"; if (mysql_query($sql)) { //echo "<center><b>$name added<b></center><br>"; //echo "Row ID:". mysql_insert_id(); $reg_status="ok"; session_register("username"); // register name session_register("password"); // register username and password as session variables. }else{ if( mysql_errno() == 1062){ //echo "Username $username alredy exist!"; $reg_status="username_error"; }else{ $reg_status="error"; //echo("<P><b>Error:</b> " .mysql_error() . "</P> Error#:". mysql_errno()); //exit(); } } } ?>
Note: You gotta have your mysql table structure build first before you use this script. and im too lazy to do a ful tutorial here