Hi,
After two weeks of not touching my web codings. PHP just gave me tons of surprises. I'm confused. I don't know what happened but I have this page entering a new category:
<form name="new_category" action="savenewcategory.php" method="post">
<input type="text" name="category" size="30"><input type="submit" value="Add">
</form>
savenewcategory.php
<?php
$con=mysql_connect("localhost","root");
mysql_select_db("cart0902",$con);
$category=$_POST['category'];
$sql="insert into tblcategory(category) values('".$category."')";
mysql_query($sql);
echo "<script>";
echo " self.location='page_category.php';";
echo "</script>";
?>
and got this when i hit add(on the form)
"; echo " self.location='page_category.php';"; echo ""; ?>
---
I don't know what happened, a week ago, my shopping cart is perfectly working..and now.. I got this error on almost all of the pages. I tried removing the three echos, I got a blank page BUT the category is not added on the database!
What to do! Please help me! Thank you!