Hello Forums: I have been working on a form recently, and need a nice and easy form processing script (Preferrably PHP based). I'm having a hard time trying to find such a script. Any advices? Thanks!
hello, What do you need? an email form? Save the form fields into one mysql table?
ok, I'm posting one php code whitch you must load using the loadVars object. This php will first check if the fields Name, Email and Message are correctly filled, then he will send you one email whith the user comments and another email to user thanking him for be in touch with you. This is one simple php file, you will for sure untherstand it very well. In flash you just need to have your textfields whith instance names name, email and message, then using loadVars you do. lv = new LoadVars; lv.load("My_email.php", "lv", POST"); <?PHP $adminaddress = "YourAdressHere"; $siteaddress ="www.YourSite.com"; $sitename = "The Name of The Site"; // $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; $Required = array ("name", "email", "message"); $Ignored = array ("result","resultado","junk"); while (list($Key, $Value) = each($Required)) { if ((empty($HTTP_POST_VARS[$Value])) && (empty($HTTP_GET_VARS[$Value]))) { echo "&vars=".urlencode("You must fill in the field $Value!"); exit; } } while (list($Key, $Value) = each($Ignored)) { unset($HTTP_POST_VARS[$Value]); unset($HTTP_GET_VARS[$Value]); } $body=" Name: $name Email: $email Message: $message "; $from="From: $adminaddress"; mail($adminaddress, "Form of site $sitename", $body, $from); mail($email, "Thanks for visit the site $sitename", "Dear $name, Thanks for visiting us! $sitename | $siteaddress | $adminaddress" , $from); echo "&vars=".urlencode("Message Sent. Thanks"); ?>
oh, don't forget to add one textfield in your form to display the result or failure of the form processing like this per example one textfield whith instance name error and in php just chang this echo "&error=".urlencode("You must fill in the field $Value!"); echo "&error=".urlencode("Message Sent. Thanks");
What webserver are you running? IIS? Apache? What hardware? [quoted text, click to view] "IMDaNuBe" <webforumsuser@macromedia.com> wrote in message news:cr9gcl$9f5$1@forums.macromedia.com... > Hello Forums: I have been working on a form recently, and need a nice and easy > form processing script (Preferrably PHP based). I'm having a hard time trying > to find such a script. Any advices? Thanks! >
Regarding the code: lv = new LoadVars; lv.load('My_email.php', 'lv', POST'); Attach Code
Yes, on the button actions or in main timeline referencing the button instance name like: myBtn.onRelease = function(){ lv = new LoadVars; lv.load("My_email.php", "lv", POST"); lv.onLoad = function (sucess){ if(sucess){ doWhatereverYouWant: } } }
Bah, it's not working. I dont' know why, it seems that all of my forms do not work..... None of them works. I've tried like 4 - 5 different methods and it will not post to the PHP form. What might be the cause of this?
Hello, I would love to help you, but you need to help me too... :-) Your fla has 21 Mb, this is not good! Can you please just copy your form to one new document for me to dowload it? Thanks!
Hello, I'm realy sorry, I can't open your file, it gives error. When sending fla's is his good practice to zip the files, ok? Can you please do that? Yes, I'm unther Apache, using Linux as operating system in a pentium 4/1Gb Ram machine
ok, you're doing all wrong! I've told you to use the lv = new LoadVars(); lv.load("email.php"); you're using lv.name = name etc please dowload the functional sample at www.esquisso.com/clientes/forum/contact_form.zip You just need to insert in php youe email adress in adminadress It works good, I've tested here, ok? Hope this will help you!
Don't see what you're looking for? Try a search.
|