PHP Help in Form

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
RepublicOfDave
Forum Newbie
Posts: 2
Joined: Mon Sep 05, 2011 12:23 pm

PHP Help in Form

Post by RepublicOfDave »

Hi All,

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
User avatar
ok
Forum Contributor
Posts: 393
Joined: Wed May 31, 2006 9:20 am
Location: The Holy Land

Re: PHP Help in Form

Post by ok »

Where is the PHP code handling the form submittion?
RepublicOfDave
Forum Newbie
Posts: 2
Joined: Mon Sep 05, 2011 12:23 pm

Re: PHP Help in Form

Post by RepublicOfDave »

I'm using a wordpress plugin called 'Custom Contact Form' that handles the form submission code and allows me to hardcode the form fields myself, the form is currently functioning fine but I just need to allow the above to happen in order to complete it..
Post Reply