julieb Posted September 23, 2008 Share Posted September 23, 2008 Hi there... I know I came across this before but I forget what I had to do to make this work. I have a simple php contact form. Name, Email, Phone, and Message. Phone used to be Subject and worked fine. In the send_email.php form I changed everything that said Subject to Phone. And in the Flash AS I did the same. But when I get my email from the contact form.. It will not add the phone number and when I look back at the contact form on the site... it still has the phone number siting there. Attached is my .php file. This is the code for the first frame of contact form in FLA file: send_button.onRelease = submit; reset_button.onRelease = reset; function submit() { if( contact_name.text == "" || contact_email.text == "" || contact_phone.text == "" || contact_message.text == "" ) { message_status.text = "Please fill up all text fields."; } else if( contact_email.text.indexOf('@') < 2 || contact_email.text.indexOf('.') < 0 ) { message_status.text = "Please enter the valid email address."; } else { message_status.text = ""; gotoAndStop("send"); } } function reset() { contact_name.text = contact_email.text = contact_phone.text = contact_message.text = message_status.text = ""; clearInterval(interval_id); gotoAndStop("stop"); } this is the actions script for the send button: stop(); loadVariables("send_email.php?flashmo=" + random(1000), this, "POST"); message_status.text = "sending..."; var i = 0; function check_status() { if( success == "yes" ) { message_status.text = "Thank You your message was sent successfully! "; play(); } else if( success == "no" ) { message_status.text = "Your message could not be sent. Please try again."; gotoAndStop("stop");; } if( i >= 20 ) clearInterval(interval_id); i++; } var interval_id = setInterval(check_status, 400); I really wanted to have this go to two email address and the message that says "thank you..." can it stay there or atleast show alittle longer after message has been send??? Thank you so much in advance... Julie [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/125500-changed-text-field-from-subject-to-phone/ Share on other sites More sharing options...
Minase Posted September 23, 2008 Share Posted September 23, 2008 show us the HTML form too Link to comment https://forums.phpfreaks.com/topic/125500-changed-text-field-from-subject-to-phone/#findComment-648816 Share on other sites More sharing options...
julieb Posted September 23, 2008 Author Share Posted September 23, 2008 show us the HTML form too It is on http://reflectionimaging.net/flash/~main_v8today3.swf That is just the mock site... not done with appearance of the form on contacts page.. I just want to get it working first. Thank you Link to comment https://forums.phpfreaks.com/topic/125500-changed-text-field-from-subject-to-phone/#findComment-648824 Share on other sites More sharing options...
Minase Posted September 23, 2008 Share Posted September 23, 2008 i dont know to much about flash but.. var interval_id = setInterval(check_status, 400); try to change 400 to something bigger eg: 2500 as for phone i really dont know why it doesnt work //edit play() there represent a function? if yes show it Link to comment https://forums.phpfreaks.com/topic/125500-changed-text-field-from-subject-to-phone/#findComment-648835 Share on other sites More sharing options...
julieb Posted September 23, 2008 Author Share Posted September 23, 2008 Okay thank you I will try that... Link to comment https://forums.phpfreaks.com/topic/125500-changed-text-field-from-subject-to-phone/#findComment-648852 Share on other sites More sharing options...
julieb Posted September 23, 2008 Author Share Posted September 23, 2008 Didn't work so I will just keep messing with it.... thank you Julie Link to comment https://forums.phpfreaks.com/topic/125500-changed-text-field-from-subject-to-phone/#findComment-648984 Share on other sites More sharing options...
discomatt Posted September 23, 2008 Share Posted September 23, 2008 Have you discovered whether this is a Flash or PHP issue yet? Try simply print_r( $_POST ) on your action page, and see if the right variables are getting sent from the Flash form. Link to comment https://forums.phpfreaks.com/topic/125500-changed-text-field-from-subject-to-phone/#findComment-648991 Share on other sites More sharing options...
julieb Posted September 23, 2008 Author Share Posted September 23, 2008 Everything showed except for the phone number.. I appreciate your help. I ended up taking another form that was similar to what I needed and altered it. It works perfect. I wish though I knew what to do or what I have done wrong. I know it is hard to not be able to view everything. thank you very much! Link to comment https://forums.phpfreaks.com/topic/125500-changed-text-field-from-subject-to-phone/#findComment-649007 Share on other sites More sharing options...
discomatt Posted September 23, 2008 Share Posted September 23, 2008 If phone number wasn't there, then your Flash form isn't telling the browser to POST it properly... glad you could get it working though. Link to comment https://forums.phpfreaks.com/topic/125500-changed-text-field-from-subject-to-phone/#findComment-649050 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.