-
Newbie
Need Account creation files
can anyone help me on how to create an account creation webpage plz. i used one i got from a step by step from Zach but somehow it doesnt work.
this is the assacount.php
<?php
include("config.php");
if (isset($_POST['AddAccount'])) {
if ($_POST['Username'] > "" && $_POST['Password'] > "") {
$validchars = "abcdefghijklmnopqrstuvwxyz0123456789";
$valid = true;
for ($i = 0; $i < strlen($_POST['username']); $i++) {
if (strpos($validchars,strtolower(substr($_POST['username'],$i,1))) === false){
$valid = false;
**
**
for ($i = 0; $i < strlen($_POST['Password']); $i++) {
if (strpos($validchars,strtolower(substr($_POST['Password'],$i,1))) === false){
$valid = false;
**
**
if ($valid == true) {
$query = "SELECT BillID FROM tblBillID WHERE BillID = '".$_POST['Username']."'";
$result = mssql_query($query,$conn);
if (mssql_num_rows($result) > 0) {
echo "<b>Account name in use.</b>";
** else {
$accquery = "INSERT INTO tblBillID (BillID,Password) VALUES('".$_POST['Username']."','".$_POST['Password']."')";
$accresult = mssql_query($accquery,$conn);
echo "<b>Account Added</b>";
**
** else {
echo "<b>You didn't fill out all the required fields.</b>";
**
** else {
echo "dont try to hack me biatch!";
**
echo "<br><br>";
**
?>
<table border="0">
<tr>
<td class="mytext">
<u>Add an Account</u><br>
<form action="addaccount.php" method="post">
<table border="0">
<tr>
<td>Username</td>
<td><input type="text" name="Username" height="5" maxlength="12" style="width: 100px;"></td>
</tr>
<tr>
<td>Password</td>
<td><input type="text" name="Password" height="5" maxlength="10" style="width: 100px;"></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Add" name="AddAccount"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
this is the config.php
<?php
//MSSQL Host IP
$db_host = 'localhost';
//MSSQL Username
$db_user = 'RMGS';
//MSSQL Password
$db_pass = 'S#d885fk';
//MSSQL Database
$db_name = 'redmoon';
$conn = mssql_connect($db_host,$db_user,$db_pass);
mssql_select_db($db_name,$conn);
?>
and this is the index.html
Welcome to <Your Server Here><br>
To Play:<br>
Download RedMoon 3.5, and RedMoon 3.8 patch from <a href="http://redmoon.edenii.com/downloads.php">here</a><br>
Make sure to install it to a different directory than diosa is installed to<br>
Get the info.dll <a href="info.dll">here</a><br>
Add an account <a href="addaccount.php">here</a><br>
MAPS LIST <a href="maps.txt">HERE</a><br>
Enjoy!
by the way i did this procedure, also how can i make it secured
Installing Apache/PHP
------------------------------
1.) First thing's first is to install Apache. To do this, you need to download and install it to its default directory. You can download Apache here:
http://apache.mirrors.hoobly.com/ht...-x86-no_src.exe
2.) Next, you want to download the PHP files and extract them to a folder named php in C. When you extract the PHP files, it makes a subfolder inside of your php folder. You need to cut all the files out of C:\php\php-4.3.7-Win32\ and place them into C:\php. If you've done this correctly, all files should be in C:\php.
You can download the PHP files here:
http://us3.php.net/get/php-4.3.7-Wi...0431aab2561e7fc
Now bare with me, this takes a lot of computer knowledge and file moving. Please do the following if you want to have a good running Apache/PHP server.
3.) After installing Apache, you want to open "httpd.conf" under Start > Programs > Apache HTTP Server > Configure Apache Server
Once you have that opened, scroll down until you see the LoadModule section. It should have # signs infront of LoadModule. At the bottom of this list you want to make a space for a line you're about to put in. You want to insert the following line under the LoadModule section without the # sign:
LoadModule php4_module c:/php/sapi/php4apache.dll
There's 2 more lines you need to add into the httpd.conf file. Once that first line is entered in, scroll down until you see AddModule and at the bottom of this list is where you enter this next line without the # sign:
AddModule mod_php4.c
The last line you need to enter is pretty tricky to find. Scroll down about 3/4 the way down till you see AddType. If you can't find it go up to Edit and Find and type in AddType and first AddType you come to is where you need to add this line without the # sign:
AddType application/x-httpd-php .php
Now you've added all the lines into httpd.conf and now can close and save what you just edited.
4.) Next, we need to go make the "php.ini" file and put it into your C:\WINDOWS\ directory. To make php.ini, you need to Cut "php.ini-dist" located in C:\php and place it into your C:\WINDOWS\ directory. Once it's placed there, right click on php.ini-dist and rename it to "php.ini". Now you should be able to open this file in Notepad.
Now we need to do some editing in "php.ini". Open php.ini and scroll down until you see "Paths and Directories" or just Find it under Edit. Under Paths and Directories, you need to edit the following lines:
; Directory in which the loadable extensions (modules) reside.
extension_dir = ".\"
To:
; Directory in which the loadable extensions (modules) reside.
extension_dir = "c:\php"
Now that you have that line in there, scroll down until you find a bunch of extension files with ; in front of them. In this list of extensions, you need to remove the ; infront of:
;extension=php_mssql.dll
Now you can close out of php.ini and save the editing you just did.
5.) Now we'll start moving files around to make Apache work. First file to move we'll start with "php.ini". If you still have your WINDOWS folder open, copy php.ini and paste it into:
C:\Program Files\Apache Group\Apache\
Next, you'll want to copy "php_mssql.dll" from C:\php\extensions\ and paste it in the following:
C:\php\
C:\WINDOWS\system32\
Now, you'll want to copy "php4ts.dll" from C:\php\sapi(C:\php\ if it's not there) and paste them in the following:
C:\php\
C:\Program Files\Apache Group\Apache\
C:\WINDOWS\system32\
-------------------------------------------------------------------------------
Congratulations! If you've gotten this far, you have done everything correctly. Now you can go to Start > Programs > Apache HTTP Server > Start Apache in Console. If you don't get any errors, then you have done everything right. All your php files that you want to execute in Internet Explorer go in C:\Program Files\Apache Group\Apache\htdocs. To run these, for example, you would type in Internet Explorer:
http://yourIP/filename.php
If you come across a problem when giving your external IP to others and it forwards them to http://localhost/filename.php, the easy fix to this is to open your httpd.conf and scroll down to where it says:
# 127.0.0.1 is the TCP/IP local loop-back address, often named localhost. Your
# machine always knows itself by this address. If you use Apache strictly for
# local testing and development, you may use 127.0.0.1 as the server name.
#
ServerName localhost
You would change "localhost" to your external IP so it forwards them to that IP when they click on your link.
I hope everything above has helped as much as it did for me writing it. Good luck everyone!
Writen by,
Logan H
With help by,
Kijyata
this is the link but it wont work
http://24.47.5.108/index.html
-