Jump to content
  • 0

Register & Login Script



Dear Metin2Dev Community,

I'm kind of new to web developing, and I'm in need of help. I'm trying to use a registration & login script to my website. But I've no idea where to put the php files, I've tried to use FileZilla, but it is just giving me errors.
Can anybody here help me, telling me where to put 'em or linking any tutorial. All kind of help is very much appreciated.

Kind Regards,


Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Config - server information

$dbhost = "serverip";
$dbuser = "root";
$dbpass = "mysqlpass";
$mysql_db = "account";

Register page (only php)

include('config.php'); // server config
if(isset($_POST['submit']) && $_POST['submit'] == 'Register') {
$username = mysql_real_escape_string($_POST['username']);
$passwd = mysql_real_escape_string($_POST['passwd']);
$passwd2 = mysql_real_escape_string($_POST['passwd2']);
$email = mysql_real_escape_string($_POST['email']);
$social_id = mysql_real_escape_string($_POST['social_id']);
if($passwd == $passwd2) {
$sql = "INSERT INTO account SET login = '".$username."' password = PASSWORD('".$passwd."') email = '".$email."' social_id = '".$social_id."'";
$result = mysql_query($sql);
if($result) { echo "Register ok"; } else { echo "Register declined"; }

  • Eyes 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.