Well, here comes whats really odd.
The code DOES DISPLAY the guild info.. You can go to http://lorenscorn/guilds/editguild.php?id=28 and check it out. So code that connects to the database, get the info, and display it works just fine. I also ran the first SELECT query and the UPDATE query in the phpmyadmin, and they both worked just fine!
Its when I try to UPDATE it, when the syntax error comes! I have checked the spellings a hundred times, and I actually found two misstakes, altough correcting them gave me no result.
<?
$conn = mysql_connect("localhost","gggggg","ggggggg") or die
(mysql_error());
mysql_select_db(lorens_sfs) or die(mysql_error());
$query = "SELECT name,abbrev,charter,website,location,uosite,password,rp,pk,pvp,faction,align,waring,email FROM guilds WHERE id = $id";
$result = mysql_query($query) or die(mysql_error());
$info = mysql_fetch_array($result);
$name =$info['name'];
$abbrev =$info['abbrev'];
$charter = $info['charter'];
$location = $info['location'];
$website = $info['website'];
$uosite = $info['uosite'];
$rp = $info['rp'];
$pk = $info['pk'];
$pvp = $info['pvp'];
$faction = $info['faction'];
$alignment = $info['align'];
$waring = $info['waring'];
$email = $info['email'];
$password = $info['password'];
THE ABOVE CODE SEEMS TO WORK!!!
if (($REQUEST_METHOD=='POST')) {
if ($pass == $password) {
$write = "UPDATE guilds SET name='$name', charter='$charter', abbrev='$abbrev', location='$location', website='$site', uosite='$uosite', rp='$rp', pk='$pk', pvp='$pvp', faction='$faction', align='$alignment', waring='$waring' WHERE id=$id";
$insert = mysql_query($write);
header("Location: savedornot.php?page=saved&name=$name");
}
else {
header("Location: savedornot.php?page=passerror&id=$id&name=$name&charter=$charter&abbrev=$abbrev&location=$location&site=$site&uosite=$uosite");
}
}
?>
Thanks!