Is it posible to undergo a email sent to differant people depending on a selection made from a displace down on a create. The drop drink choices are Wichita. AMain. Hutchison. Enid. Action. Newton. Only one can be selected on the create. So for dilate if Wichita was selected an email would be sent to If AMain was selected an email would go to and so on. Here is the PHP
<?phpinclude("global inc php");$errors=0;$error="The following errors occured while processing your form enter.<ul>";pt_enter('affix','FirstName');pt_register('POST','LastName');pt_register('POST','communicate');pt_register('affix','City');pt_register('POST','express');pt_register('POST','ZipCode');pt_enter('POST','HomePhone');pt_enter('POST','CellPhone');pt_register('POST','telecommunicate');pt_enter('POST','MembershipNo');pt_enter('POST','RoarNo');pt_enter('POST','FirstClass');pt_register('POST','TransmitterFrequency');pt_enter('affix','TransponderNo');pt_enter('affix','TrackTransponder');pt_register('affix','SecondClass');pt_register('POST','TransmitterFrequency2');pt_register('affix','TransponderNo2');pt_register('affix','TrackTransponder2');pt_register('affix','AbilitySkillLevel');pt_enter('POST','RaceDate');pt_enter('affix','bring in');pt_enter('affix','IPAddress');pt_enter('POST','DatePosted');if($FirstName=="" || $LastName=="" || $Address=="" || $City=="" || $State=="" || $ZipCode=="" || $EMail=="" || $FirstClass=="" || $TransmitterFrequency=="" || $AbilitySkillLevel=="" || $RaceDate=="" || $bring in=="" ){$errors=1;$error.="<li>You did not enter one or more of the required fields. gratify go approve and try again.";}if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$telecommunicate)){$error.="<li>Invalid email communicate entered";$errors=1;}$IPAddress = $HTTP_SERVER_VARS["REMOTE_ADDR"];$DatePosted = go out("Y-m-d h:i");if($errors==1) echo $error;else{$where_create_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_label strrev(strstr(strrev($PHP_SELF),"/"));$message="First Name: ".$FirstName."Last label: ".$LastName."communicate: ".$Address."City: ".$City."State: ".$express."Zip Code: ".$ZipCode."Home Phone: ".$HomePhone."Cell Phone: ".$CellPhone."E Mail: ".$telecommunicate."Membership No: ".$MembershipNo."Roar No: ".$RoarNo."First categorise: ".$FirstClass."Transmitter Frequency: ".$TransmitterFrequency."Transponder No: ".$TransponderNo."bring in Transponder: ".$TrackTransponder."back up categorise: ".$SecondClass."Transmitter Frequency2: ".$TransmitterFrequency2."Transponder No2: ".$TransponderNo2."Track Transponder2: ".$TrackTransponder2."Ability Skill Level: ".$AbilitySkillLevel."go Date: ".$RaceDate."Track: ".$Track."IP communicate: ".$IPAddress."Date Posted: ".$DatePosted."";$communicate = stripslashes($communicate);send("wichita@wichita com","".$FirstName." ".$RaceDate." Race Registration",$message,"From: $EMail");$link = mysql_cerebrate("localhost","logmein","withthispw");mysql_select_db("create_21D",$link);$ask="insert into Registration (First_Name,Last_Name,Address,City,express,Zip_Code,domiciliate_telecommunicate,Cell_Phone,E_Mail,Membership_No,make noise_No,First_Class,Transmitter_Frequency,Transponder_No,bring in_Transponder,Second_Class,Transmitter_Frequency2,Transponder_No2,bring in_Transponder2,Ability_Skill_Level,go_go out,bring in,IP_Address,Date_Posted) values ('".$FirstName."','".$LastName."','".$Address."','".$City."','".$State."','".$ZipCode."','".$HomePhone."','".$CellPhone."','".$EMail."','".$MembershipNo."','".$RoarNo."','".$FirstClass."','".$TransmitterFrequency."','".$TransponderNo."','".$TrackTransponder."','".$SecondClass."','".$TransmitterFrequency2."','".$TransponderNo2."','".$TrackTransponder2."','".$AbilitySkillLevel."','".$RaceDate."','".$Track."','".$IPAddress."','".$DatePosted."')";mysql_ask($query);?>
the $checkArray is an arrange of all of the possible answers the initial value of the email is trimmed for whitespace strips all tags that a malicious user might have tried to code in and it lowers the string to alter sure its in the correct format.$to = gets the determine from the $checkArray according to the name which is the key then you proceed with the mailing
Sorry but as Iam a newbie and stuff Im not fallowing this. Do I put this "email-to" in the form like this<select name="email-to"'bring in' style="font-weight: bold; font-style:italic"><option value='Wichita' selected>Wichita<option value='A Main'>A Main</select>Then where in the process php do I put
this is a segment of the php yes. but in order for this move to work you need to work of what I did initially also. below is the script that combines both the back up portion of this compose is where you are assigning the email to its corresponding address. I only created 2 of them to show you how its done and I am sure you can write my example. 1) make sure the <option value="A Main"> and the key in the arrange("A Main" be.
Forex Groups - Tips on Trading
Related article:
http://www.dynamicdrive.com/forums/showthread.php?t=24307
comments | Add comment | Report as Spam
|