hello seniors.
im making an experience calculator for an online game.
please help me with this script.
i cant output the correct data.
example of experience.php
hahah. dont laugh. im just a beginner, hmm. whats wrong with my experience.php. it
im making an experience calculator for an online game.
please help me with this script.
i cant output the correct data.
PHP Code:
<?
include("../include/session.php");
include("../include/protect.php");
?>
<html>
<head>
<title>Exp Generator</title>
<link rel="stylesheet" type="text/css" href="/1.css">
<link rel="shortcut icon" href="/tibia.ico">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="description" content="Armada TibiaME - One of the best TibiaME fansite!">
<meta name="keywords" content="tibia, tibiame, fansite, microspec, armada">
</head>
<div align="center">
<font size="1" face="Century Gothic">
<img src="/logo.png"/><br><br>
<body>
<form action="experience.php" method="post">
<b>Enter Level</b><br><br>
<input type="text" name="level" maxlength="2" size="3"><br><br>
<input type="radio" name="char" value="warrior"> Warrior
<br>
<input type="radio" name="char" value="wizard"> Wizard
<br><br>
<input type="submit" value="Calculate">
</form>
<a href="/home.php">Main Menu</a><br><br>
</div>
</body>
</html>
PHP Code:
<?
include("../include/session.php");
include("../include/protect.php");
?>
<html>
<head>
<title>Exp Generator</title>
<link rel="stylesheet" type="text/css" href="/1.css">
<link rel="shortcut icon" href="/tibia.ico">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="description" content="Armada TibiaME - One of the best TibiaME fansite!">
<meta name="keywords" content="tibia, tibiame, fansite, microspec, armada">
</head>
<div align="center">
<font size="1" face="Century Gothic">
<img src="/logo.png"/><br><br>
<body>
<?
if ($_POST['level'] = "1" & $_POST['char'] = "warrior"){
echo "<b>Experience Needed:</b><br>";
echo "0<br>";
echo "<b>Health:</b><br>";
echo "100";
}
else if ($_POST['level'] = "1" & $_POST['char'] = "wizard"){
echo "<b>Experience Needed:</b><br>";
echo "0<br>";
echo "<b>Health:</b><br>";
echo "100";
}
else if ($_POST['level'] = "2" & $_POST['char'] = "warrior"){
echo "<b>Experience Needed:</b><br>";
echo "10<br>";
echo "<b>Health:</b><br>";
echo "110";
}
else if ($_POST['level'] = "2" & $_POST['char'] = "wizard"){
echo "<b>Experience Needed:</b><br>";
echo "10<br>";
echo "<b>Health:</b><br>";
echo "104";
}
?>
<br><br>
<a href="/home.php">Main Menu</a><br><br>
</div>
</body>
</html>
Comment