PDA

View Full Version : Help with modifications


archie175807
03-02-2009, 12:19 PM
Hello,

I need help with making a couple of modifications to the Contact Form Sol. Pack.

1. I need to pass the values of Contact_Name and Email_address to thankyou.php. Then I need to personalize the Thank You page with the visitor's name and the email address. How can I do this?

2. I need to add another field in the form. I know how to do that part. This will be a phone number field which won't be a required field but when someone does fill it out, I need to validate it to the correct format i.e. (555) 555-5555. How can I do this?

I'm new to PHP so would appreciate someone showing me the steps with the correct code I need to insert.

Thanks for your help.

Ray Borduin
03-02-2009, 01:28 PM
1) Store the values as session variables. This is the easiest way to have them available on latter pages.

2) Do you have Dreamweaver CS3 or higher? Do you have validation toolkit?

With CS3 you can use spry validations to easily add phone number validation. If you don't have that it is also easy to add with validation toolkit. If you don't have either, you would need to identify a script you want to use to do the validation.

archie175807
03-02-2009, 03:24 PM
Hi Ray,

Thanks a lot for your help.

I can follow the instructions for storing a Session Variable in Dreamweaver but I'm not sure if the syntax of PHP is different from ASP or .Net. DW's help document doesn't seem to say anything about PHP. Could you help please?

I'm using DW CS3 but don't have WA's Validation kit. I'm somewhat familiar with Spry validation but will that cause a problem with IE 6?

Sorry if I'm asking too many questions.

Ray Borduin
03-02-2009, 03:35 PM
I believe spry should work on IE6. IE6 has good javascript support, just not very good css support.

Session variables are similar in php. It will look something like:

<?php
session_start();
$_SESSION['sessionvariablename'] = $_POST['formvariablename'];
?>

archie175807
03-02-2009, 03:45 PM
Thanks a lot Ray. Appreciate your quick reply and help.