this is the code i m using for updating my table of mysql
<?php
include("connect.php");
$myCatName = $_POST['CatName'];
$r = mysql_query("SELECT CatName FROM web_catagories WHERE CatName='".$myCatName."'")
or die(mysql_error());
while($row = mysql_fetch_array( $r ))
{
header("Location: admincat.php?page=error");
exit();
}
$r=mysql_query("INSERT INTO web_catagories (CatName) VALUES ('$myCatName')");
header("Location: admincat.php?page=added");
?>
but the page isnt redirected to admincat.php?page=added
its mean the header thingi isnt working for me.....
i m uising sesions so if i use javascripts to redirect to that page then sesion expires and it asked me to login again
row is updated in databse but the page stop and nothing is appears so plz help me out