Jump to content

I need to create a web form


buxa

Recommended Posts

Theres millions of feedback forms already made and open source. A simple google search will have pulled up hundreds of varying complexities.

612d9da508.png

Mercifull.png

Mercifull <3 Suzi

"We don't want players to be able to buy their way to success in RuneScape. If we let players start doing this, it devalues RuneScape for others. We feel your status in real-life shouldn't affect your ability to be successful in RuneScape" Jagex 01/04/01 - 02/03/12

Link to comment
Share on other sites



<?php

//Check if there are any messages.

if(count($messages) >= 1) {

?>



Messages



<?php

//Print out all messages.

foreach($messages as $message) {

echo($message.'
');

}

?>





<?php

}



//Check if there are any errors.

if(count($errors) >= 1) {

?>



Errors



<?php

//Print out all errors.

foreach($errors as $error) {

echo($error.'
');

}

?>





<?php

}

?>





Your email address:





Subject:





Message:


<?php if(isset($emailtext)) echo($emailtext); ?>








Link to comment
Share on other sites

Thank you for suggestions. So far I found freedback and this free web%20form'>http://www.emailmeform.com">web form builder which unlike freedback does not show any advertising in the free plan! ;-) :wall:

 

 

 

Just sending an email is very easy.

 

I wrote you a page.

 

All you have to do is add your email address near the beginning.

 

 

 

 

 

 

 

Don't you think that's a bit...overdone? I can write up a simple php email contact script that handles the post-data in like 15 lines; and you just use simple client-side validation within the form itself.

Link to comment
Share on other sites

Thank you for suggestions. So far I found freedback and this free web%20form'>http://www.emailmeform.com">web form builder which unlike freedback does not show any advertising in the free plan! ;-) :wall:

 

 

 

Just sending an email is very easy.

 

I wrote you a page.

 

All you have to do is add your email address near the beginning.

 

 

 

 

 

 

 

Don't you think that's a bit...overdone? I can write up a simple php email contact script that handles the post-data in like 15 lines; and you just use simple client-side validation within the form itself.

 

 

 

No, it gives the user a message if they don't send the data.

 

 

 

JavaScript validation is bad because it won't work on all browsers, it can easily be bypassed (potentially creating a security exploit), and is just generally bad form.

 

 

 

I added a lot of whitespace and comments which is one of the reasons why it is so big.

 

 

 

A basic outline of the script is:

 

 

 

check input,

 

send email,

 

print out messages,

 

print out form.

Link to comment
Share on other sites

yeah , but what if sendmail isn't running on the host machine ? :-w

 

 

 

 

 

 

 

 

 

To be honest , use both javascript AND php for form validation if possible.

 

 

 

 

 

Javascript will prevent simple mistakes from creating additional and unnecessary page loads, and php will catch whatever gets through the javascript :)

I like to fart silently but deadly in movie theaters
Ard Choille says (11:41 PM):

I wouldn't dare tell you what to do m'dear

Link to comment
Share on other sites



<?php

//Check if there are any messages.

if(count($messages) >= 1) {

?>



Messages



<?php

//Print out all messages.

foreach($messages as $message) {

echo($message.'
');

}

?>





<?php

}



//Check if there are any errors.

if(count($errors) >= 1) {

?>



Errors



<?php

//Print out all errors.

foreach($errors as $error) {

echo($error.'
');

}

?>





<?php

}

?>





Your email address:





Subject:





Message:


<?php if(isset($emailtext)) echo($emailtext); ?>








[hide=Drops]

  • Dragon Axe x11
    Berserker Ring x9
    Warrior Ring x8
    Seercull
    Dragon Med
    Dragon Boots x4 - all less then 30 kc
    Godsword Shard (bandos)
    Granite Maul x 3

Solo only - doesn't include barrows[/hide][hide=Stats]

joe_da_studd.png[/hide]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.