PDA

View Full Version : [AJAX] AJAX+PHP contact form.



shachi
07-11-2006, 08:35 AM
1) CODE TITLE: Ajax contact form.

2) AUTHOR NAME/NOTES: Shachi Bista.

3) DESCRIPTION: Put up a ajax contact form in your website.

4) URL TO CODE: N\A

Attached Below:
contact.zip contents:
ajaxcontent.html(frontend+javascript),
send.php(backend),
images/input_bg.png(optional for styling).

EDIT:By the way I forgot to zip the README file. Here it is:



Change the $from variable in send.php to your email address and that's it.

And also remove the cell with the "From" input.


EDIT: Hey I forgot the LINCENCE Agreement.



This is a free distribution so you get it for free. Umm... You SHOULD place the credits as follows:

/***************
Script created by: Shachi Bista
***************/

But it's not a must so you can skip that(first reason because I cannot think of anything to put in the credits).

dr-support
03-24-2007, 10:02 AM
doesn't work !!!

thetestingsite
03-24-2007, 02:11 PM
Ok, modified the code a bit to get it to work properly.

Changes made:
- simple configuration variables (if you want to change the names of the files or whatnot)
- included the readme in the zip file.
- Editted the send.php file to assign the $from variable to a defualt (if none was entered by the end user).
- Moved javascript to external file.
- Included "loading" image (so the user "knows" that something is happening).

Tested it and it works fine, now.
Hope this helps.

shachi
03-24-2007, 06:02 PM
Thanks, thetestingsite. :D

dr-support
03-24-2007, 07:54 PM
thank you very much