Click to See Complete Forum and Search --> : Help wityh this HTML?


Baby Jai
08-11-2003, 08:50 PM
I need help with this HTMl. I would like it to go directly to my mail, what do i have to edit in it? Its currently ran through another server on another website, I just want to edit it so I dpont have to go through them



<form name="mfEntryForm1" method=post enctype="multipart/form-data" action="http://mailform.sparklit.com/makemail">
<table width=591 align="center" cellpadding=7 cellspacing=0 bgcolor="#000000" style="font-family: arial, helvetica; border: 1px solid #000000">
<tr>
<td colspan=2 bgcolor="#000000" align="left"><b><big><font color="#FFFFFF">Application
For Male/Female Erotic Models</font></big></b></td>
</tr>
<tr>
<td width="199" valign="middle"><font size=2 color="#FFFFFF">#1 What is your email address?
<b><small>**</small></b></font></td>
<td width="362" align="left" valign="middle"><font size=2 color="#FFFFFF">
<input type="text" name="q177772" size=30 style="color: #000000; border: 1px solid #000000">
</font></td>
</tr>
<tr>
<td valign="middle"><font size=2 color="#FFFFFF">#2 Where are you from?
Country, State and Town? <b><small>**</small></b></font></td>
<td valign="middle" align="left"><font size=2 color="#FFFFFF">
<textarea name="q177773" cols=30 rows=5 style="color: #000000; border: 1px solid #000000"></textarea>
</font></td>
</tr>
<tr>
<td valign="middle"><font size=2 color="#FFFFFF">#3 How Old Are You? <b><small>**</small></b></font></td>
<td valign="middle" align="left"><font size=2 color="#FFFFFF">
<input type="text" name="q283182" size=30 style="color: #000000; border: 1px solid #000000">
</font></td>
</tr>
<tr>
<td valign="middle"><font size=2 color="#FFFFFF">#4 What is your sex? <b><small>**</small></b></font></td>
<td valign="middle" align="left"><font size=2 color="#FFFFFF">
<select name="q288823" style="color: #000000; border: 1px solid #000000">
<option>
<option>Male
<option>Female
<option>Hemaphrodite
</select>
</font></td>
</tr>
<tr>
<td valign="middle"><font size=2 color="#FFFFFF">#5 What is your exact size?
<b><small></small></b></font></td>
<td valign="middle" align="left"><font size=2 color="#FFFFFF">
<input type="text" name="q288824" size=30 style="color: #000000; border: 1px solid #000000">
</font></td>
</tr>
<tr>
<td valign="middle"><font size=2 color="#FFFFFF">#6 How tall are you? <b><small>**</small></b></font></td>
<td valign="middle" align="left"><font size=2 color="#FFFFFF">
<input type="text" name="q288825" size=30 style="color: #000000; border: 1px solid #000000">
</font></td>
</tr>
<tr>
<td valign="middle"><font size=2 color="#FFFFFF">#7 What is your estimated
weight? <b><small>**</small></b></font></td>
<td valign="middle" align="left"><font size=2 color="#FFFFFF">
<input type="text" name="q288826" size=30 style="color: #000000; border: 1px solid #000000">
</font></td>
</tr>
<tr>
<td valign="middle"><font size=2 color="#FFFFFF">#8 Body</font></td>
<td valign="middle" align="left"><font size=2 color="#FFFFFF">
<input type="text" name="q288827" size=30 style="color: #000000; border: 1px solid #000000">
</font></td>
</tr>
<tr>
<td valign="middle"><font size=2 color="#FFFFFF">#9 Submit Your Picture
Here <b><small>**</small></b></font></td>
<td valign="middle" align="left"><font size=2 color="#FFFFFF">
<input type="file" name="q288828" style="color: #000000; border: 1px solid #000000">
</font></td>
</tr>
<tr>
<td colspan=2 bgcolor="#000000" align="right"><input type="submit" style="color: #000000; font-color: #000000; border: 0px solid #000000" value="Send This Mail"></td>
</tr>
</table>
<input type=hidden name="MFid" value="43185">
</form>

pyro
08-11-2003, 10:22 PM
You'll have to set the action to point to a script on your domain. Here is a PHP from handler: http://www.webdevfaqs.com/php.php#mailer

Baby Jai
08-12-2003, 10:39 AM
ok so do i have to set up a new SQL databse? or do i just put that exact stuff ina html file? this is where I get confused

pyro
08-12-2003, 10:44 AM
It doesn't use a database. That code needs to go into a .php file. If I were you, I would download the example file that has been provided to see how it all works (it also includes a readme). You will need a server that supports PHP for it to work.

Baby Jai
08-12-2003, 11:00 AM
Ok, well here is the thing. Dreamweaver mx supports the making of a php file. My server also supports it thats how i made the forum. But what Im saying is how do i actually creat it? Lets say we take my HTML above, all I have to chnage is what? Also do i just copy that all into a php file?

pyro
08-12-2003, 11:05 AM
In your current HTML, all you need to do is point the form's action to point to the .php file that contains the code on the page I pointed you to. (If you download the .zip file, it is mailer.php)

Baby Jai
08-12-2003, 11:06 AM
Ok tell me what is wrong with this?

http://www.babyjai.com/application.php

pyro
08-12-2003, 11:10 AM
mailer.php does not exist, it would appear: http://www.babyjai.com/mailer.php

Baby Jai
08-12-2003, 11:15 AM
Ok i got it to work, but how do i get it to go to the thank you.html, also how do I get it to keep the file attachment and I get that with the mail as well? Also how do i change the name of each of the questions when I get the email?

Baby Jai
08-12-2003, 11:22 AM
how do i make it where certain questions need to be answered?

pyro
08-12-2003, 11:28 AM
#1 Change the $forwardvariable to 1

$forward = 1; # redirect? 1 : yes || 0 : no

#2 You will need to set it up to be able to send attachements: http://www.hollowearth.co.uk/tech/php/email_attachments.php

#3 Not sure what you mean

#4 You will need to do some checking to be sure the fields contain values. I would use javascript and PHP (the javascript will be nice for those who have it enabled, and the PHP for those who do not)

Baby Jai
08-12-2003, 12:57 PM
do you recommend any certain scripts for the javascript checking to be sure the fields are filled in correctly?

Baby Jai
08-12-2003, 12:59 PM
I cant even touch that PHP attachements form. Thats too hard and I have no diea what Im doing.

pyro
08-12-2003, 01:22 PM
I wrote this up a while back. It will itterate through all the form fields to be sure they are all filled out: http://www.infinitypages.com/research/formvalidation.htm

Baby Jai
08-12-2003, 01:30 PM
First off pyro I want to thank you for all your help, but its not working

pyro
08-12-2003, 01:34 PM
You didn't add the onsubmit handler to your form. This:

<form action="mailer.php" method="post">

needs to be:

<form action="mailer.php" method="post" onsubmit="return validate(this);">

Baby Jai
08-12-2003, 01:40 PM
Ok thanks

pyro
08-12-2003, 01:44 PM
What it does is takes the name you give each field and uses those (as does the PHP). This is why you want to give you fields descriptive names.

So, for the first one, change this:

<input type="text" name="q177772" ... >

to:

<input type="text" name="email" ... >

And for the second:

<textarea name="q177773" ... >

to something like:

<textarea name="location" ... >

Baby Jai
08-12-2003, 01:44 PM
ok got a problem, for the drop down box, its asking for me to fill it out, but its slected, what can we do about this?

Baby Jai
08-12-2003, 01:46 PM
I edited my ok thanks from that question. ;), you beat me to it!!:) Your good peoples, also one more question is they fill in under then 18 for age, how can i get the form to turn it down, is that possible?

pyro
08-12-2003, 01:53 PM
Add this to the script:

if (document.Age.value < 18) {
alert ("You must be older than 18.");
return false;
}

Baby Jai
08-12-2003, 01:59 PM
what about the Gender question, its filled in and its still telling me to fill in that area

Baby Jai
08-12-2003, 02:01 PM
Originally posted by pyro
Add this to the script:

if (document.Age.value < 18) {
alert ("You must be older than 18.");
return false;
}

Where do I put that script at?

pyro
08-12-2003, 02:08 PM
Add it right after this:

if (x == 1) {
alert (msg);
return false;
}

Baby Jai
08-12-2003, 02:13 PM
no good, then it doesnt verify each field is filled out

Baby Jai
08-12-2003, 02:15 PM
and why does it say this when I get the email from the application From: Joes@whatever, Form@whatever, but its called Joes Form?

pyro
08-12-2003, 02:19 PM
Sorry, just a stupid error on my part -- forgot to reference the form :rolleyes:

Try this one:

if (document.forms[0].Age.value < 18) {
alert ("You must be older than 18.");
return false;
}

Not sure what you mean by your other question.

