Register for your free account! | Forgot your password?

You last visited: Today at 00:26

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[PHP]

Discussion on [PHP] within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2010
Posts: 39
Received Thanks: 4
Question [PHP]

Das Alter kann nicht ausgelesen werden, hoffe ihr könnt mir helfen.
Ich habe die Problemstelle Rot makiert.


<----register.php---->
Code:
<?php require("config.php") ?>
<center><form action="?page=register" method="post">
<table border="0">

<tr><td><strong><font color="#FF0000">Charaktername :</font></strong></td><td><label>
<input name="user" type="tinytext" class="liteoption" id="user" size="15" maxlength="15" /></label>
</td></tr>

<tr><td><strong><font color="#FF0000">Gear Typ :</font></strong></td><td><label>
<input name="geartyp" type="tinytext" class="liteoption" id="gt" size="15" maxlength="1" /></label>
</td></tr>

<tr><td><strong><font color="#FF0000">Level :</font></strong></td><td><label>
<input name="level" type="tinytext" class="liteoption" id="lvl" size="15" maxlength="3" /></label>
</td></tr>

<tr><td><strong><font color="#FF0000">Vorname :</font></strong></td><td><label>
<input name="firstname" type="tinytext" class="liteoption" id="firstname" size="15" maxlength="15" /></label>
</td></tr>

<tr><td><strong><font color="#FF0000">Geschlecht :</font></strong></td><td><label>
<input name="gender" type="tinytext" class="liteoption" id="gender" size="15" maxlength="1" /></label>
</td></tr>

[COLOR="Red"]<tr><td><strong><font color="#FF0000">Alter :</font></strong></td><td><label>
<input name="old" type="tinytext" class="liteoption" id="old" size="15" maxlength="2" /></label>
</td></tr>[/COLOR]

<tr><td><input name="submit" type="submit" class="liteoption" value="Mitglied werden" /></td><td></td></tr></form><br /><br /></table>

<br /><br />
<?php
if(isset($_POST['submit'])) {
if(!$_POST['user'] || !$_POST['geartyp'] || !$_POST['level'] || !$_POST['firstname'] || !$_POST['gender'] |[COLOR="Red"]| !$_POST['old'][/COLOR]) {
die('<strong>Sie müsst alle Felder ausfüllen.<br /></strong>');
}
else {
$char = $_POST['user'];
$gt = $_POST['geartyp'];
$lvl = $_POST['level'];
$fn = $_POST['firstname'];
$gend = $_POST['gender'];
[COLOR="Red"]$old = $_POST['old'];[/COLOR]
}
$nww = register($char, $gt, $lvl, $fn, $gend, [COLOR="Red"]$old[/COLOR]);
if ($nww){
echo("<strong>Bewerbung abgeschickt !</strong>");
}else  {
echo("<strong>Registration fehlerhaft !<br /><br />Bitte Kontaktieren Sie den LastFighters Website Administrator DBSakura sollte das Probelm weiterhin vorkommen !</strong>");
}}
?>
<br /><br /></center>
<----config.php---->
Code:
<?php

	// Connecting...

	$host = "localhost";
	$name = "*******";
	$pw = "******";
	$db = "x";

	mysql_connect($host,$name,$pw) or die(mysql_error());
	mysql_select_db($db) or die(mysql_error());

	function register($char, $gt, $lvl, $fn, $gend, [COLOR="Red"]$old[/COLOR]){
		$registerfinished = mysql_query("INSERT INTO join(charname, gear, lvl, name, gen, [COLOR="Red"]age[/COLOR]) VALUES( '$char', '$gt', '$lvl', '$fn', '$gend', [COLOR="Red"]'$old'[/COLOR])")or die(mysql_error());
		return $registerfinished;
	}
?>
DBShinigami is offline  
Old 08/02/2010, 17:37   #2
 
banjo1's Avatar
 
elite*gold: 1371
Join Date: Dec 2007
Posts: 14,903
Received Thanks: 19,354
ich sehe kein fehler
und bei meinem test wird das alter auch ausgelesen
banjo1 is offline  
Old 08/03/2010, 15:39   #3
 
elite*gold: 20
Join Date: Sep 2006
Posts: 1,100
Received Thanks: 184
Quote:
Originally Posted by banjo1 View Post
ich sehe kein fehler
und bei meinem test wird das alter auch ausgelesen
dafür sind aber ein paar schöne SQL-Injekction Lücken im Code...
Bot_interesierter is offline  
Reply

Tags
php, php scripting




All times are GMT +1. The time now is 00:26.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.