PDA

View Full Version : Is there a tutorial for php script for Form here ?



WSBlue
04-27-2006, 06:29 PM
Dear Friends,
I have read a lot of threads about applying php scripts for form.
It will be nice if there is a TUTORIAL...like what script to be used for
>*Required Field
> Confirm Page or Thank you page
> Error or Sorry required field needed page or
rejected if phone number or
postal code not being filled with numbers or
uncorrect email ... like missing "@" or
some thing like that.
I am confused to read all those threads because everybody has different problems. There are TOO may to read. It will be nice if there is tutorial for this.
Please advise. Thank you.
Regards, WS_Blue

davidundalicia
04-27-2006, 07:09 PM
I tend to agree with you in that there are lots and lots of different threads on the same subject. But thats the nature of forums where each person has a slightly different request.
Different people have also tried to help at various times, hence the various
solutions.
Just keep in mind exactly what you want to achieve and then approach it one step at a time.
For a simple form with f.e. name, email, and comment/message fields
look at pablos example.
Then when you wish to progress with perhaps error checking, look at navaldesign examples.
If you are looking for something special you could always prevail upon
naval to see if he or anyone else could help........
Its not easy, but then its not that hard if you use search and view existing videos on forms......
Good luck, and please post again if and when you need further help.

WSBlue
04-27-2006, 07:37 PM
Thanks! David.
I have created a web using BV.. The content is not in English but in Indonesian.
I have a page called
FORMULIR means FORM and another page called
HUBUNGI KAMI means CONTACT US.
I have used the generic php script provided by BV and followed the instructions but can't get me to MY confirm or error page.
Please kindly advise.
Regards,
WS_Blue
Below is my site, would anyone please take a look and provide me your valuable knowledge for the scripts I need ?
http://www.beruang.biz (http://www.beruang.biz)
http://www.beruang.biz/formulir.htm (http://www.beruang.biz/formulir.htm) (Form)
http://www.beruang.biz/hubungikami.htm (http://www.beruang.biz/hubungikami.htm) (Contact Us)

davidundalicia
04-27-2006, 07:59 PM
Hi wsblue,

Have looked at your home page, your formulir and your hubungikami page...
I can see a problem:

1) You have a form and a contact page but at the moment your links to both end up on your forms page.

2) I can help you with your contact page in terms of
name - email - message etc
but you will need someone more expert with php to complete your
forms page......

get back to me with your thoughts.....

Andy128
04-27-2006, 08:04 PM
WsBlue,

In looking at the code for the "form" page - your action is left empty and you have encode type= text/plain and it should be blank.

Your second form page "contact us" you have it set properly - which is action=hubung.php and the encode type is left blank.

As to the error page- have you set up the php code to validate fields?

As to the basic set up of a php mail to form- I can only suggest that you take a look at these instructions and try to follow them exactly. This will get you to a basic mail to WITHOUT field validation and error reporting.

If you have already looked at these instructions- perhaps going over it one more time might help.

http://netisopen.com/computer/TF001/T001.html

Once you get that basic mail to working- we can tackle the validation of fields.

Cheers

Andy

navaldesign
04-27-2006, 08:24 PM
Field validation is not that hard. However it might become frustrating for someone with no experience. Hence, just build the form as you would like it, and i'll see to your script, whithin my limits

WSBlue
04-28-2006, 07:42 PM
Hi wsblue,

Have looked at your home page, your formulir and your hubungikami page...
I can see a problem:

1) You have a form and a contact page but at the moment your links to both end up on your forms page.
I also don't know, how it happen and why can't it bring to confirm or error page.

2) I can help you with your contact page in terms of
name - email - message etc
Thanks a lot, David,
Please, at least it will get me a start.

