Ok, this is what i got now... Some progess, not it actually gives me a error! Johoo! It gives me mysql_query error. (not working thióugh)
try it at lorenscorn.net/guilds/register2.php
thanks
<?
if (($REQUEST_METHOD=='POST')) {
if ((!$name || !$abbrev || !$email || !ereg(".+@.+..+", $email)) || (!ereg("[a-zA-Z0-9_@.-]+$", $email))) {
$error = "<font color='#CC0000'><b>Either is one of the requierd fields blank, or your email is invalid... </b></font>";
} else {
$conn = mysql_connect("localhost","***","***") or die
("Could not create a connection");
$db = mysql_select_db("lorens_sfs") or die("Could not select database");
$sql = "INSERT INTO guilds (name,shard,abbrev,charter,location,website,uosite,email,password,rp,pk,pvp,faction,align,waring)";
$sql .= "VALUES ('$name','$shard','$abbrev','$charter','$location', '$site','$uosite','$email','$pass','$rp','$pk','$pk','$pvp','$faction','$alignment','$waring')";
$insert = mysql_query($sql) or die("nf");
$id = mysql_insert_id();
$subject = "Thank you for registering at the guild listings!";
$body = "If you need to edit your guild info, do so by going to this adress:\n";
$body .= "http://scencesfromsos.net/guilds/editguild.php?id=$id\n\n";
$body .= "Your password is:\n";
$body .= "$pass\n\n";
$body .= "Regards\n";
$body .= "Scenes from Sosaria - http://www.scenesfromsos.net";
$headlines = "From: Scenes from Sosaria guild listings";
mail($email,$subject,$body,$headlines);
}
}
?>