Web Design Forum: contact form problems - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

contact form problems when clicking the send button Rate Topic: -----

#1 User is online   Vulcan 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 465
  • Joined: 18-December 10
  • Reputation: 1
  • Gender:Male
  • Experience:Intermediate
  • Area of Expertise:I'm Learning

Posted 12 April 2011 - 09:28 PM

Hello

I have made a form in flash but when its published and when someone click sends it doesn't sent it to may email.

Heres the action script on the send button


stop();
System.useCodepage = true;
send_btn.onRelease = function() {
	my_vars = new LoadVars();
	my_vars.sender = email_box.text;
	my_vars.subject = subject_box.text;
	my_vars.message = message_box.text;
	if (my_vars.sender != "mailer.php" and my_vars.subject != "mailer.php" and my_vars.message != "mailer.php") {
		my_vars.sendAndLoad("mailer.php", my_vars, "POST");
		gotoAndStop(2);
	} else {
		error_clip.gotoAndPlay(2);
	}
	my_vars.onLoad = function() {
		gotoAndStop(3);
	};
};
email_box.onSetFocus = subject_box.onSetFocus=message_box.onSetFocus=function () {
	if (error_clip._currentframe != 1) {
		error_clip.gotoAndPlay(6);
	}
};



Heres the php

<?php

$subject = $_REQUEST["subject"];
$message = $_REQUEST["message"];
$sender = $_REQUEST["sender"];



$full_message = $_SERVER['REMOTE_ADDR'] . "\n\n" . $message;
$message= $full_message;

// remove the backslashes that normally appears when entering " or '
$message = stripslashes($message); 
$subject = stripslashes($subject); 
$sender = stripslashes($sender); 

$subject = "Contact form ". $subject;

if(isset($message) and isset($subject) and isset($sender)){
	mail("sfly@gmail.com", $subject, $message, "From: $sender");
}
?>

0

#2 User is offline   web-itec 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 533
  • Joined: 23-March 11
  • Reputation: 53
  • Gender:Male
  • Location:United Kingdom
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 13 April 2011 - 08:56 AM

what frame does it take you to when you have clicked send mail? is it bringing you to sucessful sent frame or failed or so on, if its saying its sent sucessfully its most likely to be your php?

Gary
0

#3 User is online   Vulcan 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 465
  • Joined: 18-December 10
  • Reputation: 1
  • Gender:Male
  • Experience:Intermediate
  • Area of Expertise:I'm Learning

Posted 13 April 2011 - 09:27 AM

View Postweb-itec, on 13 April 2011 - 08:56 AM, said:

what frame does it take you to when you have clicked send mail? is it bringing you to sucessful sent frame or failed or so on, if its saying its sent sucessfully its most likely to be your php?

Gary


It doesn't go to my inbox
0

#4 User is online   Spitfire 

  • Mighty Pirate™
  • PipPipPipPip
  • Group: Members
  • Posts: 890
  • Joined: 05-February 11
  • Reputation: 189
  • Gender:Male
  • Location:Berkshire
  • Experience:Web Guru
  • Area of Expertise:Web Developer

Posted 13 April 2011 - 09:41 AM

View PostVulcan, on 13 April 2011 - 09:27 AM, said:

It doesn't go to my inbox


Since you're depending on 3 variables being set (ie: $message, $subject and $sender) before the mail() function runs, I'd start by checking if those variables are actually being set.
0

#5 User is online   Vulcan 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 465
  • Joined: 18-December 10
  • Reputation: 1
  • Gender:Male
  • Experience:Intermediate
  • Area of Expertise:I'm Learning

Posted 13 April 2011 - 11:06 AM

View PostSpitfire, on 13 April 2011 - 09:41 AM, said:

Since you're depending on 3 variables being set (ie: $message, $subject and $sender) before the mail() function runs, I'd start by checking if those variables are actually being set.



what do you mean
0

#6 User is offline   web-itec 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 533
  • Joined: 23-March 11
  • Reputation: 53
  • Gender:Male
  • Location:United Kingdom
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 13 April 2011 - 11:51 AM

View PostVulcan, on 13 April 2011 - 09:27 AM, said:

It doesn't go to my inbox

i didnt say it does, i was asking when you click the button to send the contact form does it change the current frame in the flash document, if so, what frame does it take you to
0

