Click to See Complete Forum and Search --> : Can't Find the Script!!
ChandosJoy
07-29-2003, 11:29 AM
http://home.cablerocket.com/~rich_deb/rsvp.htm
The above page was done with javascript from this site.
Can anyone point me in the right direction so that I can add an RSVP page to my site? I would be extremely grateful. I'm new to this whole javascript thing and I'm a bit lost!!
This explains how to mail a form back to your email in php: http://www.webdevfaqs.com/php.php#mailer
ChandosJoy
07-29-2003, 11:38 AM
I understand how to email myself the script, I just can't find t he appropriate script to use for this form.
ChandosJoy
07-29-2003, 11:42 AM
Excuse my ignornance, I think I just figured it all out! Thank you so much for your help!
You're welcome... And, you are the first person ever pointed to the brand new webdevfaqs.com (http://www.webdevfaqs.com)! :)
ChandosJoy
07-29-2003, 11:47 AM
How appropriate that the javascript virgin gets pointed first!
I'll tackle that one in the event that I can get the count-down function to work! I think I'm way over my head with this thing!! AUGH!
ChandosJoy
07-29-2003, 12:05 PM
I found an error in that script...I think.
This is what it says: Message: <textarea name="message"><textarea>
Shouldn't the last "thing" be </textarea>?
It's not working that way, I put in the / and now it works.
I got that far, now I'm stumped again.
Exuro
07-29-2003, 12:10 PM
You didn't by chance accidently hit "New Thread" instead of "Reply" did you?
Yep, thanks for pointing that out. What do you seem to be having trouble with?
ChandosJoy
07-29-2003, 12:12 PM
Yes, that is exactly what I did. I apologize!
I merged them together... :)
ChandosJoy
07-29-2003, 12:20 PM
Damn. Now the site where I have my site is down! This is just one of those days.
Ok, so after <?PHP I alter the red script, delete the orange script and do what to the green???
Also, what format do I put this red script in? What do I put in place of this? (l, F jS, Y and h:i A)
$date = date ("l, F jS, Y");
$time = date ("h:i A");
The only part you need to change is this part:
###################### Set up the following variables ######################
#
$to = "you@your.com"; #set address to send form to
$subject = "Results from your Request Info form"; #set the subject line
$headers = "From: Form Mailer"; #set the from address, or any other headers
$forward = 1; # redirect? 1 : yes || 0 : no
$location = "thankyou.htm"; #set page to redirect to, if 1 is above
#
##################### No need to edit below this line ###################### You can leave the "orange" part in (PHP comments)... The only thing necessary to change for the script to work is the $to = "you@your.com"; part.
ChandosJoy
07-29-2003, 12:31 PM
Well, that simplifies things greatly!!!
Here's another one for ya...
Instead of the basic text box, I want two lines, in which the user will select one.
The first would be "We are unable to attend".
The second would be "We will be attending."
Under the attending, I'd like two pull down menus. One for the number of adults attending and one for the number of children.
Is that possible? If so, where would I go for the coding?
Ok, the form processor is built to handle any number of fields. You are able to use a normal HTML form with this. All you need to do is point the form's action to this script (in my example, mailer.php) and the method to POST...
ChandosJoy
07-29-2003, 12:35 PM
Just when I thought I was getting somewhere...was that English?
Sorry...
Let me see if I can explain this to you. I'll try it step by step. ;)
1: Copy and paste the script in the link that I pointed you to above into notepad. Save this as mailer.php.
2: Change this line to point to your email address:
$to = "you@your.com"; #set address to send form to
3: Make a HTML form (if you need help with this part, we'll work on that next) :) This does NOT go in mailer.php, but a separate HTML page. This page doesn't need to have a .php extention. .html or .htm is fine.
4: Set up your form tag like this: <form action="mailer.php" method="post">
5: Let me know if you need more help... :D
ChandosJoy
07-29-2003, 12:46 PM
I'm literally laughing out loud here. If you only knew how clueless I am on all of this. I'm amazed I got this far!!!
Ok. 1. I saved the "stuff" as you told me. (2. I had already changed the email address to my own.)
3. I have basic HTML knowledge. This does NOT include checked boxes or pull down menus. Can I put all of this information on the same web page? (You got me a little lost with all that .php and .html talk.) Can I enter all this on ONE page and make it work? Or do I need to separate it between t he layout and the RSVP entry page?
4. WHERE am I putting that tag?
5. I appreciate your help SO much....I also hope you get some compensation for helping the html/javascript morons of the world...like myself!
1-4: Let's start simple, to make sure we are both on the same page, and that you have at least gotten this far. I'll attach a test file for you to try
5: Nope, we don't receive any payment for helping out on this site... It is all volunteer work. If you want to give something back, just mention my site if you hear of anyone needing web design (http://www.infinitypages.com)
ChandosJoy
07-29-2003, 01:20 PM
Your link will be on my Wedding Site as well as my personal/anonymous site....I will rejoice you to anyone who will listen ((and even those who won't.)
I unzipped the file. The HTML document gives me a "Submint Query" button and the other php one won't open.
Maybe I should have asked this earlier... but does your server support PHP? Please say yes... :p Also, the .php file should open fine in notepad. Try with that.
ChandosJoy
07-29-2003, 01:28 PM
Does my server support PHP? I'm guessing it does. (My server is through www.diaryland.com.)
Everything you sent me via zip is now open.
Ok, in the PHP, change the email address to yours, and then upload those files and try running the index.htm one. If it works (ie, you get an email) we're good to go. Note that unless you change $redirect to 0, you will get forwarded to thankyou.htm. If there is no thankyou.htm file, it will give you a 404 (file not foune) page. So, either change $redirect to 0, make a thankyou.htm page, or ignore the 404 for now
ChandosJoy
07-29-2003, 01:41 PM
Ok, I uploaded the info as you sent it to me (after changing the email address and changing the redirect to 0). But I still get an error page and there is html gunk after the submit button.
Here is what's posting:
http://weddingplans.diaryland.com/rsvp.html
Delete all this from that page, and make sure you have uploaded mailer.php to the same directory as the page....
<?PHP
#######################################################
# This script is Copyright 2003, Infinity Web Design #
# Written by Ryan Brill - ryan@infinitypages.com #
# All Rights Reserved - Do not remove this notice #
#######################################################
## The lines below need to be edited...
###################### Set up the following variables ######################
#
$to = "chandosjoy@hotmail.com"; #set address to send form to
$subject = "Results from your Request Info form"; #set the subject line
$headers = "From: Form Mailer"; #set the from address, or any other headers
$forward = 0; # redirect? 1 : yes || 0 : no
$location = "thankyou.htm"; #set page to redirect to, if 1 is above
#
##################### No need to edit below this line ######################
## set up the time ##
$date = date ("l, F jS, Y");
$time = date ("h:i A");
## mail the message ##
$msg = "Below is the result of your feedback form. It was submitted on $date at $time.\n\n";
foreach ($_POST as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}
mail($to, $subject, $msg, $headers);
if ($forward == 1) {
header ("Location:$location");
}
else {
echo "Thank you for submitting our form. We will get back to you as soon as possible.";
}
?>
ChandosJoy
07-29-2003, 01:47 PM
I deleted what you told me too and this is the entire uploaded file....
<form action="mailer.php" method="post">
Name: <input type="text" name="name"></p><P></P><P>
Email: <input type="text" name="email"></p><P></P><P>
Message: <textarea name="message"></textarea>
</p><P></P><P>
<input type="submit" name="submit" value="Submit Form">
</form>
It appears that mailer.php does not exist:
http://weddingplans.diaryland.com/mailer.php
Make sure you uploaded mailer.php to the same directory as the form...
ChandosJoy
07-29-2003, 01:56 PM
Ok, so I need to create the php file.
When I add a file to that server, it only gives me the html option. That's where my issue is arising from, I'm assuming.
Yep, that's what the problem is. You'll have to contact the good people running your server and ask them if/how you can run PHP files...
ChandosJoy
07-29-2003, 02:01 PM
Ok, so I need to create the php file.
When I add a file to that server, it only gives me the html option. That's where my issue is arising from, I'm assuming.
ChandosJoy
07-29-2003, 02:07 PM
Ok, I already emailed them when you first asked me t hat question.
Can I host the php file elsewhere and still put the RSVP form on THAT site, or do I need to move the entire site?
If I do need to move the site, do you have any suggestions on where a first time person getting her own domain should begin her research?
No, you wouldn't need to move the entire site. The PHP file should be able to reside on a different server.
If you are looking for a new host, I would highly recommend http://www.dr2.net. I use them for all my hosting, and use http://www.godaddy.com as my domain registrar.
ChandosJoy
07-29-2003, 02:18 PM
So I need to go to dr2.net to register for hosting, then we'll be back on track getting this baby up and running?
Yes, you should be. DR2 has many nice features, and only costs $40 per year.
If you'd prefer to try to find a free server, look around at http://www.free-php-hosting.com/ I personally am not a fan of free servers, as then are never as good as the rented ones...