EDIT:
Ok, that didn't work

Code: Select all
<?php
include 'connect.php';
session_start();
?>
<link href="style.css" rel="stylesheet" type="text/css" />
<div id="logo"><img src="../images/logo.jpg" width="500" height="120" /></div>
<div id="logintable">
<?php
$player=$_POST['player'];
$password=$_POST['password'];
$pass2=$_POST['pass2'];
$player=strip_tags($player);
$email=$_POST['email'];
$email=strip_tags($email);
$prochoice=$_POST['prochoice'];
if ($password==$pass2)
{
$isplayer="SELECT * from players where name='$player'";
$isplayer2=mysql_query($isplayer) or die("Could not query players table");
$isplayer3=mysql_fetch_array($isplayer2);
if(!$_POST['password'] || !$_POST['pass2'])
{
print "You did not enter a password";
}
else if($isplayer3 || strlen($player)>15 || strlen($player)<1)
{
print "There is already a player of that name or the name you specified is over 16 letters or less than 1 letter";
}
else
{
$isaddress="SELECT * from players where email='$email'";
$isaddress2=mysql_query($isaddress) or die("not able to query for password");
$isaddress3=mysql_fetch_array($isaddress2);
if($isaddress3)
{
print "There is already a player with that e-mail address";
}
else
{
$proquery="SELECT * from profession where proname='$prochoice'";
$proquery2=mysql_query($proquery) or die("Could not query professions table");
$proquery3=mysql_fetch_array($proquery2);
$primskill = $proquery3['skill1'];
$secskill = $proquery3['skill2'];
$learnskill = $proquery3['skill3'];
$primstat = $proquery3['stat1'];
$secstat = $proquery3['stat2'];
//$primskill=strip_tags($primskill);
//$secskill=strip_tags($secskill);
//$learnskill=strip_tags($learnskill);
$password=md5($password);
$date=round(date("U")/1000);
srand($date);
$thekey=rand(1,100000000);
$thekey=md5($thekey);
if ($primstat != "body") { $health = 10;}
if ($secstat != "endurance") { $stamina = 30;}
if ($primstat == "body") { $health = 30;}
if ($secstat == "body") { $health = 20;}
if ($primstat == "endurance") { $stamina = 50;}
if ($secstat == "endurance") { $stamina = 40;}
$SQL = "INSERT into players( hp,stamina,maxhp,maxstamina,backpackmax, mapr, mapc, name, proname, password, email, level, credits, expe, killer, lastattacked) VALUES ('$health','$stamina','$health','$stamina','6','15','4','4','$player','$prochoice','$password','$email','1','500','0','','')";
mysql_query($SQL) or die("could not register");
?>
<?php
$prquery="SELECT * from players where name='$player'";
$prquery2=mysql_query($prquery) or die("Could not query players table");
$prquery3=mysql_fetch_array($prquery2);
$pid = $prquery3['id'];
//$SQL2 = "INSERT into skills( 2H Blade, Axe, Pole Arm, Bow, Blunt, Knife, Crossbow, Light Pistol, Heavy Pistol, 1H Blade, Energy Pistol, Energy Rifle, Light Rifle, Heavy Rifle, ShotGun, Light Armor, Medium Armor, Heavy Armor, Sheilds, First Aid, Identify Plants, Identify Drinks, Identify Items, Pick Pocket, Traps, Alchemy, Armor Craft, Weapon Craft, GunSmith, Identify Materials, Animal Training, Fishing, Hunting, Spelunking, Scroll Craft, Identify Weapons) VALUES('4','3','2','4','3','2','4','3','2','4','3','2','4','3','2','4','3','2','4','3','2','4','3','2','4','3','2','4','3','2','4','3','2','4','3','2')";
// mysql_query($SQL2) or die("could not register skills");
//$SQL2 = "INSERT into skills(id ,`$primskill`, `$secskill`, `$learnskill`) VALUES('$pid','4','3','2')";
//mysql_query($SQL2) or die("could not register skills");
$SQL2 = "INSERT into anticheat(id) VALUES('$pid')";
mysql_query($SQL2) or die("could not register anticheat");
for ($i = 1; $i <= 3; $i+= 1)
{
$randid4 = rand(10,900000);
$SQL = "INSERT into backpack(id, name, type, stats, modadd,price,level,randid,consumable) VALUES ('$pid','Tasty Power Pack','food','stamina','40','50','1','$randid4','1')";
mysql_query($SQL) or die("could not add to backpack");
}
$randid4 = rand(10,900000);
$SQL = "INSERT into suit(id, name, type, durability, speed,rating,craft,lastcraft,randid,location) VALUES ('$pid','Light Chest Plate','Light_Armor','8','2','2','0','OdyssusForge','$randid4','chest')";
mysql_query($SQL) or die("could not add to suit");
$randid = rand(10,900000);
$SQL = "INSERT into equip(id, name, type, durability, speed,rating,damage,craft,lastcraft,randid) VALUES ('$pid','Light Dagger','Blade','8','3','2','3','0','OddysusForge','$randid')";
mysql_query($SQL) or die("could not add to equip");
print "Thank you for registering and playing Forsaken Sanctum. You may now Login.";
}
}
}
else
{
print "Your password didn't match or you did not enter a password";
}
?>
<A href='login.php'>Login Page</a><br>
Code: Select all
else {$selectbackpack3['equip'] = "<td><A href='equipped.php?randid= $selectbackpack3[randid]'>Equip</td>";}
Code: Select all
else {$selectbackpack3['equip'] = "<td><A href='equippedarmor.php?randid= $selectbackpack3[randid]'>Equip</td>";}
Code: Select all
{ print "<tr><td>$selectbackpack3[name]</td><td>$selectbackpack3[stats]</td><td>$selectbackpack3[modadd]</td><td><A href='foodanddrink.php?randid= $selectbackpack3[randid]&modadd=$selectbackpack3[modadd]'>Consume</td></tr>";
Code: Select all
<p><img src="http://localhost/Forsaken/img/homebutt.png" width="181" height="36" /><img src="http://localhost/Forsaken/img/marketbutt.png" width="181" height="36" /></p>
Code: Select all
<p><img src="img/homebutt.png" width="181" height="36" /><img src=/img/marketbutt.png" width="181" height="36" /></p>