I’m currently building a website and was wondering if anybody can help me with my PHP/form problem,
I’ve put together a standard HTML form and I’m bringing in via ‘Get Parameters’ dates from another page that are being placed inside one of the form fields, each date is formatted like this:
“15/06/11 – 18/06/11”
The next step is I need the form to realise that if the first part of the date (in this case 15/06/11) is less than 30 days away to on form submission take the visitor to a different ‘Thank You Page’ URL
Here’s my form code:
Code: Select all
<form method="post" action="">
<td>Date:</td>
<div class="field">
<input type="text" name="date" value="<?php echo $id_1 = $_GET['prop_id']; ?>"/>
</div>
</tr>
<td>Comments:<td>
<div class="field"><textarea rows="10" cols="50" name="field_name2"></textarea></div>
</tr>
<td>
<input type="submit" value="Submit" />
</td>
</tr>
<input type="hidden" name="ccf_customhtml" value="1" />
<input type="hidden" name="thank_you_page" value="http://www.google.com" />
<input type="hidden" name="destination_email" value="me@email.com" />
<input type="hidden" name="required_fields" value="date, field_name2" />
</form>Hope this makes sense, any help would be great.
David