Current time: 04-23-2014, 03:07 PM Hello There, Guest! (LoginRegister)

Post Reply 
Where to put PHP file?
03-03-2008, 02:45 PM
Post: #1
Where to put PHP file?
Hello there. I am a newbie when it comes to setting up websites. I had a quick question. I used a Website Contact Form Generator for my website. I have already cut and pasted the contact htm but I have no idea where to place the PHP script?

Any help would be greatly appreciated!!
Find all posts by this user
Quote this message in a reply
03-03-2008, 02:53 PM
Post: #2
Where to put PHP file?
You can stick it anywhere you want ... just make sure you refer to it properly in the "action" part of the form. Wink

I'd just stick it in the same directory as the contact.htm file.

--rlparker
Find all posts by this user
Quote this message in a reply
03-03-2008, 03:09 PM
Post: #3
Where to put PHP file?
Okay, thank you. This might sound completely dumb, but how would I save the PHP file? You see, its just lines of code on a text document right now? Could I go into Dreamweaver and Save As a PHP file?
Find all posts by this user
Quote this message in a reply
03-03-2008, 03:25 PM
Post: #4
Where to put PHP file?
Quote:Okay, thank you. This might sound completely dumb, but how would I save the PHP file? You see, its just lines of code on a text document right now? Could I go into Dreamweaver and Save As a PHP file?
Well, you *could* do that, but it is certainly not needed. Just save it in any text editor (not a wordprocessor!) using a ".php" extension (or rename it if your editor forces some other filetype).

--rlparker
Find all posts by this user
Quote this message in a reply
03-03-2008, 03:42 PM
Post: #5
Where to put PHP file?
Strange, I am getting this error?

Not Found

The requested URL /contact.asp was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

I changed the contact.txt to contact.php is there something else that I might have missed?
Find all posts by this user
Quote this message in a reply
03-03-2008, 03:49 PM
Post: #6
Where to put PHP file?
I also tried changing to asp file but am getting strange gibberish message when I try to submit.
Find all posts by this user
Quote this message in a reply
03-03-2008, 03:50 PM
Post: #7
Where to put PHP file?
I thought you said this was a PHP contact form script? .asp is not supported on DreamHost.
Quote:I changed the contact.txt to contact.php is there something else that I might have missed?
Probably, but I don't know what, because I have not seen your script (I was just answering your questions!).

Have you looked at the DreamHost provided formmail script? This is *by far* the easiest way to implement this if you are not used to programming CGI applications. Wink

--rlparker
Find all posts by this user
Quote this message in a reply
03-03-2008, 04:07 PM
Post: #8
Where to put PHP file?
Yes, it was a PHP script, my mistake I was just trying.

I am looking at the DreamHost formmail script, looks just as confusing to me! Again, I apologize for taking up your time. I was hoping that I would be able to figure things out because the generator website stated how easy it was to use.
Find all posts by this user
Quote this message in a reply
03-03-2008, 04:17 PM
Post: #9
Where to put PHP file?
The potential problem is that "easy" is relative, and "easy" does not necessarily mean "secure"! Many, if not most, of the PHP "formmail" scripts readily available on the web are inherently insecure, and can be exploited by spammers to send spam.

I don't know about the one you are using (and don't really feel like reviewing the code to see!). The DreamHost script is pretty robust (a modified version of the perlmongers NMS formmail script) and DreamHost feels *it* is secure enough to make it generally available.

Do you really want to get a contact form up "easily" only to have it used to send spam? Wouldn't it be better to spend a little more effort getting it done in a secure manner? Wink

If you provide the link to the "generator", I'll take a look at what you have to do to install the produced form, but I don't want to vouch for it's security!

Alternately, there is additional help on using the DreamHost fommail script in the DreamHost wiki. You might take a look at that, and see if it is helpful to you in implementing the DreamHost formmail script on your site.

--rlparker
Find all posts by this user
Quote this message in a reply
03-03-2008, 04:44 PM
Post: #10
Where to put PHP file?
I see your point with "easy" and "secure"!

Spam would be very irritating and bad for us. We basically needed to use the contact forms for 2 reasons: Mailing List signups and Guestlist signups for events.

I will go ahead and go with the DreamHost script and do my best! I was wondering though in your experience, does the DreamHost script allow for either an option for a Drop-Down choice or a Check Box option instead of a text box? Just curious, I will look into it more though the Wiki.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: