Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

rsvp form help


  • Please log in to reply

#1
adamdillon

adamdillon

    Member

  • Member
  • PipPip
  • 67 posts
I need help making this do what i want.

http://www.dillonwedding.com/rsvp.htm

I want it to clear when it is done. I would like a message that says thank you for rsvping. And I want to make sure you can us it with our outlook.
Thanks. any help would be great.

Adam
  • 0

Advertisements


#2
TaNkZ101

TaNkZ101

    Member

  • Member
  • PipPipPip
  • 327 posts
i wouldn't use html to mail it, php is a better choice if your host provides it. i don't know the answer to your help if you're using mailto:
  • 0

#3
adamdillon

adamdillon

    Member

  • Topic Starter
  • Member
  • PipPip
  • 67 posts
Yes my server supports php. Can someone set me up a form in php.
  • 0

#4
TaNkZ101

TaNkZ101

    Member

  • Member
  • PipPipPip
  • 327 posts
i could! free of charge of course, i'll need the names of the fields, which fields are mandatory (for example do not send if e-mail is not filled out), and the code for the "Thank You!" page after a successfully executed script (sent email).
  • 0

#5
Allsortgroup

Allsortgroup

    I SPAMMED Too Much!

  • Banned
  • PipPipPip
  • 905 posts
Ok adamdillon he is a script i wrote for my site but i have adapted it to work for you.

People will fill out the form, and then when they click send it will check if they have filled out all the fields, and if they havent it will tell them what fields to fill in.

You need to put this form in your rspv page...

<FORM METHOD="POST" ACTION="send.php" ENCTYPE="text/plain">
<INPUT name="name" TYPE="text" id="name"> 
: Name <BR>
<INPUT name="email" TYPE="text" id="email"> 
: Email<br />
<br />
Will You Be Attending <br />

<p>
  <label>
  <input name="attending" type="radio" id="attending" value="yes" />
	Yes</label>
  <br />
  <label>
  <input name="attending" type="radio" id="attending" value="no" />
	No</label>
  <br />
  <br />
	<label>Adults
	  <select name="adults" id="adults">
		<option>Please Choose one</option>
		<option value="0">0</option>
		<option value="1">1</option>
		<option value="2">2</option>
		<option value="3">3</option>
		<option value="4">4</option>
		<option value="5">5</option>
		<option value="6">6</option>
		<option value="7">7</option>
		<option value="8">8</option>
		<option value="9">9</option>
		<option value="10">10</option>
	  </select>
	</label>
</p>
<p>
  <label>Children
  <select name="children" id="children">
	<option>Please Choose One</option>
	<option value="0">0</option>
	<option value="1">1</option>
	<option value="2">2</option>
	<option value="3">3</option>
	<option value="4">4</option>
	<option value="5">5</option>
	<option value="6">6</option>
	<option value="7">7</option>
	<option value="8">8</option>
	<option value="9">9</option>
	<option value="10">10</option>
  </select>
</label>
</p>
Comments <br />
<TEXTAREA name="comments" ROWS="10" WRAP="hard" id="comments">
</TEXTAREA>
<br />
<INPUT TYPE="submit" VALUE="Send">
<INPUT TYPE="reset" VALUE="Clear">
</FORM>

Then you need to make a new file called send.php and put this in your page <body> tags...