But, Can you please take a look here? (http://www.bebosoft.com/products/formstogo/) Is this helpful or easier?

Regards,
WS_Blue

but you will need someone more expert with php to complete your
forms page......

get back to me with your thoughts.....
.................................................. ...............
.................................................. ..............

WSBlue
04-28-2006, 07:54 PM
WsBlue,

In looking at the code for the "form" page - your action is left empty and you have encode type= text/plain and it should be blank.

Your second form page "contact us" you have it set properly - which is action=hubung.php and the encode type is left blank.

As to the error page- have you set up the php code to validate fields?

As to the basic set up of a php mail to form- I can only suggest that you take a look at these instructions and try to follow them exactly. This will get you to a basic mail to WITHOUT field validation and error reporting.

If you have already looked at these instructions- perhaps going over it one more time might help.

http://netisopen.com/computer/TF001/T001.html

Once you get that basic mail to working- we can tackle the validation of fields.

Cheers

Andy

Thanks, Andy.
I have read a lot about, all of the problem everyone has in the threads. The more I read, the more worry and confuse I get. Don't know, where to start and which to follow. But I will try again what you suggested and hopefully, my site will get publihed properly soon.
Regards, WSblue

WSBlue
04-28-2006, 08:05 PM
Field validation is not that hard. However it might become frustrating for someone with no experience. Hence, just build the form as you would like it, and i'll see to your script, whithin my limits
Thanks.

WSBlue
04-29-2006, 06:33 AM
[quote=navaldesign]Field validation is not that hard. However it might become frustrating for someone with no experience. Hence, just build the form as you would like it, and i'll see to your script, whithin my limits


Yes. I have built my form(s).
Perhaps, you may please take a look and donate some of your precious time to help me with the php scripts.
Danke. Alles Gute!
WS_Blue

http://www.beruang.biz (http://www.beruang.biz/)
http://www.beruang.biz/formulir.htm (http://www.beruang.biz/formulir.htm) (Form)
http://www.beruang.biz/hubungikami.htm (http://www.beruang.biz/hubungikami.htm) (Contact Us)

davidundalicia
04-29-2006, 10:48 AM
wsblue,

this is an extract from the tutorial that andy suggested you take another look at:

PLEASE NOTE:

The .html page that contains your form must have the EXACT same name as your .php page. For example If your form is on a page called feedback.html , the php page will be called feedback.php

Looking at your code this morning,(I received a 404 error (form not found)
I found the following....
FORM name="Hubungi Kami" action=hubung.php
I suggest you change the name of your php file to "HubungiKami.php"....this will then be the same name as your contact form.......
and then ftp the new file to your main directory again.

navaldesign
04-29-2006, 12:05 PM
Not really. There is no need for having the same name between html form page and php page. You got the 404 error because WSblue has not yet uploaded any php file.

davidundalicia
04-29-2006, 05:15 PM
naval
then why the heck have tutorials and then negate what they tell you.....

The .html page that contains your form must have the EXACT same name as your .php page.

navaldesign
04-29-2006, 08:42 PM
Well, we all are wrong sometimes

davidundalicia
04-29-2006, 09:09 PM
naval, no problems, how did you find out that he had not
uploaded a php file ??? just curious.....

navaldesign
04-29-2006, 09:31 PM
He's simply waiting me to give him the script......

OR, at least that's what i thought when i posted

Andy128
04-30-2006, 03:25 AM
David

I believe that I had corrected my tutorial some time ago- I had re-vamped it and the link above should have taken to the new one. In the new one
the pages have different names.

The new one has a Revised 4/20/06 in the upper left corner. Is this the one that you were talking about?

Just trying to figure out what happened.

Give me an e-mail if you have time.

Andy

navaldesign
04-30-2006, 08:31 AM
Hi WSBlue, your http://www.beruang.biz/formulir.htm needs some corrections. Rename the second upload field. It has the same name as the first one. Also correct the tahunpembuatan] field. Take the ] off. Republish and let me know.

navaldesign
04-30-2006, 08:48 AM
Hi WSBlue,
here is the script for your contact form page:

<?php
// Receiving variables
@$hubnamalengkap = addslashes($_POST['hubnamalengkap']);
@$hubalamat = addslashes($_POST['hubalamat']);
@$hubtelhp = addslashes($_POST['hubtelhp']);
@$hubemail = addslashes($_POST['hubemail']);
@$hubtanyasaran = addslashes($_POST['hubtanyasaran']);
// Validation
if (strlen($hubnamalengkap) == 0 )
{
header("Location: error_page.html");
exit;
}
if (strlen($hubalamat) == 0 )
{
header("Location: error_page.html");
exit;
}
if (strlen($hubtelhp) == 0 )
{
header("Location: error_page.html");
exit;
}
if (strlen($hubemail) == 0 )
{
header("Location: error_page.html");
exit;
}
if (strlen($hubtanyasaran) == 0 )
{
header("Location: error_page.html");
exit;
}
//Sending Email to form owner
$pfw_header = "From: $hubemail\n"
. "Reply-To: $hubemail\n";
$pfw_subject = "Put your Subject here";//Change it as you wish
$pfw_email_to = "youremail@beruang.biz"; //Put your own email in your account
$pfw_message = "hubnamalengkap: $hubnamalengkap\n"
. "hubalamat: $hubalamat\n"
. "hubtelhp: $hubtelhp\n"
. "hubemail: $hubemail\n"
. "hubtanyasaran: $hubtanyasaran\n";
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: thankyou_page.html");
?>

Please create the following pages in MSHTML: "error_page" and "thankyou_page". These must be simply BV pages. In the error page insert also a "Back" button to get them back in the form. To do so insert a html box in your page and paste there the following code:

<FORM>
<input type="button" class="but" value="< BACK TO THE FORM " onclick=history.go(-1)>
</FORM>

If you wish you may change the header("Location: error_page.html");
after each field validation line (see above in red) creating separate error pages for every type of error.

Copy the code and paste it in notepad. After you have made the changes, go to "Save as", choose File Type "All files" and save it as "hubung.php". Also please change the encoding type in "multipart/form data". Save and republish your form, and upload the script on your site, in the same folder as the form itself.

davidundalicia
04-30-2006, 02:24 PM
Andy....
Email on its way.....

WSBlue
04-30-2006, 05:07 PM
Hi WSBlue,
here is the script for your contact form page:

<?php
// Receiving variables
@$hubnamalengkap = addslashes($_POST['hubnamalengkap']);
@$hubalamat = addslashes($_POST['hubalamat']);
@$hubtelhp = addslashes($_POST['hubtelhp']);
@$hubemail = addslashes($_POST['hubemail']);
@$hubtanyasaran = addslashes($_POST['hubtanyasaran']);
// Validation
if (strlen($hubnamalengkap) == 0 )
{
header("Location: error_page.html");
exit;
}
if (strlen($hubalamat) == 0 )
{
header("Location: error_page.html");
exit;
}
if (strlen($hubtelhp) == 0 )
{
header("Location: error_page.html");
exit;
}
if (strlen($hubemail) == 0 )
{
header("Location: error_page.html");
exit;
}
if (strlen($hubtanyasaran) == 0 )
{
header("Location: error_page.html");
exit;
}
//Sending Email to form owner
$pfw_header = "From: $hubemail\n"
. "Reply-To: $hubemail\n";
$pfw_subject = "Put your Subject here";//Change it as you wish
$pfw_email_to = "youremail@beruang.biz"; //Put your own email in your account
$pfw_message = "hubnamalengkap: $hubnamalengkap\n"
. "hubalamat: $hubalamat\n"
. "hubtelhp: $hubtelhp\n"
. "hubemail: $hubemail\n"
. "hubtanyasaran: $hubtanyasaran\n";
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: thankyou_page.html");
?>

Please create the following pages in MSHTML: "error_page" and "thankyou_page". These must be simply BV pages. In the error page insert also a "Back" button to get them back in the form. To do so insert a html box in your page and paste there the following code:

<FORM>
<input type="button" class="but" value="< BACK TO THE FORM " onclick=history.go(-1)>
</FORM>

If you wish you may change the header("Location: error_page.html");
after each field validation line (see above in red) creating separate error pages for every type of error.

Copy the code and paste it in notepad. After you have made the changes, go to "Save as", choose File Type "All files" and save it as "hubung.php". Also please change the encoding type in "multipart/form data". Save and republish your form, and upload the script on your site, in the same folder as the form itself.

But I did upoad my php files which from Notepad.
However, Thousand Thanks for the script above. I will Try to upload it.
Regards,
WS Blue
There was a tutorial provided by BV. From BV webuilder ... View > Page HTML > (copy scipt) Paste script in the Inside Body Tag. BUT nothing can't be pasted from the script I copied, do I have to type up the script? Please advise!

WSBlue
04-30-2006, 05:14 PM
Nice to see, using Military Police officer ranking now.

navaldesign
04-30-2006, 05:20 PM
Please DO NOT mix the script i gave you with any html page. It has to be uploaded using BlueFTP according to my instructions. Copy the code from my post above, then paste it in notepad, and do all the rest as instructed. If you have any problems, use MY FORM (http://www.navaldesign.info/feedback13.html)to give me your loggin info and i will do it for you.

WSBlue
04-30-2006, 07:06 PM
Hi WSBlue,
here is the script for your contact form page:

<?php
// Receiving variables
@$hubnamalengkap = addslashes($_POST['hubnamalengkap']);
@$hubalamat = addslashes($_POST['hubalamat']);
@$hubtelhp = addslashes($_POST['hubtelhp']);
@$hubemail = addslashes($_POST['hubemail']);
@$hubtanyasaran = addslashes($_POST['hubtanyasaran']);
// Validation
if (strlen($hubnamalengkap) == 0 )
{
header("Location: error_page.html");
exit;
}
if (strlen($hubalamat) == 0 )
{
header("Location: error_page.html");
exit;
}
if (strlen($hubtelhp) == 0 )
{
header("Location: error_page.html");
exit;
}
if (strlen($hubemail) == 0 )
{
header("Location: error_page.html");
exit;
}
if (strlen($hubtanyasaran) == 0 )
{
header("Location: error_page.html");
exit;
}
//Sending Email to form owner
$pfw_header = "From: $hubemail\n"
. "Reply-To: $hubemail\n";
$pfw_subject = "Put your Subject here";//Change it as you wish
$pfw_email_to = "youremail@beruang.biz"; //Put your own email in your account
$pfw_message = "hubnamalengkap: $hubnamalengkap\n"
. "hubalamat: $hubalamat\n"
. "hubtelhp: $hubtelhp\n"
. "hubemail: $hubemail\n"
. "hubtanyasaran: $hubtanyasaran\n";
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: thankyou_page.html");
?>



If you wish you may change the header("Location: error_page.html");
after each field validation line (see above in red) creating separate error pages for every type of error.

Copy the code and paste it in notepad. After you have made the changes, go to "Save as", choose File Type "All files" and save it as "hubung.php". Also please change the encoding type in "multipart/form data". Save and republish your form, and upload the script on your site, in the same folder as the form itself.

HI! I WOULD LIKE TO ASK MORE FOR SOMETHING THAT I DON'T UNDERSTAND:
YOU WROTE THIS:
Please create the following pages in MSHTML: "error_page" and "thankyou_page". (I ASK: WHAT IS MSHTML?)These must be simply BV pages. In the error page insert also a "Back" button to get them back in the form (I ASK: IS IT LIKE THE SUBMIT BUTTON?). To do so insert a html box in your page and paste there the following code: (I ASK: HOW TO INSERT A HTML BOX IN MY PAGE AND PASTE IN MY PAGE, WHERE TO CLICK? )

<FORM>
<input type="button" class="but" value="< BACK TO THE FORM " onclick=history.go(-1)>
</FORM>

(I ASK: COULD YOU PLEASE EXPLAIN ONE MORE TIME.)
SO SORRY, FOR MY SLOW ABSORPTION. WSBLUE)

navaldesign
04-30-2006, 07:11 PM
I saw that your pages are not made in BV. I'm i wrong?
If you use BV, it's the top button in the left hand toolbar. Click on it. A window will open. Copy the code i gave you for the button, and paste it in that window. Close it, and you can then move the html box to place it anywhere you like in your page.

WSBlue
04-30-2006, 07:40 PM
I saw that your pages are not made in BV. I'm i wrong?
If you use BV, it's the top button in the left hand toolbar. Click on it. A window will open. Copy the code i gave you for the button, and paste it in that window. Close it, and you can then move the html box to place it anywhere you like in your page.


Yes. I got it, Thank you.
when previewed it says : < Back to form.
Can I change "< Back to Form" into my language?
If possible, How to do it?

BV is the ONLY one which get me to have interest to design my own web.

Nyoman
05-01-2006, 01:59 AM
Hi WSblue, i didn't know if you are an indonesian, apa kabar? i like your car advertise site, of course you can change to any language. make it like this:
<FORM>
<input type="button" class="but" value="< KEMBALI KE FORM" onclick=history.go(-1)>
</FORM>
or change with watever you want.

Ooooops, Major, Lieutenant, general ? is it new system? wow i am a Major
http://www.vodahost.com/vodatalk/images/icons/icon7.gif

WSBlue
05-01-2006, 05:04 AM
Hi WSblue, i didn't know if you are an indonesian, apa kabar? i like your car advertise site, of course you can change to any language. make it like this:
<FORM>
<input type="button" class="but" value="< KEMBALI KE FORM" onclick=history.go(-1)>
</FORM>
or change with watever you want.

Ooooops, Major, Lieutenant, general ? is it new system? wow i am a Major
http://www.vodahost.com/vodatalk/images/icons/icon7.gif
Terima kasih / Thank you for liking my site. Want to do something like this in Bali? Bapak Nyoman masih tinggal di Bali?
I am in Jakarta and have been to Bali only 3 times.
My e mail is necon2000******.com
> Yes, I got it. Now I can show it in Indonesian.
> Why, the script that I save in NOTEPAD like hubung.php but end up being saved in Macromedia Dreamweaver.
> Actually, I don't want to use a BAR to tell : BACK TO FORM (Balik ke Formulir) when required field not being filled
BUT From here, where I did in BV.
Can I do it and How?

Maaf!


Masih Ada Bagian Yang Belum Di-isi.
Silahkan Balik Ke Formulir Dan

Mengisi Bagian Yang Bertanda "*".

Terima Kasih.




(Sorry! * Required Field Must Be Filled. Please go back to Form)


Thank you.
Peace,
WS_Blue

navaldesign
05-01-2006, 07:13 AM
How can a .php script , which is simply a text file, uploaded with FTP, can end up to have anything with MS html Editor or Macromedia ?

How do you upload (or publish) your pages? And are they built in BV or else? I'm still confused on that. How can you use BV directly if you're not hosting your site with Vodahost ?

WSBlue
05-01-2006, 09:35 AM
How can a .php script , which is simply a text file, uploaded with FTP, can end up to have anything with MS html Editor or Macromedia ?

How do you upload (or publish) your pages? And are they built in BV or else? I'm still confused on that.
How can you use BV directly if you're not hosting your site with Vodahost ?

~Yes. I copied your provided scripts and pasted it in a Notepad. save as: File name: hubungikami.php and Save as type "all files" and it is in Macromedia, not in a Notepad. Shall I remove away Macromedia programme from my PC?

~ I open the file where created my site using BV. copy of all of them and paste them in httpdocs provided by local server.

<?php
// Receiving variables
@$hubnamalengkap = addslashes($_POST['hubnamalengkap']);
@$hubalamat = addslashes($_POST['hubalamat']);
@$hubtelhp = addslashes($_POST['hubtelhp']);
@$hubemail = addslashes($_POST['hubemail']);
@$hubtanyasaran = addslashes($_POST['hubtanyasaran']);
// Validation
if (strlen($hubnamalengkap) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($hubalamat) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($hubtelhp) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($hubemail) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($hubtanyasaran) == 0 )
{
header("Location: error.htm");
exit;
}
//Sending Email to form owner
$pfw_header = "From: $hubemail\n"
. "Reply-To: $hubemail\n";
$pfw_subject = "Saran & Pertanyaan";
$pfw_email_to = "beruang.biz******.com";
$pfw_message = "hubnamalengkap: $hubnamalengkap\n"
. "hubalamat: $hubalamat\n"
. "hubtelhp: $hubtelhp\n"
. "hubemail: $hubemail\n"
. "hubtanyasaran: $hubtanyasaran\n";
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: confirmation.htm");
?>

I still can't get my contact (hubungikami) page to my error page or confirmation page yet. Sorry! Any different betwen htm and html?

http://www.beruang.biz
http://www.beruang.biz/error.htm
http://www.beruang.biz/confirmation.htm

Thank you. Regards, WS Blue

navaldesign
05-01-2006, 11:37 AM
You are using BV to create your site. Then since BVwill not publish in your site (because it is not Vodahost) you save the preview page in your computer, then copy the code and paste it in your server. First: this way the dynamic features of BVwill not work, second, it creates conflicts. Anyway, the php script is intended to be uploaded using FTP, not copying and pasting.

WSBlue
05-02-2006, 06:51 PM
You are using BV to create your site. Then since BVwill not publish in your site (because it is not Vodahost) you save the preview page in your computer, then copy the code and paste it in your server. First: this way the dynamic features of BVwill not work, second, it creates conflicts. Anyway, the php script is intended to be uploaded using FTP, not copying and pasting.

Then, Please tell me what I should do?
MUST I create an account with Vodahost in order to make it work?
But I did it earlier using generic script provided by BV. I copied and pasted and it worked.
I could send my form to my own e mail, but my own email address didn't show up as a sender.
Please advise!
Thank you
WSBlue

WSBlue
05-03-2006, 05:12 PM
Then, Please tell me what I should do?
MUST I create an account with Vodahost in order to make it work?
But I did it earlier using generic script provided by BV. I copied and pasted and it worked.
I could send my form to my own e mail, but my own email address didn't show up as a sender.
Please advise!
Thank you
WSBlue
.................................................. .................................................. ....

navaldesign
05-03-2006, 06:03 PM
I want to be honest with you: the php script will work, if properly set up, either way. But, since you are creating your pages with BV, you will see that ALL of the dynamic features of BV will NOT work on any other server. You won't have rollovers, Galleries, Dropdown menus, mouseover effects an so on. So, if you really want to have a nice site (most important for people like you who count on it for their job) i would suggest you to get yourself a Vopdahost account. As you can see, we also provide Graet Support.

WSBlue
05-03-2006, 06:47 PM
I want to be honest with you: the php script will work, if properly set up, either way. But, since you are creating your pages with BV, you will see that ALL of the dynamic features of BV will NOT work on any other server. You won't have rollovers, Galleries, Dropdown menus, mouseover effects an so on. So, if you really want to have a nice site (most important for people like you who count on it for their job) i would suggest you to get yourself a Vopdahost account. As you can see, we also provide Graet Support.


I thought, I tried it out with my local server here as I can call and ask questions with them before I transfer my account to Voda cause I am afraid I can get my site publish properly like as I wish.
I will consider about your suggestion .
Your future help and support will be higly aprreciated after I transfer my account with Voda. OK?
Please let me learn, how to do account transfer first, create e mail address and redirect and affiliate programme and others.
Thanks
WS_bLUE

WSBlue
05-05-2006, 07:45 PM
Hi WSBlue, your http://www.beruang.biz/formulir.htm needs some corrections. Rename the second upload field. It has the same name as the first one. Also correct the tahunpembuatan] field. Take the ] off. Republish and let me know.

http://www.beruang.biz
Hi! Naval
Thanks for script which you provided earlier for my ("Contact Us".)
http://www.beruang.biz/hubungikami.htm (Contact Us)

Now,
I try to do this ("Form") on my own by trying to follow what you provided for ("Contact Us".)
http://www.beruang.biz/formulir.htm (Form)
but failed. Could you, please take a look of what I did.
<?php
// Receiving variables
@$agtnamalengkap = addslashes($_POST['agtnamalengkap']);
@$agtktpnomor = addslashes($_POST['agtktpnomor']);
@$agtktpdikeluarkan = addslashes($_POST['agtktpdikeluarkan']);
@$agtktpberlaku = addslashes($_POST['agtktpberlaku']);
@$agttanggallahir = addslashes($_POST['agttanggallahir']);
@$agtbulanlahir = addslashes($_POST['agtbulanlahir']);
@$agttahunlahir = addslashes($_POST['agttahunlahir']);
@$agtalamatjalan = addslashes($_POST['agtalamatjalan']);
@$agtalamatkota = addslashes($_POST['agtalamatkota']);
@$agtalamatpropinsi = addslashes($_POST['agtalamatpropinsi']);
@$agtalamatkodepos = addslashes($_POST['agtalamatkodepos']);
@$agttelhp = addslashes($_POST['agttelhp']);
@$agtemail = addslashes($_POST['agtemail']);
@$agtsimnomor = addslashes($_POST['agtsimnomor']);
@$agtsimjenis = addslashes($_POST['agtsimjenis']);
@$agtsimdikeluarkan = addslashes($_POST['agtsimdikeluarkan']);
@$agtsimberlaku = addslashes($_POST['agtsimberlaku']);
@$kerjanamaperusahaan = addslashes($_POST['kerjanamperusahaan']);
@$kerjajenisusaha = addslashes($_POST['kerjajenisusaha']);
@$kerjaalamatjalan = addslashes($_POST['kerjaalamatjalan']);
@$kerjaalamatkota = addslashes($_POST['kerjaalamatkota']);
@$kerjaalamatpropinsi = addslashes($_POST['kerjaalamatpropinsi']);
@$kerjaalamatkodepos = addslashes($_POST['kerjaalamatkodepos']);
@$kerjatel = addslashes($_POST['kerjatel']);
@$kenmerktype = addslashes($_POST['kenmerktype']);
@$kenjenismodel = addslashes($_POST['kenjenismodel']);
@$kentahunpembuatan = addslashes($_POST['kentahunpembuatan']);
@$kenkondisimesin = addslashes($_POST['kenkondisimesin']);
@$kenkondisibody = addslashes($_POST['kenkondisibody']);
@$kenalamatjalan = addslashes($_POST['kenalamatjalan']);
@$kenalamatkota = addslashes($_POST['kenalamatkota']);
@$kenalamatpropinsi = addslashes($_POST['kenalamatpropinsi']);
@$kenalamatkodepos = addslashes($_POST['kenalamatkodepos']);
@$kentelpemilikken = addslashes($_POST['kentelpemilikken']);
@$kenkmperbulan = addslashes($_POST['kenkmperbulan']);
@$kenkeperluanken = addslashes($_POST['kenkeperluanken']);
@$kenjalandilalui = addslashes($_POST['kenjalandilalui']);
@$kenluarkota = addslashes($_POST['kenluarkota']);
@$kenkotatujuan = addslashes($_POST['kenkotatujuan']);
// Validation
if (strlen($agtnamalengkap) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agtktpnomor) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agtktpdikeluarkan) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agtktpberlaku) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agttanggallahir) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agtbulanlahir) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agttahunlahir) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agtalamatjalan) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agtalamatkota) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agtalamatpropinsi) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agttelhp) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agtemail) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agtsimnomor) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agtsimjenis) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($simdikeluarkan) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($simberlaku) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kerjanamaperusahaan) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($jenisusaha) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kerjaalamatjalan) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kerjaalamatkota) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kerjaalamatpropinsi) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kerjatel) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kenmerktype) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kenjenismodel) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kentahunpembuatan) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kenkondisimesin) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kenkondisibody) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kenkmperbulan) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kenkeperluanken) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kenjalandilalui) == 0 )
{
header("Location: error.htm");
exit;
}
//Sending Email to form owner
$pfw_header = "From: $agtemail\n"
. "Reply-To: $agtemail\n";
$pfw_subject = "Formulir Anggota";
$pfw_email_to = "neocon2000******.com";
$pfw_message = "agtnamalengkap: $agtnamalengkap\n"
."agtktpnomor: $agtktpnomor\n"
."agtktpdikeluarkan: $agtktpdikeluarkan\n"
."agtktpberlaku: $agtktpberlaku\n"
."agttanggallahir: $agttanggallahir\n"
."agtbulanlahir: $agtbulanlahir\n"
."agttahunlahir: $agttahunlahir\n"
."agtalamatjalan: $agtalamatjalan\n"
."agtalamatkota: $agtalamatkota\n"
."agtalamatpropinsi: $agtalamatpropinsi\n"
."agtalamatkodepos: $agtalamatkodepos\n"
."agttelhp: $agttelhp\n"
."agtemail: $agtemail\n"
."agtsimnomor: $agtsimnomor\n"
."agtsimjenis: $agtsimjenis\n"
."agtsimdikeluarkan: $agtsimdikeluarkan\n"
."agtsimberlaku: $agtsimberlaku\n"
."kerjanamaperusahaan: $kerjanamperusahaan\n"
."kerjajenisusaha: $kerjajenisusaha\n"
."kerjaalamatjalan: $kerjaalamatjalan\n"
."kerjaalamatkota: $kerjaalamatkota\n"
."kerjaalamatpropinsi: $kerjaalamatpropinsi\n"
."kerjaalamatkodepos: $kerjaalamatkodepos\n"
."kerjatel: $kerjatel\n"
."kenmerktype: $kenmerktype\n"
."kenjenismodel: $kenjenismodel\n"
."kentahunpembuatan: $kentahunpembuatan\n"
."kenkondisimesin: $kenkondisimesin\n"
."kenkondisibody: $kenkondisibody\n"
."kenalamatjalan: $kenalamatjalan\n"
."kenalamatkota: $kenalamatkota\n"
."kenalamatpropinsi: $kenalamatpropinsi\n"
."kenalamatkodepos: $kenalamatkodepos\n"
."kentelpemilikken: $kentelpemilikken\n"
."kenkmperbulan: $kenkmperbulan\n"
."kenkeperluanken: $kenkeperluanken\n"
."kenjalandilalui: $kenjalandilalui\n"
."kenluarkota: $kenluarkota\n"
."kenkotatujuan: $kenkotatujuan\n"
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: confirmation.htm");
?>

