|
| Web Hosting Deals | Holiday Logo Design | Webcam Chat | Website Header Templates | Register domain | Search Engine Optimisation | Web Hosting |
|
|||||||
| Programming / Scripting / Coding Got a question about : PHP / Perl / Java / JavaScript / CGI Scripts / JavaScript coding. Ask here! We'll get you the answers ! |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
PHP - send a form
please look at this page: . i have a form and i want to recive the info`s from there on an e-mail. i wanna now how can I do it and if there is an "already made" script in php. i`m lazy but is urent. thanks
Last edited by enzo; 03-13-2007 at 03:06 PM. Reason: wrong link for the page ... |
|
||||
|
Lazy...
To be honest there are thousands of scripts written in PHP for contact forms, as i have written a good number of them myself.
I will copy the code into this reply & include a zipped version incase your just too lazy to copy & paste the code. You will need for this: A brain A vauge knowldge of PHP, but nothing above the very baisic level What we are doing: The code that i am going to show you is baisicly an entire contact script, it does not use SMTP servers (if you require an SMTP version PM me) it just uses the PHP mail function, this means it will most likely only work on linux. But yeah! To the code.. This is a very simple system using very very few lines of code. There are no known bugs with this script BUT, this is not incredibly secure, but it works. contact.html is as follows: PHP Code:
Now we get onto the "backend" as such of the script. This is sendmail.php PHP Code:
There are 3 things you need to change in this script. "yourname@example.com" change to your email address "Feedback Form Results" change to the subject of the email you want to recive. Location: http://www.example.com/thankyou.html Change to where you want the user to be sent once the script has emailed you. Hope this hepls bro... Base (You can get the zipped copy here Last edited by Base; 03-14-2007 at 05:01 PM. Reason: Adding ZIP file |
|
|||
|
thanks a lot. i will show you the results. and about the brain ..
... thik i have ![]() |
|
|||
|
it works ..
so thanks again. to be honest this is my first time when i deal whit a code and notepad. it works just fine and i`ve made some tuning ... took me about 2 hours but it worths the effort.
i`ve included al the fields i`ve neded by your example but i`v removed the header tag so i must include that back. i will let you know when is finished. thanks again |
|
||||
|
Ok mate, if you have any problems or need any fields adding to the script or anything, then just ask
![]() Cheers Base
__________________
http://www.pointserv.co.uk/gfx/deal_..._pointserv.png PointServ.co.uk - One of the UK's cheapest webhosting companies. |
|
|||
|
so .. base can you help me whit this?
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/psa/home/vhosts/barum-automotive.ro/httpdocs/new/sendmail.php:9) in /usr/local/psa/home/vhosts/barum-automotive.ro/httpdocs/new/sendmail.php on line 29 Your message is being sent, pelase wait to automaticly be redirected. wtf ? brb .. in a hurry .. thanks |
|
||||
|
Ahh never thought of that..
Well, there are 2 alternatives.. You could use a HTML redirect Code:
<META HTTP-EQUIV="Refresh"
CONTENT="3; URL=thankyou.html">
If the script hasen't propperly worked then it still redirects.. Or You could just have a HTML redirect link Code:
<a href="index.php">Email sent, please click here to continue</a> Thinking about it, you could use an if statement but quite frankly i am too tired to write that down.. lol Hope this helps....... Base
__________________
http://www.pointserv.co.uk/gfx/deal_..._pointserv.png PointServ.co.uk - One of the UK's cheapest webhosting companies. |
|
|||
|
thanks a lot .. resolved whit the redirect ...in 1 !!!! sec
![]() |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|