PDA

View Full Version : yet another form to email question.


shynomi
12-02-2005, 04:13 PM
hey guys, i'm so sorry if you've all heard this enough but i did a search and still seem a bit perplexed on the form side of things.
basically i've created a form in DW and you can look at it here:

http://www.solemnhollow.com ('http://www.solemnhollow.com')
goto top right and click on contact

i'm hosted through chapterzero hosting which has both php and mysql installed and now i just need to know what to do to get it to function and post a thank you page.
again sorry if this question has been asked numerous times. just a lil confused.
nate

dreamlynx
12-02-2005, 05:20 PM
Dude I just looked at your code and you be way off.

1. the textfields need to be named.

2. you have action named. In other words you nothing to command the for to work. Some thing like formail or send mail.

3. for the redirect you can use a hidden field according to formmail or sendmail you use.

Hope this helps. to.
Dreamlynx

shynomi
12-02-2005, 05:43 PM
yeah i just develepod the look i haven't touched the code yet...i'll look into that thanks.

Creative Insanity
12-02-2005, 06:30 PM
yes it would be a good idea to add an action to your form so that it knows what to do once someone clicks the button. At the moment you have action="" which once the button is clicked will send the data to nowhere.
Like said above, enter in the action what email script you are using.. if it is the one that dj posted for you some time ago, enter the name of that php file in the action tag for the form and you will find that it will work.

shynomi
12-02-2005, 07:28 PM
ok i've named the fields, and in the properties i've set the action to mailscript.php (i found this script on this forum from a person asking the same questions i had.) I previewed in browser and filled in some stuff on the form and hit submit and it asked me to download the mailscript.php to my cpu...how would i go about testing it now, can i test it from my cpu before uploading to the hosting's FTP?

dreamlynx
12-02-2005, 07:43 PM
unless you have php installed on you server you won't be able to install on your server. LOad to your host and test there.

shynomi
12-02-2005, 09:37 PM
i have php installed on the server. just upload it into the root directory of the hosts server (or the directory where the .htm files are)?

Creative Insanity
12-02-2005, 10:10 PM
If you have php installed tell me what phpinfo shows. No idea what I am on about?
In your servers web root directory create a txt file called info.php and in that add this line.
<? phpinfo(); ?>
and then from a web browser type:
http://localhost/info.php ('http://localhost/info.php')
If you get nothing then php is not installed correctly, but if however you get a heap of mysql and php info then walla.
Also you will need sendmail setup on the server as that is what the script looks for when sending mail.
Do what is suggested abovt and upload it to your hosting space and test it there as sendmail is a linux thing.

shynomi
12-02-2005, 11:21 PM
i fixed it, i just had to upload the mailscript.php file into my root dir. (that dj made)and point the forms action to that and it worked fine! i'm so stoked now. i'm sure i'll have a new question soon so thanks so far you guys are awesome!

Creative Insanity
12-02-2005, 11:48 PM
Glad it is all working now :)