BUT It can't take me to confirmation or error page. Could you please, provide a correct scripts for me, please?

And beside that, in this form of mine, I also ask for photo to be upload. How can I limit the size and the photos are A MUST in order to complete the form?

Thousand thanks for your valuable time.

Regards,
WS_Blue

navaldesign
05-06-2006, 06:42 AM
There are some errors in your script. Nothing important. Most have to do with missing something simple as ";". But, you have made practically ALL fields required, and you have no code for the upload fields.
The max size fot the file to be uploaded is set in this, missing code. Ok, i&#236;ll prepare a script for you later.

I think you should consider becoming Vodahost Client

WSBlue
05-07-2006, 05:46 AM
There are some errors in your script. Nothing important. Most have to do with missing something simple as ";". But, you have made practically ALL fields required, and you have no code for the upload fields.
The max size fot the file to be uploaded is set in this, missing code. Ok, ižll prepare a script for you later.

I think you should consider becoming Vodahost Client

YES. FOR SURE, I WILL.
I have couple more of webs I want to do. Thinking of domain names.
Must I register several accounts for each different domains?

In my http://www.beruang.biz
I have two different kinds of Forms. Do I need to create two error and two confirmation page as right now only has one for each?
And also, How do I get RIGHT value for the FORM being submitted. Phone number must be in Numbers and not in alphabet. e mail address must be an e mail address, at least contain this sign "@"; not something else. or else it will go to error page. The photo also will be sent to error page it uploaded larger than maximum size.

Thank you again for your precious time to prepare me this second scripts. Best Regards,
WS_Blue

navaldesign
05-07-2006, 06:39 AM
All of these error types can be checked by the script i will prepare for you.

You can purchase as many accounts as you want. Also, if all of the sites that you will add are yours, you can only purchase one account, and host them in the same account. Unlesss you are going to use many databases like forums, galleries, blogs etc. for all of them, in which case you could have bandwidth and server resources problems. in that case it is advisable that you get separate accounts for each domain.

WSBlue
05-07-2006, 04:36 PM
All of these error types can be checked by the script i will prepare for you.

You can purchase as many accounts as you want. Also, if all of the sites that you will add are yours, you can only purchase one account, and host them in the same account. Unlesss you are going to use many databases like forums, galleries, blogs etc. for all of them, in which case you could have bandwidth and server resources problems. in that case it is advisable that you get separate accounts for each domain.

Hi! Major Naval,
I can't have only one account for several different domain, Can I ?
Different domain names must have seperate different account, Right?
and I can't use same domain name because all of the business are not related to one another. Please advise. Thank you. Regards, WS_Blue
Sorry! What is Meta Tags for?

navaldesign
05-07-2006, 09:27 PM
If the domains are yours, which means that you reasult as the Technical AND Amministrative responsible, you can have more domains in the same account. One is the main domain, the others are addon domains, by all means independent from the main.

Meta tags: For page title, description, keywords, author, generator, etc.

WSBlue
05-08-2006, 06:22 AM
If the domains are yours, which means that you reasult as the Technical AND Amministrative responsible, you can have more domains in the same account. One is the main domain, the others are addon domains, by all means independent from the main.

Meta tags: For page title, description, keywords, author, generator, etc.

Hi! Major General,
Understood. Thank you.
When can I have the second script which you want to provide as I am still waiting for it.
Really appreaciate all your valuable time provided.
Good day.
WS_Blue

