[Problem]Register und Ranking page

10/17/2011 11:25 risiko007#1
Hallo Community,
ich habe mir eine Register und Ranking Page für meinen Pserver erstellt. Ich habe alles eingestellt (hamachi ip,Sql daten, etc.) doch wenn ich jetzt auf die seite gehe, steht da der Server ist Down!. Das ; habe ich in der php.ini auch schon entfernt. Ich hoffe ihr habt einen Rat für mich danke:D
10/17/2011 13:21 Sruxs#2
ja poste mal dein script
10/17/2011 13:46 risiko007#3
register.php
<?php
require('./configs/reg_conf.php');
function doesUsernameExist($name){
$exit = FALSE;
$result = @mssql_query("SELECT * FROM ACCOUNT_TBL WHERE account='$name'");
if (mssql_num_rows($result) != 0){
$exit = TRUE;
}
return $exit;
}

if(isset($_POST['submit'])){
$user = preg_replace ("[^A-Za-z0-9]", "", $_POST['username']);
$pass = preg_replace ("[^A-Za-z0-9]", "", $_POST['password']);
if($_POST['username'] == ""){
echo '<font color="red">Enter a user.</font><br /><br />';
}
else if($_POST['password'] == ""){
echo '<font color="red">Enter a password.</font><br /><br />';
}
else if ((strlen($_POST['username']) > 16) || (strlen($_POST['username']) < 3)){
echo '<font color="red">The user should be 3 to 16 characters.</font><br /><br />';
}
else if ((strlen($_POST['password']) > 16) || (strlen($_POST['password']) < 3)){
echo '<font color="red">The password should be 3 to 16 characters.</font><br /><br />';
}
else if($_POST['username'] != $user){
echo '<font color="red">User with invalid characters.</font><br /><br />';
}
else if($_POST['password'] != $pass){
echo '<font color="red">Password with invalid characters.</font><br /><br />';
}
else {
$pass = md5('kikugalanet' . $pass);
if(!doesUsernameExist($user)){
$stmt = mssql_init('webCreateAcc', $link);
mssql_bind($stmt, '@account', $user, SQLVARCHAR, false, false, 15);
mssql_bind($stmt, '@password', $pass, SQLVARCHAR, false, false, 36);
mssql_bind($stmt, '@birthday', $bday, SQLVARCHAR, false, false, 120);
mssql_free_statement($stmt);
echo '<font color="Green">Register Successfull.</font><br /><br />';
}
else {
echo '<font color="red">User already Exist.</font><br /><br />';
}
}
mssql_close();
}

echo '<form action="#" method="post">';
echo 'Username: <input type="text" name="username" /><br />';
echo 'Password: <input type="password" name="password" /><br />';
echo 'Birthday: <input type="birthday" name="birthday" /><br />';
echo '<input type="submit" name="submit" value="Register" />';
echo '</form>';

?>
reg_conf.php
<?php
$link = @mssql_connect("yannik-PC\SQLEXPRESS10", "sa", "") or die ("Server is down!");
$db = @mssql_select_db('ACCOUNT_DBF') or die ("Accout table is missing!");
$b = '';
$mail = '';


?>
10/17/2011 13:49 bloody2009#4
?>
reg_conf.php
<?php
$link = @mssql_connect("yannik-PC\SQLEXPRESS10", "sa", "passwort fehlt") or die ("Server is down!");
$db = @mssql_select_db('ACCOUNT_DBF') or die ("Accout table is missing!");
$b = '';
$mail = '';


?>
10/17/2011 13:49 Jopsi332#5
in ner php box wäre cool :D
10/17/2011 14:05 -Feuer-#6
das selbe problem habe ich auch was soll ich tun....pw hab ich keines
10/17/2011 14:10 bloody2009#7
kann gut an der Xampp version liegen...
10/17/2011 14:11 -Feuer-#8
hab 1.7.3
10/17/2011 14:15 bloody2009#9
ich glaub ich hab 1.3.8 x'D
10/17/2011 14:17 -Feuer-#10
oh.....wo bekommt man so veralterte versionen her.....
10/17/2011 14:20 bloody2009#11
hmm gute frage wird's wohl kaum noch zum download geben ich hab's damals so gemacht das ich einfach mein xampp zusammen gepackt habe und auf den root gefeuert hab^^
10/17/2011 14:20 Jopsi332#12
1.7.3 muss gehen dadrüber die sind gay xD
10/17/2011 14:21 -Feuer-#13
hm jopsi wiso gehts dann bei mir net....
10/17/2011 14:29 Jopsi332#14
weil du deine eingaben falsch hast.
10/17/2011 14:35 risiko007#15
Ich habe auch kein PW und tortzdem geht es nicht :confused: