I am recieving a parse with the following code.
I have a feeling it is not setup right, so I am going to explain what I want it to do.
In the form that submits to this page, that variable perm is set to user, member, mmod, fmod, etc. I want it take that variable, and split it into 3 variables, $G, $P, and $S. If the password from the form is right, I want it to place those variables in the query and perform the query.
<?php
$Adminpw = "easychange";
$link = mysql_connect("localhost", "-----", "-----");
mysql_select_db("moparpo_pchat3", $link);
If ($_GET[PASSWORD] != $Adminpw) {
echo "Wrong password!";
exit();
}
if ($_GET[perm] == "user") {
$G = 0
$P = user
$S = r
}
if ($_GET[perm] == "member") {
$G = 0
$P = game
$S = g
}
if ($_GET[perm] == "mmod") {
$G = 0
$P = moderator
$S = m
}
if ($_GET[perm] == "fmod") {
$G = 0
$P = fmod
$S = f
}
if ($_GET[perm] == "msmod") {
$G = 0
$P = supermod
$S = s
}
if ($_GET[perm] == "fsmod") {
$G = 0
$P = supermod
$S = fs
}
if ($_GET[perm] == "admin") {
$G = 0
$P = admin
$S = a
}
if ($_GET[perm] == "red") {
$G = 0
$P = admin
$S = c
}
if ($_GET[perm] == "gag") {
$G = 0
$P = zgag
$S = z
}
else {
mysql_query("UPDATE c_reg_users SET perms='$P', gender='$G' WHERE username='$_GET[U]'");
mysql_query("UPDATE c_users SET status='$S' WHERE username='$_GET[U]'");
}
?>
Thanks,
e39m5