WSBlue
05-09-2006, 05:13 PM
Hi! Major General,
Understood. Thank you.
When can I have the second script which you want to provide as I am still waiting for it.
Really appreaciate all your valuable time provided.
Good day.
WS_Blue
Hi! Naval Major General,Where have you been? Didn't see you around?I am still waiting for your help to correct my second scripts.
http://www.beruang.biz/formulir.htm
Take care, Man.WS_Blue

WSBlue
05-09-2006, 05:36 PM
Hi! Major General,
Understood. Thank you.
When can I have the second script which you want to provide as I am still waiting for it.
Really appreaciate all your valuable time provided.
Good day.
WS_Blue
Hi! Naval Major General,Where have you been? Didn't see you around?I am still waiting for your help to correct for my second scripts. Take care, Man.WS_Blue

navaldesign
05-09-2006, 05:41 PM
I know, just had lots to do and your script is QUITE complicated. I'll play with it tomorrow morning. Sorry.

WSBlue
05-09-2006, 05:57 PM
I know, just had lots to do and your script is QUITE complicated. I'll play with it tomorrow morning. Sorry.

No problem! Major General,
I was just worried about where had you been. :)
Do you think, I had learnt something from you about the second scripts that I wrote myself, even there's still some mistake?
Everything has to be learnt, even about transfering account to Vodahost.
Regards,
WS_Blue

WSBlue
05-11-2006, 11:39 AM
I know, just had lots to do and your script is QUITE complicated. I'll play with it tomorrow morning. Sorry.

Hi! Naval,
How are you? Sorry to bother you again.
If you're too busy to do below scripts for me, could you PLEASE tell me, the mistake that I made, so I can try to correct them myself.
http://www.beruang.biz/formulir.htm (Form)

And also script about, How to limit sizes of photos and make it A MUST in order to complete the form otherwise will go to error page.
Thank you so much for all the help.
WS_Blue
.................................................. .................................................
<?php
// Receiving variables
@$agtnamalengkap = addslashes($_POST['agtnamalengkap']);
@$agtktpnomor = addslashes($_POST['agtktpnomor']);
@$agtktpdikeluarkan = addslashes($_POST['agtktpdikeluarkan']);
@$agtktpberlaku = addslashes($_POST['agtktpberlaku']);
@$agttanggallahir = addslashes($_POST['agttanggallahir']);
@$agtbulanlahir = addslashes($_POST['agtbulanlahir']);
@$agttahunlahir = addslashes($_POST['agttahunlahir']);
@$agtalamatjalan = addslashes($_POST['agtalamatjalan']);
@$agtalamatkota = addslashes($_POST['agtalamatkota']);
@$agtalamatpropinsi = addslashes($_POST['agtalamatpropinsi']);
@$agtalamatkodepos = addslashes($_POST['agtalamatkodepos']);
@$agttelhp = addslashes($_POST['agttelhp']);
@$agtemail = addslashes($_POST['agtemail']);
@$agtsimnomor = addslashes($_POST['agtsimnomor']);
@$agtsimjenis = addslashes($_POST['agtsimjenis']);
@$agtsimdikeluarkan = addslashes($_POST['agtsimdikeluarkan']);
@$agtsimberlaku = addslashes($_POST['agtsimberlaku']);
@$kerjanamaperusahaan = addslashes($_POST['kerjanamperusahaan']);
@$kerjajenisusaha = addslashes($_POST['kerjajenisusaha']);
@$kerjaalamatjalan = addslashes($_POST['kerjaalamatjalan']);
@$kerjaalamatkota = addslashes($_POST['kerjaalamatkota']);
@$kerjaalamatpropinsi = addslashes($_POST['kerjaalamatpropinsi']);
@$kerjaalamatkodepos = addslashes($_POST['kerjaalamatkodepos']);
@$kerjatel = addslashes($_POST['kerjatel']);
@$kenmerktype = addslashes($_POST['kenmerktype']);
@$kenjenismodel = addslashes($_POST['kenjenismodel']);
@$kentahunpembuatan = addslashes($_POST['kentahunpembuatan']);
@$kenkondisimesin = addslashes($_POST['kenkondisimesin']);
@$kenkondisibody = addslashes($_POST['kenkondisibody']);
@$kenalamatjalan = addslashes($_POST['kenalamatjalan']);
@$kenalamatkota = addslashes($_POST['kenalamatkota']);
@$kenalamatpropinsi = addslashes($_POST['kenalamatpropinsi']);
@$kenalamatkodepos = addslashes($_POST['kenalamatkodepos']);
@$kentelpemilikken = addslashes($_POST['kentelpemilikken']);
@$kenkmperbulan = addslashes($_POST['kenkmperbulan']);
@$kenkeperluanken = addslashes($_POST['kenkeperluanken']);
@$kenjalandilalui = addslashes($_POST['kenjalandilalui']);
@$kenluarkota = addslashes($_POST['kenluarkota']);
@$kenkotatujuan = addslashes($_POST['kenkotatujuan']);
// Validation
if (strlen($agtnamalengkap) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agtktpnomor) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agtktpdikeluarkan) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agtktpberlaku) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agttanggallahir) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agtbulanlahir) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agttahunlahir) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agtalamatjalan) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agtalamatkota) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agtalamatpropinsi) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agttelhp) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agtemail) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agtsimnomor) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($agtsimjenis) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($simdikeluarkan) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($simberlaku) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kerjanamaperusahaan) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($jenisusaha) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kerjaalamatjalan) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kerjaalamatkota) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kerjaalamatpropinsi) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kerjatel) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kenmerktype) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kenjenismodel) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kentahunpembuatan) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kenkondisimesin) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kenkondisibody) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kenkmperbulan) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kenkeperluanken) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($kenjalandilalui) == 0 )
{
header("Location: error.htm");
exit;
}
//Sending Email to form owner
$pfw_header = "From: $agtemail\n"
. "Reply-To: $agtemail\n";
$pfw_subject = "Formulir Anggota";
$pfw_email_to = "neocon2000******.com";
$pfw_message = "agtnamalengkap: $agtnamalengkap\n"
."agtktpnomor: $agtktpnomor\n"
."agtktpdikeluarkan: $agtktpdikeluarkan\n"
."agtktpberlaku: $agtktpberlaku\n"
."agttanggallahir: $agttanggallahir\n"
."agtbulanlahir: $agtbulanlahir\n"
."agttahunlahir: $agttahunlahir\n"
."agtalamatjalan: $agtalamatjalan\n"
."agtalamatkota: $agtalamatkota\n"
."agtalamatpropinsi: $agtalamatpropinsi\n"
."agtalamatkodepos: $agtalamatkodepos\n"
."agttelhp: $agttelhp\n"
."agtemail: $agtemail\n"
."agtsimnomor: $agtsimnomor\n"
."agtsimjenis: $agtsimjenis\n"
."agtsimdikeluarkan: $agtsimdikeluarkan\n"
."agtsimberlaku: $agtsimberlaku\n"
."kerjanamaperusahaan: $kerjanamperusahaan\n"
."kerjajenisusaha: $kerjajenisusaha\n"
."kerjaalamatjalan: $kerjaalamatjalan\n"
."kerjaalamatkota: $kerjaalamatkota\n"
."kerjaalamatpropinsi: $kerjaalamatpropinsi\n"
."kerjaalamatkodepos: $kerjaalamatkodepos\n"
."kerjatel: $kerjatel\n"
."kenmerktype: $kenmerktype\n"
."kenjenismodel: $kenjenismodel\n"
."kentahunpembuatan: $kentahunpembuatan\n"
."kenkondisimesin: $kenkondisimesin\n"
."kenkondisibody: $kenkondisibody\n"
."kenalamatjalan: $kenalamatjalan\n"
."kenalamatkota: $kenalamatkota\n"
."kenalamatpropinsi: $kenalamatpropinsi\n"
."kenalamatkodepos: $kenalamatkodepos\n"
."kentelpemilikken: $kentelpemilikken\n"
."kenkmperbulan: $kenkmperbulan\n"
."kenkeperluanken: $kenkeperluanken\n"
."kenjalandilalui: $kenjalandilalui\n"
."kenluarkota: $kenluarkota\n"
."kenkotatujuan: $kenkotatujuan\n"
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: confirmation.htm");
?>

navaldesign
05-11-2006, 07:30 PM
Here is your script:

<?php
// Receiving variables
@$agtnamalengkap = addslashes($_POST['agtnamalengkap']);
@$agtktpnomor = addslashes($_POST['agtktpnomor']);
@$agtktpdikeluarkan = addslashes($_POST['agtktpdikeluarkan']);
@$agtktpberlaku = addslashes($_POST['agtktpberlaku']);
@$agttanggallahir = addslashes($_POST['agttanggallahir']);
@$agtbulanlahir = addslashes($_POST['agtbulanlahir']);
@$agttahunlahir = addslashes($_POST['agttahunlahir']);
@$agtalamatjalan = addslashes($_POST['agtalamatjalan']);
@$agtalamatkota = addslashes($_POST['agtalamatkota']);
@$agtalamatpropinsi = addslashes($_POST['agtalamatpropinsi']);
@$agtalamatkodepos = addslashes($_POST['agtalamatkodepos']);
@$agttelhp = addslashes($_POST['agttelhp']);
@$agtemail = addslashes($_POST['agtemail']);
@$agtsimnomor = addslashes($_POST['agtsimnomor']);
@$agtsimjenis = addslashes($_POST['agtsimjenis']);
@$agtsimdikeluarkan = addslashes($_POST['agtsimdikeluarkan']);
@$agtsimberlaku = addslashes($_POST['agtsimberlaku']);
@$kerjanamaperusahaan = addslashes($_POST['kerjanamaperusahaan']);
@$kerjajenisusaha = addslashes($_POST['kerjajenisusaha']);
@$kerjajenispekerjaan = addslashes($_POST['kerjajenispekerjaan']);
@$kerjalamabekerja = addslashes($_POST['kerjalamabekerja']);
@$kerjalamatjalan = addslashes($_POST['kerjalamatjalan']);
@$kerjaalamatkota = addslashes($_POST['kerjaalamatkota']);
@$kerjaalamatpropinsi = addslashes($_POST['kerjaalamatpropinsi']);
@$kerjaalamatkodepos = addslashes($_POST['kerjaalamatkodepos']);
@$kerjatel = addslashes($_POST['kerjatel']);
@$kenmerktype = addslashes($_POST['kenmerktype']);
@$kenjenismodel = addslashes($_POST['kenjenismodel']);
@$kentahunpembuatan = addslashes($_POST['kentahunpembuatan']);
@$kenkondisimesin = addslashes($_POST['kenkondisimesin']);
@$kenalamatjalan = addslashes($_POST['kenalamatjalan']);
@$kenalamatkota = addslashes($_POST['kenalamatkota']);
@$kenalamatpropinsi = addslashes($_POST['kenalamatpropinsi']);
@$kenalamatkodepos = addslashes($_POST['kenalamatkodepos']);
@$kentelpemilikken = addslashes($_POST['kentelpemilikken']);
@$kenkmperbulan = addslashes($_POST['kenkmperbulan']);
@$kenkeperluanken = addslashes($_POST['kenkeperluanken']);
@$kenjalandilalui = addslashes($_POST['kenjalandilalui']);
@$kenluarkota = addslashes($_POST['kenluarkota']);
@$kenkotatujuan = addslashes($_POST['kenkotatujuan']);
@$fotomobil_Name = $_FILES['fotomobil']['name'];
@$fotomobil_Size = $_FILES['fotomobil']['size'];
@$fotomobil_Temp = $_FILES['fotomobil']['tmp_name'];
@$fotomobil_Mime_Type = $_FILES['fotomobil']['type'];
@$fotomobil1_Name = $_FILES['fotomobil1']['name'];
@$fotomobil1_Size = $_FILES['fotomobil1']['size'];
@$fotomobil1_Temp = $_FILES['fotomobil1']['tmp_name'];
@$fotomobil1_Mime_Type = $_FILES['fotomobil1']['type'];
function RecursiveMkdir($path)
{
if (!file_exists($path))
{
RecursiveMkdir(dirname($path));
mkdir($path, 0777);
}
}
// Validation
if (strlen($agtnamalengkap) == 0 )
{
header("Location: errorpage.html");
exit;
}
if (strlen($agtktpnomor) == 0 )
{
header("Location: errorpage.html");
exit;
}
if (strlen($agttanggallahir) == 0 )
{
header("Location: errorpage.html");
exit;
}
if (strlen($agtbulanlahir) == 0 )
{
header("Location: errorpage.html");
exit;
}
if (strlen($agttahunlahir) == 0 )
{
header("Location: errorpage.html");
exit;
}
if (strlen($agttelhp) == 0 )
{
header("Location: errorpage.html");
exit;
}
if (strlen($agtemail) == 0 )
{
header("Location: errorpage.html");
exit;
}
if (strlen($agtsimnomor) == 0 )
{
header("Location: errorpage.html");
exit;
}
if (strlen($kenmerktype) == 0 )
{
header("Location: errorpage.html");
exit;
}
if (strlen($kentahunpembuatan) == 0 )
{
header("Location: errorpage.html");
exit;
}
if (strlen($fotomobil) == 0 )
{
header("Location: errorpage.html");
exit;
}
if( $fotomobil_Size == 0)
{
header("Location: errorpage.html");
exit;
}
if (strlen($fotomobil) == 0 )
{
header("Location: errorpage.html");
exit;
}
if( $fotomobil_Size >10000)
{
//delete file
unlink($fotomobil_Temp);
header("Location: errorpage.html");
exit;
}
$uploadFile = "upload/".$fotomobil_Name ;
if (!is_dir(dirname($uploadFile)))
{
@RecursiveMkdir(dirname($uploadFile));
}
else
{
@chmod(dirname($uploadFile), 0777);
}
@move_uploaded_file( $fotomobil_Temp , $uploadFile);
chmod($uploadFile, 0644);
$fotomobil_URL = "http://www.beruang.biz/upload/".$fotomobil_Name ;

if (strlen($fotomobil1) == 0 )
{
header("Location: errorpage.html");
exit;
}
if( $fotomobil1_Size == 0)
{
header("Location: errorpage.html");
exit;
}
if( $fotomobil1_Size >10000)
{
//delete file
unlink($fotomobil1_Temp);
header("Location: errorpage.html");
exit;
}
$uploadFile = "upload/".$fotomobil1_Name ;
if (!is_dir(dirname($uploadFile)))
{
@RecursiveMkdir(dirname($uploadFile));
}
else
{
@chmod(dirname($uploadFile), 0777);
}
@move_uploaded_file( $fotomobil1_Temp , $uploadFile);
chmod($uploadFile, 0644);
$fotomobil1_URL = "http://www.beruang.biz/upload/".$fotomobil1_Name ;
//Sending Email to form owner
$pfw_header = "From: $agtemail\n"
. "Reply-To: $agtemail\n";
$pfw_subject = "Put your subject here";
$pfw_email_to = "youremail@yourdomain.com";
$pfw_message = "agtnamalengkap: $agtnamalengkap\n"
. "agtktpnomor: $agtktpnomor\n"
. "agtktpdikeluarkan: $agtktpdikeluarkan\n"
. "agtktpberlaku: $agtktpberlaku\n"
. "agttanggallahir: $agttanggallahir\n"
. "agtbulanlahir: $agtbulanlahir\n"
. "agttahunlahir: $agttahunlahir\n"
. "agtalamatjalan: $agtalamatjalan\n"
. "agtalamatkota: $agtalamatkota\n"
. "agtalamatpropinsi: $agtalamatpropinsi\n"
. "agtalamatkodepos: $agtalamatkodepos\n"
. "agttelhp: $agttelhp\n"
. "agtemail: $agtemail\n"
. "agtsimnomor: $agtsimnomor\n"
. "agtsimjenis: $agtsimjenis\n"
. "agtsimdikeluarkan: $agtsimdikeluarkan\n"
. "agtsimberlaku: $agtsimberlaku\n"
. "kerjanamaperusahaan: $kerjanamaperusahaan\n"
. "kerjajenisusaha: $kerjajenisusaha\n"
. "kerjajenispekerjaan: $kerjajenispekerjaan\n"
. "kerjalamabekerja: $kerjalamabekerja\n"
. "kerjalamatjalan: $kerjalamatjalan\n"
. "kerjaalamatkota: $kerjaalamatkota\n"
. "kerjaalamatpropinsi: $kerjaalamatpropinsi\n"
. "kerjaalamatkodepos: $kerjaalamatkodepos\n"
. "kerjatel: $kerjatel\n"
. "kenmerktype: $kenmerktype\n"
. "kenjenismodel: $kenjenismodel\n"
. "kentahunpembuatan: $kentahunpembuatan\n"
. "kenkondisimesin: $kenkondisimesin\n"
. "kenalamatjalan: $kenalamatjalan\n"
. "kenalamatkota: $kenalamatkota\n"
. "kenalamatpropinsi: $kenalamatpropinsi\n"
. "kenalamatkodepos: $kenalamatkodepos\n"
. "kentelpemilikken: $kentelpemilikken\n"
. "kenkmperbulan: $kenkmperbulan\n"
. "kenkeperluanken: $kenkeperluanken\n"
. "kenjalandilalui: $kenjalandilalui\n"
. "kenluarkota: $kenluarkota\n"
. "kenkotatujuan: $kenkotatujuan\n"
. "fotomobil: $fotomobil_URL\n";
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: thankyoupage.html");
?>


