dandandandaman — 2011-01-11T04:17:55-05:00 — #1
Here is a link to the previous thread - [Sitepoint Thread and here is the tutorial for the contact form - [URL="http://boxmodeljunkie.com/create-a-simple-php-contact-form/"]Tutorial.](http://www.sitepoint.com/forums/showthread.php?t=722871)
Anyway I digress. Any help would be appreciated or if anybody can point me to a contact form tutorial or template that is known to be a good build that I can use but also change the style that would be great.
Any help really would be appreciated.
anthonysterling — 2011-01-11T04:34:50-05:00 — #2
The PHP code listed in the tutorial listed seems adequate, maybe you should persevere with it some more?
dandandandaman — 2011-01-11T07:15:58-05:00 — #3
Cheers Anthony, if nobody has any other views or any other suggestions I'll give it a go.
dandandandaman — 2011-01-11T08:15:07-05:00 — #4
I have just worked through this and there are a few bits that are not working. I would be really grateful if somebody could have a look. I have just add the PHP and HTML code to the page of my website and then created the validate.class.php file. I have just copied and pasted the code and have removed the CSS. yet the following things are wrong
1) It says "your message has been sent" even when no details have been completed, I assume this is meant to show only when the message has been sent but not sure how to fix it.
2) Each field has already been filled in with Name having <?php echo htmlentities($name); ?> in it, Email is filled in with <?php echo htmlentities($email); ?> and then message is completed with <?php echo htmlentities($message); ?>. I assume it is an issue with the code but I am unsure how to fix it
3)When I click submit it takes me to a folder showing all the files which form my site, I assume it shouldn't be doing that but what should it be doing and how do I fix it
If anybody has any ideas please let me know where I am going wrong. I can't put it on my live website just yet until I get home, so sorry if this causes a problem. Thanks in advance.
slacle — 2011-03-24T22:45:29-04:00 — #5
I would like to see a response to this thread as well.
There are tons of (good) tutorials about everything on web design out there, except for creating a simple contact form. All the ones I've been able to find are really old and probably outdated or from random websites which I wouldn't trust.
happypete — 2011-03-24T23:14:41-04:00 — #6
I found a really simple but with PHP validation contact form here: Create A Simple PHP Contact Form
ethan_27 — 2011-03-25T00:39:29-04:00 — #7
Some things to think about are:
1.Security, e.g sql injection,
2.What mistakes your user might make when typing into the texfields - "if" and "else" statements
3.Where you want to send it to e.g a database or a personal email.
Look into the 'post' and 'get' functions of php aswell. The "action" value in your HTML form is something to look up aswell as this is where the form will be sent e.g to a processing script.
I wish I had more to give you but Im still building one myself at the mo.