I would suggest Sessions; you aren't necessarily asking for a database, I think.
Create a form and get their contact information. Store this in Session variables. Each page of the site would contain a form that would add a home to the session variable "wishlist"...
reg_handler.php (this code goes on the page that handles website user registration. In this example, you are adding the username entered by the web user to the session variable entitled 'name'...
$_SESSION['name']=POST['name']; // so on for each field
// would be good to do some verification...
To do the verification, use something like this:
function ValidateInput($var, $type) {
trim($var);
if ($type=="name") { $Pattern = "^[A-Z][c]?[A-Z]?[a-z]+[a-z]$"; }
elseif ($type=="email") { $Pattern = "^([0-9a-z]+)([0-9a-z\._-]+)@([0-9a-z\._-]+)\.([0-9a-z]+)"; }
elseif ($type=="phone") { $Pattern = "^([0-9]{3})-([0-9]{3})-([0-9]{4})"; }
elseif ($type=="address") { $Pattern = "^[0-9A-Za-z]"; }
$valid=ereg($Pattern, $var);
return $valid;
} # end of Function
and then call it thusly:
$namevalid=ValidateInput($_SESSION['name']);
if (!$namevalid) { echo "please re-enter a valid name."; }
Once the user is registered initialize the array "wishlist".
$_SESSION['wishlist']=array();
Then, on each page, you should have a form:
<form action="$PHP_SELF" method="POST">
Add this home to your wishlist:<input type=checkbox name="add2list"><br>
<input type=hidden name="<?="$property_number" ?>">
<input type=submit name=submit value="Add to Wishlist">
Each page should also contain the following code:
if ($_POST['add2list']) {
$x=count($_SESSION['wishlist']);
$_SESSION['wishlist'][$x]=$_POST['property_number'];
Now, when the user is "finished" at your site, you have a nice array of property numbers named $_SESSION['wishlist'] ...
Or, something like that ....
🙂