Copy the code, paste it in Notepad, change the email address and the subject, and put (if you want) separate errorpages for each kind of error. Create also a "thankyoupage". Goto to "Save as", choose file type "All files", save it with the name "formulir.php" and upload it on your site using FTP. Using FTP create a new folder in your "public_html" folder, called "upload", change it's properties to 777.
Now, in your form, change the name of the second upload field in "fotomobil1" and also set the encoding type in "multipart / form data" Save it and re-publish it.

Please note that i have ONLY made required the fields with the asterisc on your form, not ALL of them as you did above

WSBlue
05-13-2006, 06:10 PM
Thank you so much really. Really appreacite for your BIG help. Looks very loooong and complicated. I will print it out to compare with mine, to see what I did wrong with mine.
I will let you know the result with the script that you provided.
Thanks again.
Happy World Peace Day.
13 May 2006.
WS_bLue

nothingnew
05-16-2006, 04:06 AM
WsBlue,

In looking at the code for the "form" page - your action is left empty and you have encode type= text/plain and it should be blank.

Your second form page "contact us" you have it set properly - which is action=hubung.php and the encode type is left blank.

As to the error page- have you set up the php code to validate fields?

As to the basic set up of a php mail to form- I can only suggest that you take a look at these instructions and try to follow them exactly. This will get you to a basic mail to WITHOUT field validation and error reporting.

If you have already looked at these instructions- perhaps going over it one more time might help.

http://netisopen.com/computer/TF001/T001.html

Once you get that basic mail to working- we can tackle the validation of fields.

Cheers

Andy Using your link above I accidently pasted the script into the Start Page tab in the Page HTML instead of the Inside Body Tag tab. Preview in browser doesn't allow me to input name and email. Dale

navaldesign
05-16-2006, 06:11 AM
What Andy has put in his tutorial is how to insert the script in your php page, not in the form page. And also, as you already saw, the script has to be pasted in the Inside body Tag, of the "Thankyou" or "Confirmation" page. Delete it from your form page, create the thankyou page as per Andy's instructions and tutorial and everything will work

WSBlue
05-22-2006, 07:45 PM
[quote=navaldesign]Here is your script:

<?php
// Receiving variables
@$agtnamalengkap = addslashes($_POST['agtnamalengkap']);
@$agtktpnomor = addslashes($_POST['agtktpnomor']);
@$agtktpdikeluarkan = addslashes($_POST['agtktpdikeluarkan']);
@$agtktpberlaku = addslashes($_POST['agtktpberlaku']);
@$agttanggallahir = addslashes($_POST['agttanggallahir']);
@$agtbulanlahir = addslashes($_POST['agtbulanlahir']);
@$agttahunlahir = addslashes($_POST['agttahunlahir']);
@$agtalamatjalan = addslashes($_POST['agtalamatjalan']);
@$agtalamatkota = addslashes($_POST['agtalamatkota']);
@$agtalamatpropinsi = addslashes($_POST['agtalamatpropinsi']);
@$agtalamatkodepos = addslashes($_POST['agtalamatkodepos']);
@$agttelhp = addslashes($_POST['agttelhp']);
@$agtemail = addslashes($_POST['agtemail']);
@$agtsimnomor = addslashes($_POST['agtsimnomor']);
@$agtsimjenis = addslashes($_POST['agtsimjenis']);
@$agtsimdikeluarkan = addslashes($_POST['agtsimdikeluarkan']);
@$agtsimberlaku = addslashes($_POST['agtsimberlaku']);
@$kerjanamaperusahaan = addslashes($_POST['kerjanamaperusahaan']);
@$kerjajenisusaha = addslashes($_POST['kerjajenisusaha']);
@$kerjajenispekerjaan = addslashes($_POST['kerjajenispekerjaan']);
@$kerjalamabekerja = addslashes($_POST['kerjalamabekerja']);
@$kerjalamatjalan = addslashes($_POST['kerjalamatjalan']);
@$kerjaalamatkota = addslashes($_POST['kerjaalamatkota']);
@$kerjaalamatpropinsi = addslashes($_POST['kerjaalamatpropinsi']);
@$kerjaalamatkodepos = addslashes($_POST['kerjaalamatkodepos']);
@$kerjatel = addslashes($_POST['kerjatel']);
@$kenmerktype = addslashes($_POST['kenmerktype']);
@$kenjenismodel = addslashes($_POST['kenjenismodel']);
@$kentahunpembuatan = addslashes($_POST['kentahunpembuatan']);
@$kenkondisimesin = addslashes($_POST['kenkondisimesin']);
@$kenalamatjalan = addslashes($_POST['kenalamatjalan']);
@$kenalamatkota = addslashes($_POST['kenalamatkota']);
@$kenalamatpropinsi = addslashes($_POST['kenalamatpropinsi']);
@$kenalamatkodepos = addslashes($_POST['kenalamatkodepos']);
@$kentelpemilikken = addslashes($_POST['kentelpemilikken']);
@$kenkmperbulan = addslashes($_POST['kenkmperbulan']);
@$kenkeperluanken = addslashes($_POST['kenkeperluanken']);
@$kenjalandilalui = addslashes($_POST['kenjalandilalui']);
@$kenluarkota = addslashes($_POST['kenluarkota']);
@$kenkotatujuan = addslashes($_POST['kenkotatujuan']);
@$fotomobil_Name = $_FILES['fotomobil']['name'];
@$fotomobil_Size = $_FILES['fotomobil']['size'];
@$fotomobil_Temp = $_FILES['fotomobil']['tmp_name'];
@$fotomobil_Mime_Type = $_FILES['fotomobil']['type'];
@$fotomobil1_Name = $_FILES['fotomobil1']['name'];
@$fotomobil1_Size = $_FILES['fotomobil1']['size'];
@$fotomobil1_Temp = $_FILES['fotomobil1']['tmp_name'];
@$fotomobil1_Mime_Type = $_FILES['fotomobil1']['type'];
function RecursiveMkdir($path)
{
if (!file_exists($path))
{
RecursiveMkdir(dirname($path));
mkdir($path, 0777);
}
}
// Validation
if (strlen($agtnamalengkap) == 0 )
{
header("Location: errorpage.html");
exit;
}
if (strlen($agtktpnomor) == 0 )
{
header("Location: errorpage.html");
exit;
}
if (strlen($agttanggallahir) == 0 )
{
header("Location: errorpage.html");
exit;
}
if (strlen($agtbulanlahir) == 0 )
{
header("Location: errorpage.html");
exit;
}
if (strlen($agttahunlahir) == 0 )
{
header("Location: errorpage.html");
exit;
}
if (strlen($agttelhp) == 0 )
{
header("Location: errorpage.html");
exit;
}
if (strlen($agtemail) == 0 )
{
header("Location: errorpage.html");
exit;
}
if (strlen($agtsimnomor) == 0 )
{
header("Location: errorpage.html");
exit;
}
if (strlen($kenmerktype) == 0 )
{
header("Location: errorpage.html");
exit;
}
if (strlen($kentahunpembuatan) == 0 )
{
header("Location: errorpage.html");
exit;
}
if (strlen($fotomobil) == 0 )
{
header("Location: errorpage.html");
exit;
}
if( $fotomobil_Size == 0)
{
header("Location: errorpage.html");
exit;
}
if (strlen($fotomobil) == 0 )
{
header("Location: errorpage.html");
exit;
}
if( $fotomobil_Size >10000)
{
//delete file
unlink($fotomobil_Temp);
header("Location: errorpage.html");
exit;
}
$uploadFile = "upload/".$fotomobil_Name ;
if (!is_dir(dirname($uploadFile)))
{
@RecursiveMkdir(dirname($uploadFile));
}
else
{
@chmod(dirname($uploadFile), 0777);
}
@move_uploaded_file( $fotomobil_Temp , $uploadFile);
chmod($uploadFile, 0644);
$fotomobil_URL = "http://www.beruang.biz/upload/".$fotomobil_Name ;