#7 User is online   Vulcan 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 465
  • Joined: 18-December 10
  • Reputation: 1
  • Gender:Male
  • Experience:Intermediate
  • Area of Expertise:I'm Learning

Posted 15 April 2011 - 11:45 AM

View Postweb-itec, on 13 April 2011 - 11:51 AM, said:

i didnt say it does, i was asking when you click the button to send the contact form does it change the current frame in the flash document, if so, what frame does it take you to



yes it does take it to the next frame saying thank you for sending your message but then it doesn't send it to may email
0

#8 User is offline   web-itec 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 533
  • Joined: 23-March 11
  • Reputation: 53
  • Gender:Male
  • Location:United Kingdom
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 15 April 2011 - 02:39 PM

View PostVulcan, on 15 April 2011 - 11:45 AM, said:

yes it does take it to the next frame saying thank you for sending your message but then it doesn't send it to may email


hmm will be the php then mate, if you want ill send you my php form? have you sent the variables by post ?

send by post like loadnumvariables and use post
and on the php use post instead of request and also have you ensured instance names on flash are the same as variable names recieved in $_POST on the php script ?

Gary
0

#9 User is online   Vulcan 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 465
  • Joined: 18-December 10
  • Reputation: 1
  • Gender:Male
  • Experience:Intermediate
  • Area of Expertise:I'm Learning

Posted 17 April 2011 - 03:36 PM

View Postweb-itec, on 15 April 2011 - 02:39 PM, said:

hmm will be the php then mate, if you want ill send you my php form? have you sent the variables by post ?

send by post like loadnumvariables and use post
and on the php use post instead of request and also have you ensured instance names on flash are the same as variable names recieved in $_POST on the php script ?

Gary



ok that will be great can you attach it on here or do you need my email?
0

#10 User is online   webdesigner93 

  • Web Guru
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,976
  • Joined: 22-September 09
  • Reputation: 222
  • Gender:Male
  • Experience:Web Guru
  • Area of Expertise:Web Developer

Posted 17 April 2011 - 09:28 PM

View PostVulcan, on 17 April 2011 - 03:36 PM, said:

ok that will be great can you attach it on here or do you need my email?

Heres my secure contact form , been pretty well tested ect.. u can give it a try

http://www.submitban...scripts/contact

btw out of curiosity why use flash on a contact form? when u can use something like jquery/ajax for pretty much the same effects

This post has been edited by webdesigner93: 17 April 2011 - 09:49 PM

0

#11 User is online   Vulcan 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 465
  • Joined: 18-December 10
  • Reputation: 1
  • Gender:Male
  • Experience:Intermediate
  • Area of Expertise:I'm Learning

Posted 19 April 2011 - 08:34 PM

View Postwebdesigner93, on 17 April 2011 - 09:28 PM, said:

Heres my secure contact form , been pretty well tested ect.. u can give it a try

http://www.submitban...scripts/contact

btw out of curiosity why use flash on a contact form? when u can use something like jquery/ajax for pretty much the same effects


The form is not working

Well I want to learn how to use flash as well i was told that a flash contact form is more secure.

This post has been edited by Vulcan: 19 April 2011 - 10:14 PM

0

#12 User is online   webdesigner93 

  • Web Guru
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,976
  • Joined: 22-September 09
  • Reputation: 222
  • Gender:Male
  • Experience:Web Guru
  • Area of Expertise:Web Developer

Posted 20 April 2011 - 01:10 AM

View PostVulcan, on 19 April 2011 - 08:34 PM, said:

The form is not working

Well I want to learn how to use flash as well i was told that a flash contact form is more secure.

Mmm it should work, tested it very well
0

#13 User is online   Vulcan 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 465
  • Joined: 18-December 10
  • Reputation: 1
  • Gender:Male
  • Experience:Intermediate
  • Area of Expertise:I'm Learning

Posted 20 April 2011 - 08:16 PM

ok well when we click submit it goes blank
0

#14 User is online   webdesigner93 

  • Web Guru
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,976
  • Joined: 22-September 09
  • Reputation: 222
  • Gender:Male
  • Experience:Web Guru
  • Area of Expertise:Web Developer

Posted 20 April 2011 - 11:56 PM

View PostVulcan, on 20 April 2011 - 08:16 PM, said:

ok well when we click submit it goes blank

I'll look into it
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users