[Problem]Captcha Code entfernen

01/16/2011 12:07 AgentTxx#1
Hallo liebe Epvp Community,

ich besitze schon seit längerer Zeit einen DynDNS - Server.
Nun habe ich einen neuen Homepage Script gedownloadet (werdernator), es hat soweit alles geklappt.. nur jetzt sitze ich vor einem kleinen Problem:
Auf der Regipage von seiner Homepage wird der Captcha Code mit einem [?] angezeigt..
So.. und nun bin ich auf der Suche nach einer Lösung:

- Weiß einer, wie ich den Captcha Code aus der HP "rausbaue"?
ODER
- Weiß einer, wie ich aus dem [?] den richtigen Captcha Code mache?#

Ich bedanke mich schonmal im vorraus.. :)

Mit freundlichem Gruß: Marcel Gebhardt
01/16/2011 12:08 xNiiZe#2
Google ;)-----> Captcha´s erstellen und einfügen

Best regards xNiiZe
01/16/2011 12:12 .Marcel'#3
Quote:
Originally Posted by xNiiZe View Post
Google ;)-----> Captcha´s erstellen und einfügen

Best regards xNiiZe
^fail :facepalm:

Poste mal den php code von der regi.php.
Ich bau ihn dir dan um
01/16/2011 12:16 AgentTxx#4
Hier:
Quote:
<?php
if(isset($_POST['submit'])) {
include('../../inc/dbsettings.php');
include('../../inc/functions.php');
} else {
include('inc/dbsettings.php');
include('inc/functions.php');
}
$captcha = GenerateCaptcha();
if(isset($_POST['submit'])) { }
else {
if($mysql == "1")
{
?>
<div class="contentBoxTop"></div><div class="contentBox">
<form action="scripts/register/register.php" method="post">
<table width="400" border="0">
<tr>
<td width="150">Username:</td>
<td colspan="2" width="300"><input type="text" name="username" size="40" /></td>
</tr><tr>
<td width="150">Password:</td>
<td colspan="2" width="300"><input type="password" name="password" size="40" /></td>
</tr><tr>
<td width="150">Real Name:</td>
<td colspan="2" width="300"><input type="text" name="rl_name" size="40" /></td>
</tr><tr>
<td width="150">E-Mail:</td>
<td colspan="2" width="300"><input type="text" name="email" size="40" /></td>
</tr><tr>
<td width="150">Löschcode:</td>
<td colspan="2" width="300"><input type="text" name="code" size="40" /></td>
</tr><tr>
<td width="150">Sicherheits-<br>Frage:</td>
<td colspan="2" width="300"><select name="question">
<option value="1">Name des Haustieres</option>
<option value="2">Lieblingsessen</option>
<option value="3">Lieblingsstadt</option>
<option value="4">Geburtsort</option>
<option value="5">Geburtsname der Mutter</option>
</select>
</td>
</tr><tr>
<td width="150">Antwort:</td>
<td colspan="2" width="300"><input type="text" name="answer1" size="40" /></td>
</tr><tr>
<td width="150">Antwort<br>wiederholen:</td>
<td colspan="2" width="300"><input type="text" name="answer2" size="40" /></td>
</tr><tr>
<td width="150">Captcha:</td>
<td width="300"><input type="text" name="captcha" size="10" /></td><td> <img src="scripts/captcha/img.php?text=<?php echo "$captcha"; ?>"><input type="hidden" name="captcha2" value="<?php echo "$captcha"; ?>"></td>
</tr>

</table>
<input type="submit" name="submit" value="Register" />

</form>
</div>
<div class="contentBoxBottom"></div>
<?php
} else {
echo "Datenbankverbindung konnte nicht hergestellt werden!";
}
}
$captcha = $_POST['captcha'];
$captcha2 = $_POST['captcha2'];
$dbname = "account";
mysql_connect($dbhost, $dbuser, $dbpw) OR
die("Fehler beim Verbinden mit der Datenbank: ".mysql_error());
mysql_select_db($dbname) OR
die("Fehler beim Benutzen der Datenbank: ".mysql_error());
if(isset($_POST['submit']) && $_POST['submit'] == 'Register') {
$username = mysql_real_escape_string($_POST['username']);
$answer1 = mysql_real_escape_string($_POST['answer1']);
$answer2 = mysql_real_escape_string($_POST['answer2']);
$question = mysql_real_escape_string($_POST['question']);
$password = mysql_real_escape_string($_POST['password']);
$rlname = mysql_real_escape_string($_POST['rl_name']);
$email = mysql_real_escape_string($_POST['email']);
$code = $_POST['code'];
$coins = "0";
if($username != "" and $password != "" and $question != "" and $answer1 != "" and $answer2 != "" and $rlname != "" and $email != "" and $code != "" and $captcha != "" && $captcha == $captcha2)
{
$sql = "INSERT INTO account SET login = '".$username."',question1 = '".$question."', answer1 = '".$answer1."', answer2 = '".$answer2."', coins = '".$coins."', password = PASSWORD('".$password."'), real_name = '".$rl_name."', email = '".$email."', social_id = '".$code."'";
$result = mysql_query($sql);
if($result) { echo "<meta http-equiv=\"refresh\" content=\"0; url=../../index.php?page=success&action=register\">"; } else { echo 'NOT'; }
} else {
echo "<meta http-equiv=\"refresh\" content=\"0; url=../../index.php?page=error&action=Du hast nicht alle Felder ausgefüllt!\">";
}
}
?>
01/16/2011 12:46 werdernator#5
erstmal wäre es es wert, zu wissen, was für einen Webspace du hast..
Quote:
<?php
if(isset($_POST['submit'])) {
include('../../inc/dbsettings.php');
include('../../inc/functions.php');
} else {
include('inc/dbsettings.php');
include('inc/functions.php');
}
if(isset($_POST['submit'])) { }
else {
if($mysql == "1")
{
?>
<div class="contentBoxTop"></div><div class="contentBox">
<form action="scripts/register/register.php" method="post">
<table width="400" border="0">
<tr>
<td width="150">Username:</td>
<td colspan="2" width="300"><input type="text" name="username" size="40" /></td>
</tr><tr>
<td width="150">Password:</td>
<td colspan="2" width="300"><input type="password" name="password" size="40" /></td>
</tr><tr>
<td width="150">Real Name:</td>
<td colspan="2" width="300"><input type="text" name="rl_name" size="40" /></td>
</tr><tr>
<td width="150">E-Mail:</td>
<td colspan="2" width="300"><input type="text" name="email" size="40" /></td>
</tr><tr>
<td width="150">Löschcode:</td>
<td colspan="2" width="300"><input type="text" name="code" size="40" /></td>
</tr><tr>
<td width="150">Sicherheits-<br>Frage:</td>
<td colspan="2" width="300"><select name="question">
<option value="1">Name des Haustieres</option>
<option value="2">Lieblingsessen</option>
<option value="3">Lieblingsstadt</option>
<option value="4">Geburtsort</option>
<option value="5">Geburtsname der Mutter</option>
</select>
</td>
</tr><tr>
<td width="150">Antwort:</td>
<td colspan="2" width="300"><input type="text" name="answer1" size="40" /></td>
</tr><tr>
<td width="150">Antwort<br>wiederholen:</td>
<td colspan="2" width="300"><input type="text" name="answer2" size="40" /></td>
</tr>


</table>
<input type="submit" name="submit" value="Register" />

</form>
</div>
<div class="contentBoxBottom"></div>
<?php
} else {
echo "Datenbankverbindung konnte nicht hergestellt werden!";
}
}
$dbname = "account";
mysql_connect($dbhost, $dbuser, $dbpw) OR
die("Fehler beim Verbinden mit der Datenbank: ".mysql_error());
mysql_select_db($dbname) OR
die("Fehler beim Benutzen der Datenbank: ".mysql_error());
if(isset($_POST['submit']) && $_POST['submit'] == 'Register') {
$username = mysql_real_escape_string($_POST['username']);
$answer1 = mysql_real_escape_string($_POST['answer1']);
$answer2 = mysql_real_escape_string($_POST['answer2']);
$question = mysql_real_escape_string($_POST['question']);
$password = mysql_real_escape_string($_POST['password']);
$rlname = mysql_real_escape_string($_POST['rl_name']);
$email = mysql_real_escape_string($_POST['email']);
$code = $_POST['code'];
$coins = "0";
if($username != "" and $password != "" and $question != "" and $answer1 != "" and $answer2 != "" and $rlname != "" and $email != "" and $code != "")
{
$sql = "INSERT INTO account SET login = '".$username."',question1 = '".$question."', answer1 = '".$answer1."', answer2 = '".$answer2."', coins = '".$coins."', password = PASSWORD('".$password."'), real_name = '".$rl_name."', email = '".$email."', social_id = '".$code."'";
$result = mysql_query($sql);
if($result) { echo "<meta http-equiv=\"refresh\" content=\"0; url=../../index.php?page=success&action=register\">"; } else { echo 'NOT'; }
} else {
echo "<meta http-equiv=\"refresh\" content=\"0; url=../../index.php?page=error&action=Du hast nicht alle Felder ausgefüllt!\">";
}
}
?>
das sollts sein..

v4 gibts dann mit auswahl ^^
01/16/2011 13:06 AgentTxx#6
ich benutze dein HomepageScript, benutze DynDNS und hoste diese mit VPC.
Es funktioniert ja alles, es wird oben angezeigt, dass der Server, MySQL, etc.. online sind, Rangliste geht, das Problem liegt aber immernoch bei der Registration. Jetzt, bei der regi.php, die du gerade gepostet hast, öffnet sich nach abschicken der Regi eine weiße Seite mit dem inhalt: NOT

Danke nochmal im Vorraus.

€: hat sich gelöst, Regi funktioniert nun einwandfrei :)