I have this form I am trying to process, but it won't work?
if($count==0){
echo "That Bidder Number is NOT logged in, ";
echo "would you like to set this bidder as active?";
echo " Enter 1 for NO or 2 for YES";
echo "<form action= \"process.php\" method= \"POST\">";
echo "<input type =\"text\" name= \"logUser\"/>";
echo "<input type= \"submit\" value = \"Submit\"/>";
$logUser= isset($_POST['logUser']) ? $_POST['logUser'] : '';
header("Location: process.php");
exit();
}
All I want to do is process the users input and either input data into the database or simply redirect the user.
Why the hell is this so complicated for??
I am processing the form on the same page it is displayed.
Here's my procressing
if ($logUser= 1) {
header("Location: inprogress.php");
exit();
}
else if ($logUser= 2){
// Add $biddersId and redirect to anypage
mysql_connect("$host", "$db_user", "$db_password")or die("cannot connect to server");
mysql_select_db("$db_name")or die("cannot select DB");
mysql_Query("INSERT INTO bidders (biddersId)
VALUES ('$winningBidder')");
mysql_query("INSERT INTO transactions (itemDescription, itemPrice, bidderId, itemQty , totalPrice)
VALUES('$itemDescription', '$itemPrice','$winningBidder', '$itemQty', '$totalPrice')")
or die(mysql_error());
header("Location: inprogress.php");
exit();
}