Ok...so my problem here is this:
As part of my property application, I'd like a user to search for a property and then place a bid on their chosen property if they like it.
I'd like the selected property to show up after login...so if the user wants to bid on a property, but has not logged in, then the user will click on a button called "Login to bid" which will take them to the login page...once the user has logged in, the page will then redirect back to the page showing the selected property, this time with a form to enter the bid value shown.
My main problem is trying to redirect the page from login back to the page of that particular property. That is my biggest issue...it seems like there's a simple answer to it...but I can't seem to find the solution to it
This is code from a file called bid.php:
Code: Select all
<HTML>
<BR>
<BR>
<TABLE align = "CENTER"><TR><TD><HEAD><font face="Arial" style = "font-size: 22pt" color="#0B3A62"> Property Bid</font></head></BR></BR></TD></TR></TABLE>
<body>
<font face="Arial" color="#0B3A62">
<form action = "bidprocess.php" method = "POST">
Bid value: <input type = "text" name = "bid" value = "">
<table align = "LEFT" VALIGN = "bottom">
<tr><td><form action = "bidprocess.php"><input type="submit" value="Bid on property"></form></td></tr></table>
<?
include "session.php";
mysql_connect("****", "****", "******") or die(mysql_error());
mysql_select_db("bid") or die(mysql_error());
$bid = addslashes($_POST['bidvalue']);
$q = "INSERT INTO bid VALUES ('$bid')";
return mysql_query($q);
?>
</form>
</body>
</html>
Code: Select all
if (isset($_GET['id'])) {
// Put the value in a separate variable
$propID = mysql_real_escape_string($_GET['id']);
$query = "select propertyArea, propertyPrice, propertyType, propertyBedrooms, propertyDescription from property where propertyID = $propID ORDER BY 'propertyID'";
$result = mysql_query($query);
while ($row = mysql_fetch_row($result))
{
?>
<table ALIGN = "LEFT">
<font face="Arial" color="#0B3A62">
<?echo $row[0]; ?> ,
£<? echo $row[1]; ?> ,
<? echo $row[2]; ?> ,
<? echo $row[3]; ?> bedrooms,
<? echo $row[4]; ?>
<? echo $row[5];
echo "<a href=\"showimage.php?id=$row[propertyID]\">View property images</a>";
}
}
The file bid.php allows the user to enter a bid value into the database. That doesn't work either, so I'm trying to work on one problem at a time...that is, redirecting the page after login.
bidprocess.php is an attempt at trying to show the property page after logging into the system.
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: