The JS code is as follows & quot; functionSubmitApply () {varformGlobal. getElement (& quot; # submitForm & quot;); varUserNameGlobal. getElement (form, & #39; input [name & quot; Name & quot;] & #39 ;). value; varMobileGlobal. getElement (form, & #39; input [name & quot; Tel & quot;] & #39 namephp form post
The JS code is as follows:
Function SubmitApply () {var form = Global. getElement ("# submitForm"); var UserName = Global. getElement (form, 'input [name = "Name"] '). value; var Mobile = Global. getElement (form, 'input [name = "Tel"] '). value; var Position = Global. getElement (form, 'input [name = "Position"] '). value; var Company = Global. getElement (form, 'input [name = "Company"] '). value; var ActId = Global. getElement (form, 'input [name = "Actid"] '). Value; if (Global. isNullOrWhitesapce (UserName) {Global. tip. tipError ("name required"); return;} if (Global. isNullOrWhitesapce (Mobile) {Global. tip. tipError ("mobile phone is required"); return;} if (/^ 1 [3 | 4 | 5 | 8] [0-9] \ d {} $ /. test (Mobile) = false) {Global. tip. tipError ("incorrect mobile phone format"); return;} var ajaxRequest = new HttpAjaxRequest (); ajaxRequest. ajax ({dataType: 'json', url: '', data: {name: UserName, mobile: Mobile, Companyname: Company, position: Position, actid: ActId}, successed: OnSubmitAppplySuccesse, error: function () {Global. Tip. TipError ('submission failed! '); GlobalPlayer. disableNext () ;}}) ;}/ *** name: Application submitted successfully */function OnSubmitAppplySuccesse (data) {if (data. code = 0) {Global. tip. tipMessage ('submitted successfully! '); Var form = Global. getElement ("# submitForm"); GlobalPlayer. enableNext (); GlobalPlayer. playNext (); form. reset ();} else {Global. tip. tipError ('submission failed! '+ Data. Message); GlobalPlayer. DisableNext ();}}
Which of the following good guys can help me write a complete PHP code to accept the source code? I am a little bit confused (already crying)