Digital Point Forums
Wire Transfer

Go Back   Digital Point Forums > Design & Development > Programming > JavaScript
Google Analytics
Log In to view
your analytics

Reply
 
Thread Tools
  #1  
Old Sep 13th 2004, 4:54 pm
NewComputer's Avatar
NewComputer NewComputer is offline
of the Nightfall
 
Join Date: May 2004
Location: Canada
Posts: 1,993
NewComputer will become famous soon enoughNewComputer will become famous soon enough
javascript form validation help

I need to have the following form force information to be added. NO BLANK FORMS. I want all forms to containg data and if they do not I want a pop up to open with the fields that do need to have the data filled. All the tutorials I have seen do not really help me.

Below is some of the code:

<?php
$to = "email@email.ca";
$from = "From: email@email.com\t";
$content = "Business Name: " . $_POST["business-name"] . "\r\n \r\n";
$content .= "Their Name: " . $_POST["your-name"] . "\r\n \r\n";
$content .= "Sign Address: " . $_POST["sign-address"] . "\r\n \r\n";
$content .= "Phone Number: " . $_POST["phone-number"] . "\r\n \r\n";
$content .= "Fax Number: " . $_POST["fax-number"] . "\r\n \r\n";
$content .= "Current Message: " . $_POST["current-message"] . "\r\n \r\n";
$content .= "New Message: " . $_POST["new-message"] . "\r\n \r\n";
mail($to, "Website form submission", $content);
?>

Thanks in advance for any help you may provide.

Does the .js go in this pages code?

http://www.2waysigns.com/contact.php
Reply With Quote
  #2  
Old Oct 9th 2004, 1:53 am
mykoleary mykoleary is offline
Grunt
 
Join Date: Oct 2004
Posts: 64
mykoleary is on a distinguished road
the .js goes in the page that actually displays the form. This looks like the page that is being posted to. BTW - it never hurts to re-check for content on the server side on the page that is posted to. A lot of folks turn JS off to get past forms and avoid uglies.
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Googlebot/Test Spider Getting External JavaScript Files digitalpoint Google 18 Nov 11th 2008 11:10 pm
javascript, php accessing form elements dave ner0tic JavaScript 4 Dec 12th 2005 11:38 am
Form Text Table Background - making it fixed misohoni Programming 3 Jul 27th 2004 5:19 am
Help Needed on Converting specific javascript commands to php such as math.random() ProductivePC PHP 4 Jun 6th 2004 3:34 am


All times are GMT -8. The time now is 8:06 am.