if (strlen($fotomobil1) == 0 )
{
header("Location: errorpage.html");
exit;
}
if( $fotomobil1_Size == 0)
{
header("Location: errorpage.html");
exit;
}
if( $fotomobil1_Size >10000)
{
//delete file
unlink($fotomobil1_Temp);
header("Location: errorpage.html");
exit;
}
$uploadFile = "upload/".$fotomobil1_Name ;
if (!is_dir(dirname($uploadFile)))
{
@RecursiveMkdir(dirname($uploadFile));
}
else
{
@chmod(dirname($uploadFile), 0777);
}
@move_uploaded_file( $fotomobil1_Temp , $uploadFile);
chmod($uploadFile, 0644);
$fotomobil1_URL = "http://www.beruang.biz/upload/".$fotomobil1_Name ;
//Sending Email to form owner
$pfw_header = "From: $agtemail\n"
. "Reply-To: $agtemail\n";
$pfw_subject = "Put your subject here";
$pfw_email_to = "youremail@yourdomain.com";
$pfw_message = "agtnamalengkap: $agtnamalengkap\n"
. "agtktpnomor: $agtktpnomor\n"
. "agtktpdikeluarkan: $agtktpdikeluarkan\n"
. "agtktpberlaku: $agtktpberlaku\n"
. "agttanggallahir: $agttanggallahir\n"
. "agtbulanlahir: $agtbulanlahir\n"
. "agttahunlahir: $agttahunlahir\n"
. "agtalamatjalan: $agtalamatjalan\n"
. "agtalamatkota: $agtalamatkota\n"
. "agtalamatpropinsi: $agtalamatpropinsi\n"
. "agtalamatkodepos: $agtalamatkodepos\n"
. "agttelhp: $agttelhp\n"
. "agtemail: $agtemail\n"
. "agtsimnomor: $agtsimnomor\n"
. "agtsimjenis: $agtsimjenis\n"
. "agtsimdikeluarkan: $agtsimdikeluarkan\n"
. "agtsimberlaku: $agtsimberlaku\n"
. "kerjanamaperusahaan: $kerjanamaperusahaan\n"
. "kerjajenisusaha: $kerjajenisusaha\n"
. "kerjajenispekerjaan: $kerjajenispekerjaan\n"
. "kerjalamabekerja: $kerjalamabekerja\n"
. "kerjalamatjalan: $kerjalamatjalan\n"
. "kerjaalamatkota: $kerjaalamatkota\n"
. "kerjaalamatpropinsi: $kerjaalamatpropinsi\n"
. "kerjaalamatkodepos: $kerjaalamatkodepos\n"
. "kerjatel: $kerjatel\n"
. "kenmerktype: $kenmerktype\n"
. "kenjenismodel: $kenjenismodel\n"
. "kentahunpembuatan: $kentahunpembuatan\n"
. "kenkondisimesin: $kenkondisimesin\n"
. "kenalamatjalan: $kenalamatjalan\n"
. "kenalamatkota: $kenalamatkota\n"
. "kenalamatpropinsi: $kenalamatpropinsi\n"
. "kenalamatkodepos: $kenalamatkodepos\n"
. "kentelpemilikken: $kentelpemilikken\n"
. "kenkmperbulan: $kenkmperbulan\n"
. "kenkeperluanken: $kenkeperluanken\n"
. "kenjalandilalui: $kenjalandilalui\n"
. "kenluarkota: $kenluarkota\n"
. "kenkotatujuan: $kenkotatujuan\n"
. "fotomobil: $fotomobil_URL\n";
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: thankyoupage.html");
?>

Hi! Naval,
How are you? I Just came out from woods and now trying on the valuable scripts you provided for me more than a week ago. Thank you so much.
But Very sorry to bother you again.
May I ask why I can't attach pictures from my form. I clicked at browse and browsed through pictures from my PC and attached them but failed, when I tried to send the form. (http://www.beruang.biz/formulir.htm)
Could you please take a look? Thank you.
www.beruang.biz/formulir.htm (http://www.beruang.biz/formulir.htm)
Regards,
WS_Blue

navaldesign
05-22-2006, 08:07 PM
It seems as though you have not created the "upload" folder with permissions 777. Is this correct ?

WSBlue
05-23-2006, 05:47 PM
It seems as though you have not created the "upload" folder with permissions 777. Is this correct ?

Yes, I just did to create a new folder, called "upload"
But how to change its properties to 777?

navaldesign
05-23-2006, 06:05 PM
Yes, I just did to create a new folder, called "upload"
But how to change its properties to 777?

Connect to your site with FTP. Click on the folder to select it. You usually right click and from the menu that appears you select Properties. When the Properties popup appaears, you change the properties to 777

WSBlue
05-23-2006, 06:18 PM
Connect to your site with FTP. Click on the folder to select it. You usually right click and from the menu that appears you select Properties. When the Properties popup appaears, you change the properties to 777

But I want pictures to be uploaded from PC and NOT from URL.
Just like in Users CP, where there two options to upload avatar.
One from URL and the other one from Personal Computer.
I only want it from Personal Computer.
Can you please alter the scripts for me, again? Thank you so much, Naval.
Regards,
WS_Blue

navaldesign
05-23-2006, 06:26 PM
The script is for uploading pictures from PC. But the pictures end up in your site, sio you need that "Uploads" directory, because that's where they are uploaded. Then you get an email with the form info AND the link to download the pictures to your PC

WSBlue
05-23-2006, 06:34 PM
The script is for uploading pictures from PC. But the pictures end up in your site, sio you need that "Uploads" directory, because that's where they are uploaded. Then you get an email with the form info AND the link to download the pictures to your PC

I see, I will try to follow as instructed. Thank you.
But I already created a new folder using ftp and called it "upload" and I clicked properties but I didn't see anywhere to change it to 777.
Please advise.

navaldesign
05-23-2006, 06:37 PM
I don't know what FTP you use, and even if i knew, i probably wouldn't know where to find the correct command. Try reading the FTP's instructions

WSBlue
05-23-2006, 06:53 PM
I don't know what FTP you use, and even if i knew, i probably wouldn't know where to find the correct command. Try reading the FTP's instructions

Thank you so much NAVAL. will Let you know the result. Or it will be better off for me just to tranfer my account to Voda. Good night :)

navaldesign
05-23-2006, 07:26 PM
You bet that's your best choice

WSBlue
05-24-2006, 09:36 AM
Copy the code, paste it in Notepad, change the email address and the subject, and put (if you want) separate errorpages for each kind of error. Create also a "thankyoupage". Goto to "Save as", choose file type "All files", save it with the name "formulir.php" and upload it on your site using FTP. Using FTP create a new folder in your "public_html" folder, called "upload", change it's properties to 777.
Hi, Naval,
Was told, its dangerous to use upload to upload something cause people might upload just anything . It's better to have the pictures sent to database. Is it right and How can I do that?
WS_BLUE

navaldesign
05-24-2006, 09:59 AM
Copy the code, paste it in Notepad, change the email address and the subject, and put (if you want) separate errorpages for each kind of error. Create also a "thankyoupage". Goto to "Save as", choose file type "All files", save it with the name "formulir.php" and upload it on your site using FTP. Using FTP create a new folder in your "public_html" folder, called "upload", change it's properties to 777.
Hi, Naval,
Was told, its dangerous to use upload to upload something cause people might upload just anything . It's better to have the pictures sent to database. Is it right and How can I do that?
WS_BLUE

I'd like to help, but please understand that you're not a Vodahost Customer and i can't go on with this. Creating a script for database upload, and the relevant retreive script is something far beyond the help that i can provide even for Vodahost clients, much more for a non Vodahost customer.
Sorry

WSBlue
05-25-2006, 06:05 PM
I'd like to help, but please understand that you're not a Vodahost Customer and i can't go on with this. Creating a script for database upload, and the relevant retreive script is something far beyond the help that i can provide even for Vodahost clients, much more for a non Vodahost customer.
Sorry

I am sorry! Naval. But I didn't mean to try to take a free ride.
I thought, I try it out first before I transfer to Voda.
Cheers.
WS_Blue