Ajax contact form

Ajax contact form

Posted by: Coolcris
Posted on: 2008-03-15 10:45:00

Hi,
i've found in internet this simple ajax contact form:

http://www.ajaxtutorial.net/index.php/ajax-contact-form/

i've followed the instructions and put on my webspace...
but seem not working...
can be a phpmail problem? or a PHP version issue?
i'm not an expert...

Thanks


Re: Ajax contact form

Posted by: qmaine
Posted on: 2008-03-15 11:05:00

Well, what exactly is the problem? How is it not working? Are you not receiving the data collected on the form? Please explain the problem that you're having.

http://WebsiteHacks.com
website development and computer help

Re: Ajax contact form

Posted by: Atropos7
Posted on: 2008-03-15 11:17:00

<?
if(!isset($rnd) || !isset($name) || !isset($email) || !isset($subject) || !isset($body)) {
showform();
} else {
processform();
}

Read Variables from outside PHP



cool openvein.org -//-

Re: Ajax contact form

Posted by: Coolcris
Posted on: 2008-03-15 18:43:00

The script seem to freeze when i press SUBMIT, you can find it here:

http://www.myattractioncode.com/ajax_contact.php

mail never reach the target box...

Re: Ajax contact form

Posted by: Coolcris
Posted on: 2008-03-15 18:44:00

Sorry,
i'm not sure i've understand what you mean...
can you explain?

Re: Ajax contact form

Posted by: Alpicola
Posted on: 2008-03-15 19:42:00

I think what he's getting at is the use of register_globals, which is a PHP configuration setting that, if enabled, turns parameters passed to a PHP script into variables of the same name. On Dreamhost, if you're using PHP5, which I assume you are, this setting is disabled.

What you want to do is to check $_GET for the parameters instead. In short, the way to do this is to replace all references to $rnd, $name, $email, etc. with $_GET['rnd'], $_GET['name'], $_GET['email'], etc. You will also want to delete this line completely:

global $name, $email, $subject, $body;

Re: Ajax contact form

Posted by: Coolcris
Posted on: 2008-03-16 16:12:00

I've done what you said but not work too..
however i've found another one that seem work, so, thanks for your help... bye


Re: Ajax contact form

Posted by: pangea33
Posted on: 2008-03-16 22:33:00

How about sharing what you found with us?

Re: Ajax contact form

Posted by: Coolcris
Posted on: 2008-03-17 07:25:00

Sure,
but is not in ajax:
http://www.myphpscripts.net/?sid=5
it works good in my page :D

Tags: php versionajax