|
You last visited: Today at 10:09
Advertisement
register page (fr/en)
Discussion on register page (fr/en) within the Rappelz Private Server forum part of the Rappelz category.
09/08/2012, 19:39
|
#1
|
elite*gold: 0
Join Date: Jun 2012
Posts: 5
Received Thanks: 0
|
register page (fr/en)
Hello,
I want to make a register page.
I search in the forum and I found that I could use php .But it is very hard to install the extension "mssql" because we can' t install it with php version 5.3.x or + ( you know it is the problem "undefined function" with "mssql_connect()" or " sqlsrv_connect()" )
I would like to know what is the best programming language to do my register page ; and if you have the time, I would be grateful if you can give me some informations to help me
Thank you
Bonjour,
J' essaie de faire une page d' inscription (sur une base de donnée mssql, bien entendu).
J' ai cherché un moyen de la réaliser en php, mais je n' arrive pas à ajouter les extensions "mssql" et j' ai donc des erreurs "undefined function" avec "mssql_connect()" ou " sqlsrv_connect()" ).
J' aimerais savoir quel est le meilleur langage de programmation pour réaliser cette page. Et si vous avez le temps j' aimerais bien avoir quelques informations bonus pour m' aider à la réaliser
Merci
|
|
|
09/08/2012, 21:41
|
#2
|
elite*gold: 0
Join Date: Oct 2010
Posts: 2,555
Received Thanks: 2,459
|
Firstly I would recommend you use SQLSRV or PHP Driver 3.0+ not sure if a new version has been released. I also recommend you use IIS 7.5+ with that said here is a basic regi script with no protection built in:
-- HTML Form for entering info --
Code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Registration</title>
</head>
<body bgcolor="black" style="color:white;">
<form action="register.php" method="post">
<h1>User Registration:</h1>
This is a basic registration form.<br/>
<p>
<table border="2">
<tr>
<td>Name:</td><td><input name="user" type="text" size"20"></input></td>
</tr>
<tr>
<td>Password:</td><td><input name="pwd" type="text" size"20"></input></td>
</tr>
<tr>
<td>Age:</td><td><input name="age" type="number" size"20"></input></td>
</tr>
<tr>
<td>Email:</td><td><input name="email" type="text" size"20"></input></td>
</tr>
</table>
<input type="submit" name="submit" value="submit"></input>
</form>
</body>
</html>
-- PHP for registering --
Code:
<?php
//Define Connection
$database_name = "127.0.0.1";
$database_user = "sa";
$database_pass = "password";
$auth_name = "Auth";
$sql_error ="Your connection info is incorrect....";
$connectionInfo = array( "Database"=>"$auth_name", "UID"=>"$database_user", "PWD"=>"$database_pass", 'ReturnDatesAsStrings'=>true, "CharacterSet"=> 'utf-8');
$connect = sqlsrv_connect( $database_name, $connectionInfo) or die($sql_error);
//Define $_POST variables
$data_array = $_POST;
$array_char = array("'","/","\\","*",":","!","?",".", "&", "%", "ù","^", "$", "=","¨","}","{","(",")","~","#","[","]","ç","à","é","€","§",";","¤","°","£","`","<",">");
$user = $data_array['name'];
$user = str_replace($array_char, "", $user);
$password = $data_array['pwd'];
$password = str_replace($array_char, "", $password);
$passwordconf = $data_array['pwdconf'];
$passwordconf = str_replace($array_char, "", $passwordconf);
$combine_password = $md5_key.$password;
$converted_password = md5($combine_password);
$age = $data_array['age'];
$age = str_replace($array_char, "", $age);
$email = $data_array['email'];
$email = str_replace($array_char, "", $email);
//Insert User Query
$insert = "INSERT Accounts( login_name,password,block,withdraw_remain_time,age ,auth_ok,pcbang,last_login_server_idx,event_code,result,ip,email ) VALUES('$user','$converted_password',0,0,'$age',1,0,1,0,1,'$ip','$email')";
//Check if User Exists Query
$check_name = "SELECT * FROM Accounts WHERE login_name = '$user'";
$check_name_return = sqlsrv_query($connect, $check_name);
$check_name_fetch = sqlsrv_has_rows($check_name_return);
//Perform Script Trigger Checks
if($check_name_fetch === FALSE){
sqlsrv_query($connect, $insert);
echo "Registration Successful!";
}
if($check_name_fetch === TRUE){
echo "The username you have tried already exists!";
}
else
{
echo "An error has occured please tell Drow!";
}
?>
I just wrote this up and lord knows there will probably be an error or two, if you have any problems just make a post and I'll help ya get going mate.
|
|
|
09/08/2012, 22:55
|
#3
|
elite*gold: 0
Join Date: Jun 2012
Posts: 5
Received Thanks: 0
|
Hi,
Thank you for answering. It is very well explained, but the "register.php" return me an error : "Fatal error: Call to undefined function sqlsrv_connect()".
I think I have this error because I 've not installed the extension "mssql" correctly.
I saw in many forums that a lot of people had the same problem, but I didn't find solutions.
I' m using wampserver : with PHP 5.4.3 and apache 2.2.22
|
|
|
09/08/2012, 23:16
|
#4
|
elite*gold: 0
Join Date: Oct 2010
Posts: 2,555
Received Thanks: 2,459
|
Quote:
Originally Posted by rappelzp
Hi,
Thank you for answering. It is very well explained, but the "register.php" return me an error : "Fatal error: Call to undefined function sqlsrv_connect()".
I think I have this error because I 've not installed the extension "mssql" correctly.
I saw in many forums that a lot of people had the same problem, but I didn't find solutions.
I' m using wampserver : with PHP 5.4.3 and apache 2.2.22
|
You need to install PHP Driver 3.0 I can not provide support installing this to Apache as I only use IIS 7.5, google "Install PHP Drive 3.0 on Apache 2.2" or "Install SQLSRV on Apache 2.2" once you have installed it and enabled it in your PHP.INI the "Undefined function" error should stop happening
|
|
|
Similar Threads
|
How To ISS 7 Register Page and Help Page And Guild
12/16/2011 - Rappelz Private Server - 3 Replies
Hello ,
IIS 7 to the registration page . Good Luck..
ISS 7 Register Page and Help Page And Guild Page - YouTube
Result
589896 - YouTube
|
[HELP]EO Register Page
02/28/2011 - EO PServer Hosting - 3 Replies
Hello ! I have a small problem whit my eo reg page !
I work since 6 AM on it but can't fix it !
I don't know what is th problem , I try to change mysql 5 but then can't use db !
I change my webserver but php is down !
I know how to creat a server / site !
|
Register page
06/08/2010 - CO2 Private Server - 2 Replies
Now the last thing i need is a register page for the 5165 source.
I use the one from arcos thread.
Well, I ve searched around forum, but all i found is for sql.
Anyone for ini?
|
Help with register page?
04/22/2009 - CO2 Private Server - 12 Replies
When i register it keeps saying "Register Failed" over and over.
|
All times are GMT +2. The time now is 10:09.
|
|