[PHP - MYSQL] Query Problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [PHP - MYSQL] Query Problem (
/showthread.php?tid=190812)
[PHP - MYSQL] Query Problem -
Xivop. - 16.11.2010
I have a Problem (:
My Code looks so :
PHP Code:
$user = $_SESSION['user'];
$escuser = mysql_real_escape_string($user);
$query = "SELECT * FROM playerinfo WHERE user = '$escuser'";
$result = mysql_query($query);
$row = mysql_fetch_row($result);
if($row['10'] == "3")
{
echo "Danke fьr die Angaben ьber deine Fraktion, du wirst in 3 Sekunden weiter geleitet!";
$query = mysql_query("UPDATE fraktion SET freiestellen = $_POST[freistellen] WHERE id = '4'");
$query = mysql_query("UPDATE fraktion SET maximalestellen = $_POST[maxstellen] WHERE id = '4'");
}
if($row['10'] == "2")
{
echo "Danke fьr die Angaben ьber deine Fraktion, du wirst in 3 Sekunden weiter geleitet!";
$query = mysql_query("UPDATE fraktion SET freiestellen = $_POST[freistellen] WHERE id = 3");
$query = mysql_query("UPDATE fraktion SET maximalestellen = $_POST[maxstellen] WHERE id = 3");
}
if($row['10'] == "1")
{
echo "Danke fьr die Angaben ьber deine Fraktion, du wirst in 3 Sekunden weiter geleitet!";
$query = mysql_query("UPDATE fraktion SET freiestellen = $_POST[freistellen] WHERE id = 2");
$query = mysql_query("UPDATE fraktion SET maximalestellen = $_POST[maxstellen] WHERE id = 2");
}
But i dont become an Answer from this Script, not the 1 not the 2 and not the 3.
I Hope, you can find my Problem (:
Re: [PHP - MYSQL] Query Problem -
Typhome - 16.11.2010
SA-MP Scripting and Plugins
It's SAMP not PHP.