$name = $_POST['agent_name'];
$username = $_POST['username'];
$emailaddress = $_POST['emailaddress'];
$password = sha1($_POST['pword']); // or $password = md5($_POST['pword']);
$usertype = $_POST['usertype'];
$gid = $_POST['gid'];
$params = "admin_language=
language=
editor=
helpsite=
timezone=0";
$command = "INSERT INTO jos_users VALUES ('',
'".addslashes($_POST[name])."', '".addslashes($_POST[username])."',
'".addslashes($_POST[emailaddress])."', '$password',
'".addslashes($_POST[usertype])."', 0, 0,
'".addslashes($_POST[gid])."', now(), now(), '', '$params')";
$result = mysql_query($command, $db);
$need_id1=mysql_insert_id();
$command = "INSERT INTO jos_core_acl_aro VALUES ('', 'users', '$need_id1', '0', '".addslashes($_POST[name])."', 0)";
$result = mysql_query($command, $db);
$need_id2=mysql_insert_id();
$command = "INSERT INTO jos_core_acl_groups_aro_map VALUES ('18', '', '$need_id2')";
$result = mysql_query($command, $db);
Subscribe to:
Post Comments (Atom)
Popular Posts
-
Variables are important in every programming language — and it’s no different in PHP. Variables give developers the possibility of temp...
-
What? Hide the .php extension of your PHP files in the URL of your site address. Instead of: http://www.example.com/page.php Visitors to ...
-
Questions : 1 Who is the father of PHP ? Answers : 1 Rasmus Lerdorf is known as the father of PHP. Questions : 2 What is the...
-
Change Db settings here C:\xampp\htdocs\modx\core\xpdo\xpdo.class Line 2920 $this->config['dsn']= $dsn; $this->con...
-
<form action="" name="" method="post"> <p><b>user:</b> <input type="text...
-
Redirection is process of forwarding one URL to a different URL. There are three main kinds of redirects online; 301, 302 and meta refres...
-
Questions : 1 What is database or database management systems (DBMS)? and - What’s the difference between file and database? Can files...
-
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script...
-
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Add More Elements...
No comments:
Post a Comment
Thank you for your Comment....