[help needed] registration

04/24/2010 05:15 [DEV]AlphaOMEGA#1
[Only registered and activated users can see links. Click Here To Register...]
it never did this before im using a reg php script from dkunderground
my registration page from my site wont work
any ideas im not very brite with php
i just design site havent go to php coding yet
04/24/2010 05:20 daddycool.#2
Nice design, anyway check the line 65 of your register.php or post the script here.
04/24/2010 05:24 [DEV]AlphaOMEGA#3
PHP Code:
<?php

// fill in your mssql info here
$mssql = array(
        
'host' => "i placed ip here",
        
'user' => "sa",
        
'pass' => "i placed pass here"
    
);

echo 
"<center>";

if(
$_POST['activ'] == '1') {
    
        
$con mssql_connect($mssql['host'],$mssql['user'],$mssql['pass']);

        
$result1 mssql_query("SELECT * FROM account.dbo.USER_PROFILE WHERE user_id = '".$_POST['accname']."'",$con);
        
$result2 mssql_query("SELECT * FROM account.dbo.Tbl_user WHERE user_id = '".$_POST['accname']."'",$con);
        
$result3 mssql_query("SELECT * FROM account.dbo.Tbl_user WHERE user_mail = '".$_POST['accmail']."'",$con);

        
$row1 mssql_num_rows($result1);
        
$row2 mssql_num_rows($result2);
        
$row3 mssql_num_rows($result3);
        
        
$dk_time=strftime("%y%m%d%H%M%S");
         list(
$usec1$sec1) = explode(" ",microtime());
         
$dk_user_no=$dk_time.substr($usec1,2,2);


        if(empty(
$_POST['accname']) || empty($_POST['accpass1']) || empty($_POST['accpass2'])|| empty($_POST['accname']) || empty($_POST['accmail'])) {
            echo 
"<br>You didnt fill in all fields<a href='javascript:history.back()'>Go Back</a>";
        } elseif(
$row1 '0' || $row2 '0') {
            echo 
"<br>This Account name already exists.<a href='javascript:history.back()'>Go Back</a>";
        } elseif(
$row3 '0') {
            echo 
"<br>This E-Mail is already in use.<a href='javascript:history.back()'>Go Back</a>";
        } elseif(
$_POST['accpass1'] != $_POST['accpass2']) {
            echo 
"<br>The passwords did not match<a href='javascript:history.back()'>Go Back</a>";
        } elseif(
$_POST['accpass1'] == $_POST['accname']) {
            echo 
"<br>Account name and password are the same.<a href='javascript:history.back()'>Go Back</a>";
        } elseif(!
preg_match("/^[0-9a-zA-Z]{3,15}$/i"$_POST['accname'])) {
            echo 
"<br>Enter a account name only with 0-9 , a-z and A-Z.<a href='javascript:history.back()'>Go Back</a>";
        } elseif(!
preg_match("/^[0-9a-zA-Z]{3,15}$/i"$_POST['accpass1'])) {
            echo 
"<br>Enter a password only with 0-9 , a-z and A-Z.<a href='javascript:history.back()'>Go Back</a>";
        } elseif(!
preg_match("/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/i",$_POST['accmail'])) {
            echo 
"<br>Your e-Mail is not correct.<a href='javascript:history.back()'>Go Back</a>";
        } elseif(
strlen($_POST['accname']) < || strlen($_POST['accname']) > 15) {
            echo 
"<br>The Accountname must at least 3 indications long and may maximally 15 indications long.<a href='javascript:history.back()'>Go Back</a>";
        } elseif(
strlen($_POST['accpass1']) < || strlen($_POST['accpass1']) > 15) {
            echo 
"<br>The Password must at least 3 indications long and may maximally 15 indications long.<a href='javascript:history.back()'>Go Back</a>";
        } else {

            
$accpass md5($_POST['accpass1']);

            
mssql_query("INSERT INTO account.dbo.USER_PROFILE (user_no,user_id,user_pwd,resident_no,user_type,login_flag,login_tag,ipt_time,login_time,logout_time,user_ip_addr,server_id) VALUES ('$dk_user_no','".$_POST['accname']."','".$accpass."','801011000000','1','0','Y','".$date."',null,null,null,'000')",$con);
            
mssql_query("INSERT INTO account.dbo.Tbl_user (user_no,user_id,user_pwd,user_mail,user_answer,user_question) VALUES ('$dk_user_no','".$_POST['accname']."','".$_POST['accpass1']."','".$_POST['accmail']."','0','0')",$con);

            echo 
"<center><b><u>The account was successfully created. Have fun !</b></u></center><br><br>";
            echo 
"<center>Here is your login info again:</center>";
            echo 
"<center>Your account name is: <b>".$_POST['accname']."</b></center>";
            echo 
"<center>Your password is: <b>".$_POST['accpass1']."</b></center>";
            echo 
"DO NOT LOOSE THIS INFO, YOU MAY WRITE IS DOWN AND HIDE IT";
        }

} else {

    
$con mssql_connect($mssql['host'],$mssql['user'],$mssql['pass']);
    
$result1 mssql_query("SELECT * FROM account.dbo.USER_PROFILE",$con);
    
$row1 mssql_num_rows($result1);
    
    echo 
"<center><b><u>This time we have ".$row1." Registed Accounts on our Server<br>Join us.</b></u></center><br>";
    echo 
"<form action='".$_SEVER['PHP_SELF']."' method='POST'>";
    echo 
"<center><table>";
    echo 
"<tr><td colspan='2' align='center'><b><u>Your Account Info</u></b></td></tr>";
    echo 
"<tr><td>Account Name</td><td><input type='text' name='accname' maxlength='12'></td></tr>";
    echo 
"<tr><td>Password</td><td><input type='password' name='accpass1' maxlength='12'></td></tr>";
    echo 
"<tr><td>Again pass.</td><td><input type='password' name='accpass2' maxlength='12'></td></tr>";
    echo 
"<tr><td>&nbsp;</td><td>&nbsp;</td></tr>";
    echo 
"<tr><td colspan='2' align='center'><b><u>Other account info</u></b></td></tr>";
    echo 
"<tr><td>Email</td><td><input type='text' name='accmail' maxlength='50'></td></tr>";
    echo 
"<tr><td>&nbsp;</td><td>&nbsp;</td></tr>";
    echo 
"<tr><td colspan='2' align='center'>
        <input type='hidden' name='activ' value='1'>
        <input type='submit' value='Create Account'></td></tr>"
;
    echo 
"</table></center>";
    echo 
"</form>";

}

