Hi,
If a basket has content specific to the users computer this makes sense. So, if they come back at a later time (within cookie expiration) they can see the same info in their basket. Or if the add more than one thing, it stores previously added products.
But when they click to proceed from the basket I intend to have a form like the one below but how do I make it cookie specific so the customer information is added to the correct row in the MySQL Database?:
<form class="formtest" id="form1" method="post" action="">
<fieldset>
<legend>Customer Details</legend>
<label for="emailaddress">Email Address:</label>
<input type="text" name="emailaddress" id="emailaddress" />
<br />
<label for="firstname">First Name:</label>
<input type="text" name="firstname" id="firstname" />
<br />
<label for="lastname">Last Name:</label>
<input type="text" name="lastname" id="lastname" />
<br />
<label for="address1">Address 1:</label>
<input type="text" name="address1" id="address1" />
<br />
<label for="address2">Address 2:</label>
<input type="text" name="address2" id="address2" />
<br />
<label for="address3">Address 3:</label>
<input type="text" name="address3" id="address3" />
<br />
<label for="address4">Address 4:</label>
<input type="text" name="address4" id="address4" />
<br />
<label for="city">City:</label>
<input type="text" name="City" id="city" />
<br />
<label for="state">State:</label>
<input type="text" name="state" id="state" />
<br />
<label class="zip" for="zip">Zip:</label>
<input type="text" name="zip" id="zip" />
<br />
<label for="tel">Telephone:</label>
<input type="text" name="tel" id="tel" />
<br />
</fieldset>
<fieldset class="gender">
<legend>Enter Gender</legend>
<input type="radio" name="radio" id="rad1" value="rad1" />
<label for="rad1">Male</label>
<br />
<input type="radio" name="radio" id="rad2" value="rad2" />
<label for="rad2">Female</label>
<br />
<input type="radio" name="radio" id="rad3" value="rad3" />
<label for="rad3">Not sure</label>
<br />
<input type="submit" value="submit" />
</fieldset>
</form>
It needs to add this content in a MySQL table in a row where the cookie in their computer matches the cookie code stored in the MySQL table.
I think I need to use the code: where cookieid = ‘" . GetCartId() . "’ in the code below but how do I do it when using a form!?!
$query = mysql_query("SELECT COUNT(*) FROM cart where cookieid = '" . GetCartId() . "' and productid = $ID");
Matt.