Baby Jai
08-12-2003, 02:28 PM
like in the mailer.php you can set up who it says when you get it like for IE it says

$headers = "From: joes Forum"; #set the from address, or any other headers

when I was getting it in the mail it said just thatr, now im getting them and =after each name it will say my servers name, for ie Joe@whatever.com, Forums@whatever.conm

Baby Jai
08-12-2003, 02:30 PM
still no good. it doesnt verify buddy

pyro
08-12-2003, 02:39 PM
This one should:

<script type=text/javascript>
function validate(frm) {
msg = "Please fill out the following fields:\n";
x = 0;
for (i=0; i<frm.elements.length; i++) {
if(/^\s*$/.test(frm.elements[i].value)) {
msg += frm.elements[i].name+"\n";
x = 1;
}
}
if (x == 1) {
alert (msg);
return false;
}
if (document.forms[0].Age.value < 18 || isNaN(document.forms[0].Age.value)) {
alert ("You must be older than 18.");
return false;
}
}
</script>

Baby Jai
08-12-2003, 02:47 PM
whos the man!!!!!!!!!!!!!!!!!!!!! You are!! Only one more problem if we could solve that issue where it has my severs name in the from area.

Baby Jai
08-12-2003, 02:48 PM
Ok, dont aworry about that! Its good now. Also how do we fix the time issue??? That when I receive it? It says like 930 pm, how do i edit that so it says the current time in EST?

pyro
08-12-2003, 04:06 PM
What time zone is your server in?

Baby Jai
08-12-2003, 04:17 PM
Online Support: You mean time Zone. If it isn't UTC, then it is probably PDT (-700).
you: well im tryoing to configure a form i created
Online Support: or is that PST (-700)? I'm afraid I confuse the two.
you: and the time the form is submitted is set by the server
Online Support: OK. Then that is the machine time. And unless you are using certain routines, the default display is probably PDT

Thats from online support. So I guess you can take it from there.

Also let me ask you one more PHP question, how do i just set the form to check for JUST the age verification. Not all the field just the age

pyro
08-12-2003, 04:26 PM
In mailer.php swap out

$time = date ("h:i A");

for

$hour = date ("h");
$hour = $hour + 3; # PST + 3 = EST
$min = date ("i A");
$time = $hour.":".$min;

And, for the age validation, do you mean in the javascript, or in the PHP code?

Baby Jai
08-12-2003, 04:29 PM
Javascript, just liek we did before. All i need is that the age is 18, liek your script before but check this out
Here (http://www.babyjai.com/forumapplication.php) , and tell me what you get, whats wrong with it

pyro
08-12-2003, 04:35 PM
It seems to be working fine for me... What isn't working for you?

Baby Jai
08-12-2003, 06:20 PM
lol igot it, thanks

pyro
08-12-2003, 11:05 PM
Great, you're welcome... :)

Baby Jai
01-15-2004, 01:16 AM
hey pyro, long time no talk. Ok Im having an issue, i using a drop down with this list and for some reason its telling me its not filled out, how is that possible if the item is selected. I did everything you have listed in this section, but yet still no good

Baby Jai
01-15-2004, 01:19 AM
This field will be filled out but it keeps telling me its not

<tr bgcolor="#FFFFFF">
<td valign="middle"><font color="#000000" size=2 face="Arial">#5 Who referred
you to this site if anyone or anysite, if not applicable please choose
so and tell us how you heard about us?**</font></td>
<td align="left" valign="middle"><font size=2 color="#000000">
<select name="Referal Info" style="color: #000000; border: 1px solid #000000">
<option selected>Choose One</option>
<option>Baby Jai</option>
<option>Larry</option>
<option>Satan Spawn</option>
<option>Google</option>
<option>Other(See Below)</option>
</select>
</font>

pyro
01-15-2004, 02:24 PM
Try giving each option a value. ie: <option value="foo">foo</option>

Baby Jai
01-16-2004, 02:49 AM
once again your the man pyro

pyro
01-16-2004, 06:57 AM
:)

Baby Jai
03-24-2004, 03:58 AM
hey pyro....got issues buddy...why wont this validate?

http://www.invision-it-all.com/app-staff.php

Paul Jr
03-24-2004, 01:13 PM
Originally posted by Baby Jai
hey pyro....got issues buddy...why wont this validate?

http://www.invision-it-all.com/app-staff.php
It's probably because you are using a Frameset DTD, but you don't have a frameset in your document.