echo 
"</center>";

?>
that is the code
04/24/2010 05:36 daddycool.#4
Only register.php is giving this error?
04/24/2010 05:43 [DEV]AlphaOMEGA#5
that is the whole register page script
its just a simple one that says how may ppl have joined
and what there info they entered at the ending page
04/24/2010 06:36 daddycool.#6
Ok, open the file php.ini search for:

Code:
;extension=php_mssql.dll
and change it to:

Code:
extension=php_mssql.dll
removing ";" ... save the file, restart your webserver and try again.
04/24/2010 06:57 [DEV]AlphaOMEGA#7
wow i get the same for every script i add lol

Fatal error: Call to undefined function mssql_connect()
i think its just my webserver now
04/24/2010 08:06 Nosferatu.#8
Call to undefined function , webserver is missing Module / Plugin

For debian
Quote:
apt-get install php5-sybase
after installing
Quote:
/etc/init.d/apache2 restart
Under windows look for php.ini and search for extensions and activate it by removing ";"
04/24/2010 16:20 naruto820#9
well what webserver are you using?
04/24/2010 22:33 [DEV]AlphaOMEGA#10
wow now im supper frustrated with xxamp
i did this before with no problems
04/24/2010 22:34 [DEV]AlphaOMEGA#11
wow now im supper frustrated with xxamp
i did this before with no problems
04/25/2010 02:39 Decima#12
// fill in your mssql info here
$mssql = array(
'host' => "127.0.0.1",
'user' => "sa",
'pass' => "i placed pass here"
);


instead of ur IP, put 127.0.0.1
04/25/2010 02:50 daddycool.#13
You did what I posted earlier?

Enable the extension for MSSQL server... removing the ";" before extension=php_mssql.dll and try to turn on the output_buffering all in php.ini. Remember to save the file and restart your webserver.
04/25/2010 07:32 [DEV]AlphaOMEGA#14
EDITED#

Thanks i got it now
+1 thanks for you Darth nerd
i spend forever looking for that code and getting booted off the dedi lol
cus they were updating

#REQUEST CLOSE