<?php
@extract($_POST);
$name = stripslashes($name);
$email = stripslashes($email);
$attending = stripslashes($attending);
$adults = stripslashes($adults);
$children = stripslashes($children);
$comments = stripslashes($comments);
$subject = "Wedding";
if (!$name) {echo
"<table width='500'><tr>
		<td width='360'>You have not entered a name!</td></tr>
  <tr><td>&nbsp;</td></tr>
  <tr><td width='150'><center><FORM><INPUT TYPE='button' VALUE='Go Back' onClick='history.back()'></FORM></center></td></tr>
  <tr><td>&nbsp;</td></tr>
</table>";
 } else {
if (!$email) {echo
"<table width='500'><tr>
		<td width='360'>You have not entered a email address!</td></tr>
  <tr><td>&nbsp;</td></tr>
  <tr><td width='150'><center><FORM><INPUT TYPE='button' VALUE='Go Back' onClick='history.back()'></FORM></center></td></tr>
  <tr><td>&nbsp;</td></tr>
</table>";
 } else {
if (!$attending) {echo
"<table width='500'><tr>
		<td width='360'>Are you attending or not?</td></tr>
  <tr><td>&nbsp;</td></tr>
  <tr><td width='150'><center><FORM><INPUT TYPE='button' VALUE='Go Back' onClick='history.back()'></FORM></center></td></tr>
  <tr><td>&nbsp;</td></tr>
</table>";
 } else {
if (!$adults) {echo
"<table width='500'><tr>
	<td width='360'>You have not entered if any adults are coming!</td></tr>
  <tr><td>&nbsp;</td></tr>
  <tr><td width='150'><center><FORM><INPUT TYPE='button' VALUE='Go Back' onClick='history.back()'></FORM></center></td></tr>
  <tr><td>&nbsp;</td></tr>
</table>";
 } else {
if (!$children) {echo
"<table width='500'><tr>
	<td width='360'>You have not entered if any children are coming!</td></tr>
  <tr><td>&nbsp;</td></tr>
  <tr><td width='150'><center><FORM><INPUT TYPE='button' VALUE='Go Back' onClick='history.back()'></FORM></center></td></tr>
  <tr><td>&nbsp;</td></tr>
</table>";
 } else {
if (!$comments) {echo
 "<table width='500'><tr>
	<td width='360'>You have not entered and comments!</td></tr>
  <tr><td>&nbsp;</td></tr>
  <tr><td width='150'><center><FORM><INPUT TYPE='button' VALUE='Go Back' onClick='history.back()'></FORM></center></td></tr>
  <tr><td>&nbsp;</td></tr>
</table>";
 } else {

print
"<table width='500'><tr>
	<td width='360'>Thank you $name for telling us if you are coming to the wedding!</td></tr>
  <tr><td>&nbsp;</td></tr>
  <tr><td>&nbsp;</td></tr>
  <tr><td>&nbsp;</td></tr>
</table>";

mail("[email protected]",$subject,"<b>Attending:</b> $attending <br /><br /><b>Adults:</b> $adults <br /><br /><b>Children:</b> $children <br /><br /><b>Comments:</b> $comments","From: $name <$email>");
}
}
}
}
}
}
?>

And thats all you need. Test it out. Also test it out and on purpose leave a field bland and it should display a message.

And then check your email and all the data will be layed out in the email correctly!

:whistling:
  • 0

#6
adamdillon

adamdillon

    Member

  • Topic Starter
  • Member
  • PipPip
  • 67 posts
Ok Thanks the form works great but No matter how i enter a name it always gives me the error messag "you have not entered a name" I don't know very much about php or else i would be able to figure it out on my own.
  • 0

#7
Allsortgroup

Allsortgroup

    I SPAMMED Too Much!

  • Banned
  • PipPipPip
  • 905 posts
So whenever you enter a name it says you have not enterd a name?

Does it still send the email?

Also it works totally fine on my site contact section...

http://www.allsortshop.com/contact

:whistling:
  • 0

#8
adamdillon

adamdillon

    Member

  • Topic Starter
  • Member
  • PipPip
  • 67 posts
ok i tried yours i will compare mine and yours and see if there is a difference. My is up on dillonwedding.com.
  • 0

#9
Allsortgroup

Allsortgroup

    I SPAMMED Too Much!

  • Banned
  • PipPipPip
  • 905 posts
Ok i think i have found the problem...

Your file is called rsvp.htm

You need to simply rename this file to rsvp.php

Everything will still be displayd the same and hopefully it should work.

Let me no how it goes.

:whistling:
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP