/    Sign up×
Community /Pin to ProfileBookmark

PHP – Forms

How come the forms on this site dont work?

[url]http://www.crosspoint.org/[/url]

to post a comment
PHP

11 Comments(s)

Copy linkTweet thisAlerts:
@pyroJul 30.2003 — lol... More info, perhaps? ?

You might want to take a look at the articles at http://www.webdevfaqs.com/php.php for a form handler, and an explination of what global variables are/do, as those are both common errors/needs.
Copy linkTweet thisAlerts:
@JonathanauthorJul 30.2003 — The form doesn't "return false;" and it doesn't mail the information
Copy linkTweet thisAlerts:
@pyroJul 30.2003 — [i]Originally posted by Jonathan [/i]

[B]The form doesn't "return false;"[/B][/QUOTE]
Is this a javascript issue?

As far as the form not mailing itself, we need to see the code you are using to mail it. Might I recommend http://www.webdevfaqs.com/php.php#mailer
Copy linkTweet thisAlerts:
@JonathanauthorJul 30.2003 — This is the PHP code:

[code=php]
<?PHP

$subject = "Registration";
$headers = "From: Form Mailer";
$forward = 1;
$location = "thanks.html";
$addresses = array("[email protected]","[email protected]","[email protected]");

$date = date ("l, F jS, Y");
$time = date ("h:i A");
$IP = $_SERVER['REMOTE_ADDR'];
$msg = "This form was submitted on $date at $time.nn";
$msg = $IP . $msg
foreach ($_POST as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "n";
}

foreach ($addresses as $email) {
mail($email, $subject, $msg, $headers);
}
if ($forward == 1) {
header ("Location:$location");
}
else {
echo ("Thank you for submitting our form.");
}

?>
[/code]
Copy linkTweet thisAlerts:
@pyroJul 30.2003 — Ah, yes. I gave you that code eariler...

Try removing all the javascript and check if the PHP will work. I'm assuming you have all that code in searching.php and reserving.php?
Copy linkTweet thisAlerts:
@pyroJul 30.2003 — What happened when your removed the javascript?
Copy linkTweet thisAlerts:
@JonathanauthorJul 30.2003 — I am doing that right now.. I will get back to you ?
Copy linkTweet thisAlerts:
@JonathanauthorJul 30.2003 — Nothing changed... only they go to the thanks.html page now.. i think ..
Copy linkTweet thisAlerts:
@pyroJul 30.2003 — Hmm... it might be a problem with the mail server. I seem to remember you had this working (though shakily) eariler on when I originally gave you this code?
Copy linkTweet thisAlerts:
@JonathanauthorJul 30.2003 — It was working... hold on... Maybe it hasn't kicked in yet. the upload
×

Success!

Help @Jonathan spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...