Jump to content

Lokee116

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Lokee116's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello I'm creating a simple application form for a client. They would like a spot to enter an Auth Code and depending on the code it would return the user to one of a few different pages. ex. if they enter the Auth Code "2231" the user would see page "A" after submission.. if they enter Auth Code "4322" the user would be directed to page "B" and so on. I Think this can be achived with some if / if else statements but my php is pretty rusty in fact I cant even get the completed form to e-mail to us right. I'm using spry validations and inputs. and I can't seem to get my PHP right. any help would be greatly appreciated. some more details: I need the form data to be sent to an e-mail address and have the Auth Code compared and redirect the user to the completed page accordingly. the html code: <form id="dapp" name="dapp" method="post" action="SubmitChecker.php" onsubmit="return mySubmit(this);"> <table> <tr> <td>Business Name:</td> <td> <span id="sprytextfield1"> <input name="bname" type="text" value=""/><br /> <span class="textfieldRequiredMsg">Business Name is required.</span></span></td></tr> <tr> <td>Business Type:</td> <td> <span id="sprytextfield2"> <input name="btype" type="text" value=""/><br /> <span class="textfieldRequiredMsg">Business Type is required.</span></span></td></tr> <tr> <td>Name:</td> <td> <span id="sprytextfield3"> <input name="name" type="text" value=""/><br /> <span class="textfieldRequiredMsg">Name is required.</span></span></td></tr> <tr> <td>E-Mail:</td> <td> <span id="sprytextfield4"> <input name="email" type="text" value=""/><br /> <span class="textfieldRequiredMsg">E-Mail is required.</span> <span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td></tr> <tr> <td>Business Phone:</td> <td> <span id="sprytextfield5"> <input name="bphone" type="text" value=""/><br /> <span class="textfieldRequiredMsg">Business Phone Number is required.</span> <span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td></tr> <tr> <td>Your Phone:</td> <td> <span id="sprytextfield6"> <input name="phone" type="text" value=""/><br /> <span class="textfieldRequiredMsg">Your Phone Number is required.</span> <span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td></tr> <tr> <td>Address:</td> <td> <span id="sprytextfield7"> <input name="addr" type="text" value=""/><br /> <span class="textfieldRequiredMsg">Address is required.</span></span></td></tr> <tr> <td>City:</td> <td> <span id="sprytextfield8"> <input name="city" type="text" value=""/><br /> <span class="textfieldRequiredMsg">City is required.</span></span></td></tr> <tr> <td>State:</td> <td><div id="State"> <span id="validsel1"> <select name="State" id="select1" tabindex="1"> <option value="">Please choose your state</option> <option value="Alabama">Alabama</option> <option value="Alaska">Alaska</option> <option value="Arizona">Arizona</option> <option value="Arkansas">Arkansas</option> <option value="California">California</option> <option value="Colorado">Colorado</option> <option value="Connecticut">Connecticut</option> <option value="Delaware">Delaware</option> <option value="Florida">Florida</option> <option value="Georgia">Georgia</option> <option value="Hawaii">Hawaii</option> <option value="Idaho">Idaho</option> <option value="Illinois">Illinois</option> <option value="Indiana">Indiana</option> <option value="Iowa">Iowa</option> <option value="Kansas">Kansas</option> <option value="Kentucky">Kentucky</option> <option value="Louisiana">Louisiana</option> <option value="Maine">Maine</option> <option value="Maryland">Maryland</option> <option value="Massachusetts">Massachusetts</option> <option value="Michigan">Michigan</option> <option value="Minnesota">Minnesota</option> <option value="Mississippi">Mississippi</option> <option value="Missouri">Missouri</option> <option value="Montana">Montana</option> <option value="Nebraska">Nebraska</option> <option value="Nevada">Nevada</option> <option value="New Hampshire">New Hampshire</option> <option value="New Jersey">New Jersey</option> <option value="New Mexico">New Mexico</option> <option value="New York">New York</option> <option value="North Carolina">North Carolina</option> <option value="North Dakota">North Dakota</option> <option value="Ohio">Ohio</option> <option value="Oklahoma">Oklahoma</option> <option value="Oregon">Oregon</option> <option value="Pennsylvania">Pennsylvania</option> <option value="Rhode Island">Rhode Island</option> <option value="South Carolina">South Carolina</option> <option value="South Dakota">South Dakota</option> <option value="Tennessee">Tennessee</option> <option value="Texas">Texas</option> <option value="Utah">Utah</option> <option value="Vermont">Vermont</option> <option value="Virginia">Virginia</option> <option value="Washington">Washington</option> <option value="West Virginia">West Virginia</option> <option value="Wisconsin">Wisconsin</option> <option value="Wyoming">Wyoming</option> </select> <br/> <span class="selectRequiredMsg">Please choose your state.</span> </span> </div></tr> <tr> <td>Zip Code:</td> <td> <span id="sprytextfield9"> <input name="zip" type="text" value=""/><br /> <span class="textfieldRequiredMsg">Zip Code is required.</span> <span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td></tr> <tr> <td>Auth Code:</td> <td> <span id="sprytextfield10"> <input name="auth" type="text" value=""/><br /> <span class="textfieldRequiredMsg">Auth Code is required.</span> <span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td></tr> <tr> <td> <tr> <td colspan="2"><hr width="60%" />To continue please read and accept the <a href="http://www.fastwebtrain.com/tc/Code-A.doc">Terms and Conditions.</a> <center><a href="http://www.fastwebtrain.com/tc/Code-A.doc">Terms and Conditions</a></center> <span id="acceptContainer1"> <label for="accept"> <input type="checkbox" name="accept" id="accept" checked"off" /> I accept</label> <span class="checkboxRequiredMsg">You cannot submit the form until you accept the terms and Conditions agreement!</span> </span></td></tr> <tr> <td> <div class="buttons"> <input type="submit" name="Submit" id="submit" value="Submit"/> <input type="reset" name="Reset" id="reset" value="Reset" /> </div></td></tr> </table> </form> <script type="text/javascript"> <!-- var acceptContainer1 = new Spry.Widget.ValidationCheckbox("acceptContainer1", {isRequired:true, validateOn:["change"]}); var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {isRequired:true, hint:"", validateOn:["change"]}); var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "none", {isRequired:true, hint:"", validateOn:["change"]}); var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "none", {isRequired:true, hint:"", validateOn:["change"]}); var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "email", {isRequired:true, hint:"", validateOn:["change"]}); var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5", "integer", {isRequired:true, hint:"", validateOn:["change"]}); var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield6", "integer", {isRequired:true, hint:"", validateOn:["change"]}); var sprytextfield7 = new Spry.Widget.ValidationTextField("sprytextfield7", "none", {isRequired:true, hint:"", validateOn:["change"]}); var sprytextfield8 = new Spry.Widget.ValidationTextField("sprytextfield8", "none", {isRequired:true, hint:"", validateOn:["change"]}); var sprytextfield9 = new Spry.Widget.ValidationTextField("sprytextfield9", "zip_code", {isRequired:true, hint:"", validateOn:["change"]}); var sprytextfield10 = new Spry.Widget.ValidationTextField("sprytextfield10", "integer", {isRequired:true, hint:"", validateOn:["change"]}); var validsel1 = new Spry.Widget.ValidationSelect("validsel1", {isRequired:true, validateOn:["change"]}); var mySubmit = function(form){ var ret = Spry.Widget.Form.validate(form); if (!ret){ } return ret; } //--> </script> basically i need to write a php that will email the form info to an email and then redirect the user based on the Auth Code they've entered. the form is hosted at http://www.fastwebtrain.com/dapp.html Please help me if you can Im teh sux at php ???
  2. hmm I tried that and still nothing.. I dont understand I cant find any errors in my code, ref links, or file locations... I have php enabled on the server. it seems to work when the flash file is on my local pc and the php is hosted on the web, but when they are both hosted on the web it doesnt work ???
  3. ok seems i do have php PHP Version 4.3.10 System Windows NT WIN2 5.2 build 3790 Build Date Dec 14 2004 17:46:48 Server API CGI/FastCGI Virtual Directory Support enabled Configuration File (php.ini) Path C:\WINDOWS\php.ini PHP API 20020918 PHP Extension 20020429 Zend Extension 20021010 Debug Build no Thread Safety enabled Registered PHP Streams php, http, ftp, compress.zlib Could there be any other reasons why its not working?
  4. Hello, I've made a form in swishmax its part of an advertising splash page. on the submit button i have the following actionscript: on (release) { if ((nameVar=="")||(emailVar=="")||(numberVar=="")||(msgVar=="")) { errormessage="Please fill all the fields"; } else { errormessage="Sending...."; send="yes"; this.loadVariables("http://eznetpro.com/ad/flashq.php",'POST'); nameVar=""; emailVar=""; numberVar=""; msgVar=""; } } I have a file named flashq.php in the specified location. the file looks like this: <? if ($send=="yes") { $to = "flashad@eznetpro.com"; $re = "Question Submission"; $msg .= " Name: "; $msg .=$_POST['nameVar']; $msg .= ", Phone number: "; $msg .=$_POST['numberVar']; $msg .= ", E-Mail: "; $msg .=$_POST['emailVar']; $msg .= ", Question: "; $msg .=$_POST['msgVar']; $tfrom .=$_POST['emailVar']; mail($to,$re,$msg,$tfrom); } echo "&errormessage=Email has been sent&"; ?> Im almost 100% positive that my hosting service supports .php The flash page is being hosted at http://eznetpro.com/ad/eznet.html The problem I'm having is the form isnt being sent. when i launch the flash file from my pc and complete the form it has no problems talking to the php file hosted on the net, and sending the info. but when I upload the flash file and try to complete the form while its hosted online, its not talking to the php and not sending the info.. is there a problem with my code? i cant spot any and im not sure why it would work from my pc but not when hosted online. Please help if you can, or let me know if you need any more info to troubleshoot.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.