Hi there, I am trying to get a small page working, where people can bid on an item.
I would like it to go through three stages.
Now I tried it on my computer and it works ok if I try it on my localhost.
I went and ftp’d it to my server and it does not work?
Frustrating indeed.
I am hoping that someone can help me solve this issue.
It seems not to go to the next page. Anyway here is the code at the moment, just the page that does not work.
My thanks in advance.
(modified Please look at it online : www.robertbrasingtonkites.com/auction/index.php)
<?php
// define variables and set to empty values
$bid = "";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (empty($_POST["bid"])) {
print "Please place your bid";
} else {
$bid = ($_POST["bid"]);
}
$persons_bid = $bid;
$current_bid = $current_bid_nr;
if ($persons_bid < $current_bid) {
print("<p class='error'><span>ERROR</span><br><img src='img/arrow_down.png' /><br>Your bid is lower than the highest bidder, please try again.</p>");
}
else if ($persons_bid == $current_bid) {
print("<p class='error'><span>ERROR</span><br><img src='img/arrow_down.png' /><br>Your bid is equal to the highest bidder, please try again.</p>");
}
else if (! ctype_digit($_POST['bid'])) {
print ("<p class='error'><span>ERROR</span><br><img src='img/arrow_down.png' /><br>Please use numbers only</p>");
}
else if($persons_bid > $current_bid) {
$myfile = fopen("inc/persons_bid_price.php", "w") or die("Unable to open file!");
$make_up_1 = "<" ."?" ."php". " $" ."persons_bid_nr ='";
$make_up_2 ="';?>";
$new_total_bid = $make_up_1 .$persons_bid .$make_up_2;
fwrite($myfile, $new_total_bid);
fclose($myfile);
header("Location:bid_form_step_2.php");
}
}
echo "</div>";
include ("inc/footer.php");
?>