Anyone gimme some help? This is my code
Thanks for any help.PHP Code:<?
ob_start();
include("config.php");
if ($logged[username])
{
if(!$_POST[auction])
{
echo ("<div align=\"center\"><p><b>Add A New Auction</b><br/>
You are logged in as $logged[username].</p>
<form method=\"POST\">
<p>Auction Name:<br/>
<input type=\"text\" size=\"40\" maxlength=\"70\" name=\"aname\" ><br /><br />
Time Limit (days):<br/>
<input type=\"text\" size=\"40\" maxlength=\"70\" name=\"timel\" ><br/><br/>
Category:<br/>
<select name=\"category\" id=\"type\" width=\"40\" style=\"border: 1px solid grey;\">
<option>Rares</option>
<option>Super Rares</option>
<option>Posters</option>
<option>Plants</option>
<option>Other</option>
</select><br /><br />
Starting Price:<br/>
<input type=\"text\" size=\"40\" maxlength=\"70\" name=\"sprice\" ><br /><br />
Buy It Now Price:<br/>
<input type=\"text\" size=\"40\" maxlength=\"70\" name=\"bin\" ><br /><br />
Item Description:<br/>
<input type=\"text\" size=\"40\" name=\"desc\" style=\"height: 200px;\"><br /><br />
<input type=\"submit\" name=\"auction\" value=\"Submit\"></form> ");
}else {
$aname = htmlspecialchars($_POST[aname]);
$category = htmlspecialchars($_POST[category]);
$sprice = htmlspecialchars($_POST[sprice]);
$bin = htmlspecialchars($_POST[bin]);
$desc = htmlspecialchars($_POST[disc]);
$timel = htmlspecialchars($_POST[timel]);
// the above lines get rid of all html.
echo ("$_GET[user] you have posted a new auction. Please wait for our Administrators to verify it.");
$query = mysql_query("INSERT INTO auction (username, aname, category, sprice, bin, desc, timel) VALUES ($logged[username], $aname, $category, $sprice, $bin, $desc, $timel");
// updates the information in the database.
}
}
else {
echo ("Your not logged in.");
}
?>






Reply With Quote



