First please look at this page
[url]http://www.airedale911.org/e.php[/url]

Notice how the words ONLINE ADOPTION APPLICATION FORM

will not ge close to the top of the page. Any ideas why please?
Thank you and Happy Holidays!

----------here's the code for that page---------------------------
[code]
<html>
<head>
<script language="JavaScript" src="validation.js"></script>
<SCRIPT LANGUAGE="JavaScript">
function init() {
define('Referredby', 'string', 'Referred By');
define('Name', 'string', 'Name');
define('Street', 'string', 'Street');
define('City', 'string', 'City');
define('State', 'string', 'State');
define('Zip', 'num', 'Zip', 5);
define('Homephone', 'string', 'Home phone', 12);
define('Workphone', 'string', 'Work Phone', 12);
define('Cellphone', 'string', 'Cell Phone', 12);
define('Email', 'email', 'Email');
define('Family', 'string', 'Please list the names of all family members (including yourself), live-in help, frequent visitors, etc');
define('Ages', 'num', 'Please list the ages of all family members (including yourself), live-in help, frequent visitors, etc');
define('Whenpreviouslyowned', 'string', 'When?');
define('Otherbreeds', 'string', 'What other dog breeds have you owned?');
define('Fateoflastdog', 'string', 'What happened to your last dog?');
define('Lostadog', 'string', 'Have you ever lost a dog...?');
define('Movegiveupdog', 'string', 'If you had to move, would you consider giving up your dog?');
define('Otherpets', 'string', 'What other pets do you currently have?');
define('Otherpetsages', 'string', 'Their ages?');
define('Otherpetsspayedneutered', 'string', 'Are they spayed/neutered?');
define('A', 'string', 'Are they currently licensed?');
define('Fencedinyard', 'string', 'Do you have a fenced-in-yard?');
define('Kindoffence', 'string', 'What kind of fence?');
define('Howhighfence', 'string', 'How high is the fence?');
define('Sizeoffencedinarea', 'string', 'Size of fenced-in area?');
define('Dogbedinwhatroom', 'string', 'In what room will the dog bed be placed?');
define('Wherewillairedalesleep', 'string', 'In what room will your new Airedale sleep?');
define('Hoursnoonehome', 'string', 'How many hours at a time is no one at home?');
define('Daysaweekalone', ...

Hi,
I'm not sure I understand. Would this be in the form script? Are you referring to changing something in the form?
Thanks

Happy Holidays!
Is it possible for a PHP FORM to send data from say...
[email]dog@senddata.com[/email] (form user)
to
[email]cat@getdata.com[/email] (data recipient)

BUT...

when [email]cat@getdata.com[/email] gets the email with the data in it, if cat decides to REPLY, [email]dog@senddata.com[/email] WILL NOT be in the TO list at all.

This needs to be done so that the org members can discuss the applicant's qualifications without fear of accidentally replying to the applicant unless they specifically type in the email address.

Thanks!
Squark

/(/([\d]{2,10}[\w][/s])|([\w][\d]{2,10}[/s])|([\w][\d]{2,10}[\w][/s])|[\d]{2,10}[\w]|([\w][\d]{2,10})|([\w][\d]{2,10}[\w])/

or would I have to specify without white spaces too? This epxression could get really long depending on how complicated your requirements are, yes?
Thx

I think I've mostly figured out the code
I've added white spaces to the ends of each option
/([\d]{2,10}[\w][/s])|([\w][\d]{2,10}[/s])|([\w][\d]{2,10}[\w][/s])/;
will the expression pass if there is no white space
for instance if someone enters
Tami33,Rocky34
or will there have to be a white space entered at the end of the above for the expression to pass validation?

Would it be asking too much to put in english waht this expression says...

/[\w\s][\d]{2,6}/;

Thanks. Oh, is there documentation that would further explain the options for the above type of expression?

Not without some special software. Aspx doesn't work with any of the browsers I know of.

Hi,
I tried out your code. What input did you use to test it. I tried
Tami 33
and it said I still needed two numeric values.
I'm looking to verify basically as much as possible at least one name and age is entered.
Thx

Happy Hoildays!
Does anyone know of an Integreated Development Environment for creating ASPX files AND being able to see the results in a WYSIWYG window?
I've tried Visual Basic, Visual Studio etc but it can open the source but never seems to be able to show the resultant developed HTML from the aspx file.
If this isn't the easiest question of the day, I'll eat my hat!
Thanks,
S-quark

Thank you. So this will not error out as long as one types alpha caracters and at least two number?

I'll have to give it a shot. Is this easily integrated into the big code that I showed you or will the entire form need to be rebult?
Thanks

Not exactlywhat I mean...I think.
Heres the full code. You will easily see what I am trying to do.
In a nutshell, we have to ask form filler outer the names and ages of all in their household. Currently I had to do it in to fiedls but would like to do it in one test area. We would like to prevent garbage being submitted.
The key is force them to have at least one set of digits regprenting at tleast the submitter's age and also their name. It could be that there are 20 people in the family so they might enter toweny names followed by their ages.
Is there a better way to get the data from the submitter that the way I have done it below?

[code]

<?php

if(isset($_POST["Submit"]))
{
require("c:\php\includes\class.phpmailer.php");

$mail = new PHPMailer();

$toaddress = "xxxxxxxxxxxxxx"; //Change this to the email address you will be receiving your notices.
$mailhost = "xxxxxxxxxxxxxxxxxxxx"; //Change this to your actual Domain name.
$fromaddress = "xxxxxxxxxxxxxxxxxxxxxx"; //Change this to the email address you will use to send and authenticate with.
$frompwd = "zzzzzzzzzzz"; //Change this to the above email addresses password.
$subject = "Airedale 911 Application Form"; //Change this to your own email message subject.

$referredby = $_POST["Referredby"];
$fromname = $_POST["Name"];
$street = $_POST["Street"] ;
$city = $_POST["City"];
$state = $_POST["State"];
$zip = $_POST["Zip"];
$homephone = $_POST["Homephone"] ;
$workphone = $_POST["Workphone"];
$cellphone = $_POST["Cellphone"];
$rplyto = $_POST["Email"];
$family = $_POST["Family"];
$ages = $_POST["Ages"];
$sex = $_POST["Sex"] ;
$previouslyowned = $_POST["Previouslyowned"] ...

I have a field set as number (num) for validation. The code below will only allow numbers to be accepted in the field.

I would like to modify it such that is MUST have at least two numbers and as many characters as the person wants to type.
Can it be done by manipuplating this code?
Thx

[code]

if (validateObject.type == "num" || validateObject.type == "string") {
if ((validateObject.type == "num" && validateObject.len <= 0) || (validateObject.type == "num" && isNaN(validateObject.val))) { errors += language['start'] + language['field'] + validateObject.HTMLname + language['require'] + language['num'] + "\n";

[/code]

Oh, also...where is the connection script placed? Is that PHP or Javascript or HTML? Can I place it anywhere in the code?
Thx

Thank! Great response. How would you define the 'root' or do I leave the word 'root' as is. Where do I define the url to the server?

Happy Holidays!

I have a one field form. Upon submission with the submit button, I wish to drive this field value into my SQL database table called MEMBERS and field called NAMES, thus adding a new record.

Can this be done with an OnSubmit() call to a function, in the HEAD of the HTML form page, which contains a series of statements opening the database, entering the data, and closing the database?

[code]
<tr>
<td class="mystyle">Your Full Name:</td>
<td><input type="text" name="Name" size="30"></td>
</tr>
[/code]

In your first solution, could I not simply type in
[url]http://www.mysite/yourpage.com[/url] and get to the page?

I'm using the Brinkster control panel Database Manager to investigate a database on a site I just took over. I don't know anything about the database. I tried a SHOW TABLES and got an error. I also tried SHOW ALL. Do you think I need a ; after the command or something?
Thx

Hi,

This is a tough one!

Is there a way to prevent someone from typing in a url to get to a page YET that page IS accessible from a LINK on some other webpage.

Thx

Let me see if I understand.
You are saying JS is better because you won't have to store data to be retrieved since the validation is done at the time the form is filled out on client side. So you eliminate a database storage and you don't have to submit to validate.

Thanks! Wonder why it's called header. What's it got to do with a header. It's a statement that will open a url inside php. Someone said it could not be done.

Hmmm. Actually this is a form. Once submitted I would like to close the form window and open a thank you url.

Here's the area of the code I refer to. Thanks!

[code=syntax]

if(!$mail->Send())
{
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
$handle = fopen("http://www.stopaeta.org", "r");
}
?>
<html>
[/code]

Good morning. I would like to replace line 178 with a statement which would simply open a new url and close out the page that calls the new url. Can this be done with one line of code? Thanks sin advance.

[code=syntax]
<?php

if(isset($_POST["Submit"]))
{
require("c:\php\includes\class.phpmailer.php");

$mail = new PHPMailer();

$toaddress = "rocky@airedale911.org"; //Change this to the email address you will be receiving your notices.
$mailhost = "mail.airedale911.org"; //Change this to your actual Domain name.
$fromaddress = "rocky@airedale911.org"; //Change this to the email address you will use to send and authenticate with.
$frompwd = "none"; //Change this to the above email addresses password.
$subject = "Airedale 911 Application Form"; //Change this to your own email message subject.

$referredby = $_POST["Referredby"];
$fromname = $_POST["Name"];
$street = $_POST["Street"] ;
$city = $_POST["City"];
$state = $_POST["State"];
$zip = $_POST["Zip"];
$homephone = $_POST["Homephone"] ;
$workphone = $_POST["Workphone"];
$cellphone = $_POST["Cellphone"];
$rplyto = $_POST["Email"];
$family = $_POST["Family"] ;
$sex = $_POST["Sex"] ;
$previouslyowned = $_POST["Previouslyowned"] ;
$whenpreviouslyowned = $_POST["Whenpreviouslyowned"] ;
$sexpreviouslyowned = $_POST["Sexpreviouslyowned"] ;
$otherbreeds = $_POST["Otherbreeds"] ;
$fateoflastdog = $_POST["Fateoflastdog"] ;
$lostadog = $_POST["Lostadog"] ;
$movegiveupdog = $_POST["Movegiveupdog"] ;
$otherpets = $_POST["Otherpets"] ;
$otherpetsages = $_POST["Otherpetsages"] ;
$otherpetsspayedneutered = $_POST["Otherpetsspayedneutered"] ;
$a = $_POST["A"] ;
$fencedinyard = $_POST["Fencedinyard"] ;
$kindoffence = $_POST["Kindoffence"] ;
$howhighfence = $_POST["Howhighfence"] ;
$sizeoffencedinarea = $_POST["Sizeoffencedinarea"] ;
$runofhouse = $_POST["Runofhouse"] ;
$allowedonfurniture = $_POST["Allowedonfurniture"] ;
$havebedandblanket = $_POST["Havebedandblanket"] ;
$dogbedinwhatroom = $_POST["Dogbedinwhatroom"] ;
$wherewillairedalesleep = $_POST["Wherewillairedalesleep"] ;
$hoursnoonehome = $_POST["Hoursnoonehome"] ;
$daysaweekalone = $_POST["Daysaweekalone"] ;
$whatroomabovetimes = $_POST["Whatroomabovetimes"] ;
$travelingwherewilldogstay ...

Is there a way to see why this particular javascript validator is not affecting the submission of this form. It submits with all fields empty.
Here's the simple code
[code=syntax]
<?php

if(isset($_POST["Submit"]))
{
require("c:\php\includes\class.phpmailer.php");

$mail = new PHPMailer();

$toaddress = "rocky@airedale911.org"; //Change this to the email address you will be receiving your notices.
$mailhost = "mail.airedale911.org"; //Change this to your actual Domain name.
$fromaddress = "rocky@airedale911.org"; //Change this to the email address you will use to send and authenticate with.
$frompwd = "password"; //Change this to the above email addresses password.
$subject = "Airedale 911 Application Form"; //Change this to your own email message subject.

$referredby = $_POST["Referredby"];
$fromname = $_POST["Name"];
$street = $_POST["Street"] ;
$city = $_POST["City"];
$state = $_POST["State"];
$zip = $_POST["Zip"];
$homephone = $_POST["Homephone"] ;
$workphone = $_POST["Workphone"];
$cellphone = $_POST["Cellphone"];
$rplyto = $_POST["Email"];
$family = $_POST["Family"] ;
$sex = $_POST["Sex"] ;
$previouslyowned = $_POST["Previouslyowned"] ;
$whenpreviouslyowned = $_POST["Whenpreviouslyowned"] ;
$sexpreviouslyowned = $_POST["Sexpreviouslyowned"] ;
$otherbreeds = $_POST["Otherbreeds"] ;
$fateoflastdog = $_POST["Fateoflastdog"] ;
$lostadog = $_POST["Lostadog"] ;
$movegiveupdog = $_POST["Movegiveupdog"] ;
$otherpets = $_POST["Otherpets"] ;
$otherpetsages = $_POST["Otherpetsages"] ;
$otherpetsspayedneutered = $_POST["Otherpetsspayedneutered"] ;
$otherpetscurrentlylicensed = $_POST["Otherpetscurrentlylicensed"] ;
$fencedinyard = $_POST["Fencedinyard"] ;
$kindoffence = $_POST["Kindoffence"] ;
$howhighfence = $_POST["Howhighfence"] ;
$sizeoffencedinarea = $_POST["Sizeoffencedinarea"] ;
$runofhouse = $_POST["Runofhouse"] ;
$allowedonfurniture = $_POST["Allowedonfurniture"] ;
$havebedandblanket = $_POST["Havebedandblanket"] ;
$dogbedinwhatroom = $_POST["Dogbedinwhatroom"] ;
$wherewillairedalesleep = $_POST["Wherewillairedalesleep"] ;
$hoursnoonehome = $_POST["Hoursnoonehome"] ;
$daysaweekalone = $_POST["Daysaweekalone"] ;
$whatroomabovetimes = $_POST["Whatroomabovetimes"] ;
$travelingwherewilldogstay = $_POST["Travelingwherewilldogstay"] ;
$familiardogcrate = $_POST["Familiardogcrate"] ;
$whenwheredogcrate = $_POST["Whenwheredogcrate"] ;
$reference1 ...

Hi Gurus,
I have a form that works well. But there is no validation. Can validation be added on after the fact? I'm sure it's not ideal but can it be done. General suggestion appreciated on how.

Here's the code
[code=php]
<?php

if(isset($_POST["Submit"]))
{
require("c:\php\includes\class.phpmailer.php");

$mail = new PHPMailer();

$toaddress = "rocky@airedale911.org"; //Change this to the email address you will be receiving your notices.
$mailhost = "mail.airedale911.org"; //Change this to your actual Domain name.
$fromaddress = "rocky@airedale911.org"; //Change this to the email address you will use to send and authenticate with.
$frompwd = "notarealpassword"; //Change this to the above email addresses password.
$subject = "Airedale 911 Application Form"; //Change this to your own email message subject.

$referredby = $_POST["Referredby"];
$fromname = $_POST["Name"];
$street = $_POST["Street"] ;
$city = $_POST["City"];
$state = $_POST["State"];
$zip = $_POST["Zip"];
$homephone = $_POST["Homephone"] ;
$workphone = $_POST["Workphone"];
$cellphone = $_POST["Cellphone"];
$rplyto = $_POST["Email"];
$family = $_POST["Family"] ;
$sex = $_POST["Sex"] ;
$previouslyowned = $_POST["Previouslyowned"] ;
$whenpreviouslyowned = $_POST["Whenpreviouslyowned"] ;
$sexpreviouslyowned = $_POST["Sexpreviouslyowned"] ;
$otherbreeds = $_POST["Otherbreeds"] ;
$fateoflastdog = $_POST["Fateoflastdog"] ;
$lostadog = $_POST["Lostadog"] ;
$movegiveupdog = $_POST["Movegiveupdog"] ;
$otherpets = $_POST["Otherpets"] ;
$otherpetsages = $_POST["Otherpetsages"] ;
$otherpetsspayedneutered = $_POST["Otherpetsspayedneutered"] ;
$otherpetscurrentlylicensed = $_POST["Otherpetscurrentlylicensed"] ;
$fencedinyard = $_POST["Fencedinyard"] ;
$kindoffence = $_POST["Kindoffence"] ;
$howhighfence = $_POST["Howhighfence"] ;
$sizeoffencedinarea = $_POST["Sizeoffencedinarea"] ;
$runofhouse = $_POST["Runofhouse"] ;
$allowedonfurniture = $_POST["Allowedonfurniture"] ;
$havebedandblanket = $_POST["Havebedandblanket"] ;
$dogbedinwhatroom = $_POST["Dogbedinwhatroom"] ;
$wherewillairedalesleep = $_POST["Wherewillairedalesleep"] ;
$hoursnoonehome = $_POST["Hoursnoonehome"] ;
$daysaweekalone = $_POST["Daysaweekalone"] ;
$whatroomabovetimes = $_POST["Whatroomabovetimes"] ;
$travelingwherewilldogstay = ...

tried that it none of the data was in the email.
Here's what I ended up with that worked
[code=php]

$msgbody = "Referred by = " . $referredby
."<br>"
."Your Full Name = " . $fromname
."<br>"
."Your Street Address = " . $street
."<br>"
."City = " . $city
."<br>"
."State = " . $state
."<br>"
."Zip Code = " . $zip;

[/code]

Hi everyone: I have a form that will submit but won't show any data. No errors though. Does the syntax suggest anything right off the bat? It was working well until I broke up the $msgbody vertically for ease of reading. Thx

[code=syntax]
$msgbody = ;
"Referred by = " . $referredby;
"<br>";
"Your Full Name = " . $fromname;
"<br>";
"Your Street Address = " . $street;
"<br>";
"City = " . $city;
"<br>";
"State = " . $state;
"<br>";
"Zip Code = " . $zip;
"<br>";
"Your home telephone number (xxx-xxx-xxxx) = " . $homephone;
"<br>";
[/code]

One last question since I added to your reputation, please.
You know how I added the Iframe to point to the php like you suggested. The php is a simple php form.
There is a SQL database also. It it technically possible to add lines to code beneath each form field stating that upon successful submission, add these variable values to the database?
We have a tracker that tracks submissions. Since I'm doing this differently from aspx I will have to find a way to get the NAME towhomemailed DATE etc into the tracker so there is a database listing of each submission.
Can this be done sort of after the fact in my php script?
Thx

Thanks Serkansendur
That works like a charm.
One way around aspx!

That's a great idea if it works.
Is it a complicated process or just a statement?

I have a template for web pages which is asp.net
Inside the content object or whatever it's called, it wish to place a simpe PHP form. I tried it and the PHP code doesn't seem to be recognized as PHP but as text.
Can this NOT be done?

[code=syntax]
<%@ page language="VB" masterpagefile="~/pages/airedale911.master" autoeventwireup="false" inherits="feedback, App_Web_i5ksdbwd" title="airedale911.org: Feedback" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" runat="Server">

<?php

if(isset($_POST["Submit"]))
{
require("c:\php\includes\class.phpmailer.php");

$mail = new PHPMailer();

////////////////////////////////////////////////////////////////
// Customize the following 5 lines with your own information. //
////////////////////////////////////////////////////////////////

$toaddress = "rocky@airedale911.org"; //Change this to the email address you will be receiving your notices.
$mailhost = "mail.airedale911.org"; //Change this to your actual Domain name.
$fromaddress = "rocky@airedale911.org"; //Change this to the email address you will use to send and authenticate with.
$frompwd = "password"; //Change this to the above email addresses password.
$subject = "Airedale 911 Application Form"; //Change this to your own email message subject.

//////////////////////////////////////////
// DO NOT CHANGE ANYTHING PAST THIS LINE//
//////////////////////////////////////////

$fromname = $_POST["TName"];
$body = $_POST["TBody"] ;
$rplyto = $_POST["TEmail"];
$msgbody = $fromname . "<br>" . $rplyto . "<br>" . $body;

$mail->IsSMTP();
$mail->Host = $mailhost;
$mail->SMTPAuth = true;
$mail->Username = $fromaddress;
$mail->Password = $frompwd;

$mail->From = $fromaddress;
$mail->FromName = $fromname;
$mail->AddReplyTo($rplyto);
$mail->AddAddress($toaddress);
$mail->IsHTML(true);
$mail->Subject = $subject;
$mail->Body = $msgbody;

if(!$mail->Send())
{
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}

echo "Thank you, your message has been sent!";
}

?>

<html><body>
<form name="SendEmail01" method="post">
<table border=0>
<tr>
<td>Name:</td>
<td><input type="text" name="TName" size="30"></td>
</tr> ...