Jump to content

LostinSchool

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

LostinSchool's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. you are really great for helping me! I also looked into some tutorials... I found this code: <?php $Name = addslashes($_POST["name"]); $Department = addslashes($_POST["department"]); $Position = addslashes($_POST["position"]); Will that post it to the text file or just in another browser?
  2. Awesome thank you... at least I know what to look for. I just finished my javascript code and it works fine... Now I just have to figure out how the submit button will lead to a text file.
  3. omg i got it to work! 1 damm out of place bracket that I just caught. Thanks you extremely helpful!!!
  4. Also this isn't supposed to use server side scripting. But the window alerts should work for items that are not filled out- for some reason they don't. I pretty much copied and modified an example right from our text book and that one worked so I don't know why mine wont...
  5. wow thanks... did you use the W3c validator? b/c when I used that everything validated just fine (it didn't list any errors)
  6. Thanks- I will try to interpret what you said the best I can... I would post sample code but like I said I have no idea what the functions or code things even are. I am a graphic design major so as you can see there is not much use for this stuff. At this point I just want to pass but it looks like that probably isn't happening. Looks like its gonna be an all nighter for me. My javascript take home took me 3 hours to do and I'm sure this will take me even longer.... and I'm also sure its something you guys can do in 5 minutes!! Thanks for tryin I appreciate it. Kate
  7. Thanks so much for trying to help me!!! I really really do appreciate it. I am not looking for you to do my homework for me... but I'm telling you I am in tears right now because I have been reading this book for the past like 7 hours and it is just not sinking in. My teacher hasn't taught me ANYTHING... that's why I'm here. I don't get it, and even your response might as well have been in Chinesebecause I don't really understand it. Is there anyway you can tell me a sample of the code one would use that would submit this form to a text file? Or at least just the function or whatever its called? Oh and on a sidenote, the whole time I've been in class I have never even used Apache because we are blocked from downloading it on our computers at school, so there is no way to even check our work. And I wasn't able to download it at home... so that is part of the reason I am so lost. I honestly just want to get through this class and move on and never do PHP again in my life!!!!!! If there was something Icould help you with in return I would! I'm desperate.... Thanks so so so much.
  8. Just to clarify- I appreciate any kind of help anyone can offer- either a sample code, or even a link to a tutorial that shows how to do that (if anyone out there can just point in the right direction I would really really really appreciate it!) I am just majorly freaking out! ???
  9. I wrote this code for a hw assignment- its a simple submission form for a website. But I tried to include window alerts for unanswerd fields in the form, but that doesn't show up... and when it's submitted nothing happens. It goes to my link "FormProcessor.html" but it doesn't summarize the info like it's supposed to. Here is my code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Registration Form</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="js_styles.css" type="text/css" /> <script type="text/javascript"> /* <![CDATA[ */ function checkForNumber(fieldValue) { var numberCheck = isNaN(fieldValue); if (numberCheck == true) { window.alert("You must enter a numeric value!"); return false; } } function confirmPassword() { if (document.forms[0].password_confirm.value != document.forms[0].password.value) { window.alert("You did not enter the same password!"); document.forms[0].password.focus(); } } function confirmSubmit() { if (document.forms[0].name.value == "" || document.forms[0].address.value == "" || document.forms[0].city.value == "" || document.forms[0].state.value == "" || document.forms[0].zip.value == "" || document.forms[0].email.value == "" || document.forms[0].telephone.value == "") { window.alert("You must enter your personal information."); return false; } else } return true; } function confirmReset() { var resetForm = window.confirm("Are you sure you want to reset the form?"); if (resetForm == true) return true; return false; } } /* ]]> */ </script> </head> <body> <h1>Registration Form</h1> <form action="FormProcessor.html" method="post" enctype="application/x-www-form-urlencoded" onsubmit="return confirmSubmit();" onreset="return confirmReset();"> <table border="2" cellpadding="1" cellspacing="2"> <tr><th colspan="20"><h2>Personal Information</h2> </th> </tr> <tr> <td><h3>Name:</h3></td> <td><input type="text" name="name" size="50" value="Enter your name" onfocus="this.value = '';" /></td> </tr> <tr> <td><h3>Address:</h3></td> <td><input type="text" name="address" size="50" value="Enter your address" onfocus="this.value = '';" /></td> </tr> <tr> <td><h3>City:</h3></td> <td><input type="text" name="city" size="50" value="Enter your city" onfocus="this.value = '';" /></td> </tr> <tr> <td><h3>State:</h3></td> <td><input type="text" name="state" size="2" maxlength="2" /></td> </tr> <tr> <td><h3>Zip Code:</h3></td> <td><input type="text" name="zip" size="5" maxlength="5" onchange="return checkForNumber(zip.value);"/></td> </tr> <tr> <td><h3>Email Address:</h3></td> <td> <input type="text" name="email" size="50" value="Enter your email address." onfocus="this.value = '';"/> </td> </tr> <tr> <td><h3>Telephone:</h3></td> <td> <input type="text" name="telephone" size="10" maxlength="10" onchange="return checkForNumber(telephone.value);"/> </td> </tr> </table> <table border="1" cellpadding="1" cellspacing="2"> <tr> <th colspan="5"> <h2>Security Information</h2> </th> </tr> <tr> <td><h3>Password:</h3></td> <td><input type="password" name="pass" /></td> </tr> <tr> <td><h3>Password (Confirm):</h3></td> <td><input type="password" name="password" onblur="confirmPassword();" /></td> </tr> <tr> <td><h3>Security Question:</h3></td> <td> <select name="question"> <option>Please select a security question:</option> <option>What is your mother's maiden name?</option> <option>What is the name of your pet?</option> <option>What is your favorite color?</option> </select> </td> </tr> <tr> <td><h3>Security Answer:</h3></td> <td><input type="text" name="telephone" value="Enter your answer" onfocus="this.value = '';"/></td> </tr> </table> <table border="1" cellpadding="1" cellspacing="2"> <tr> <th colspan="5"> <h2>Preferences</h2> </th> </tr> <tr> <td><h3>Would you like to recieve special email offers and coupons?</h3> <input type="radio" name="offers" value="Yes" />Yes <input type="radio" name="offers" value="No" />No </td> </tr> <tr> <td><h3>Interests:</h3> <p>Let us know what your interests are (choose all that apply): </p> <input type="checkbox" name="interests" value="entertainment" />Entertainment<br /> <input type="checkbox" name="interests" value="business" />Business<br /> <input type="checkbox" name="interests" value="shopping" />Shopping<br /> <input type="checkbox" name="interests" value="technology" />Technology<br /> <input type="checkbox" name="interests" value="healthfitness" />Health and Fitness<br /> <input type="checkbox" name="interests" value="sports" />Sports<br /> <input type="checkbox" name="interests" value="music" />Music<br /> <input type="checkbox" name="interests" value="currentevents" />Current Events<br /> <input type="checkbox" name="interests" value="food" />Food and Drink<br /> <input type="checkbox" name="interests" value="travel" />Travel<br /> <input type="checkbox" name="interests" value="outdoors" />Outdoors<br /> <input type="checkbox" name="interests" value="fashion" />Fashion<br /> <input type="checkbox" name="interests" value="art" />Art<br /> <input type="checkbox" name="interests" value="pets" />Pets<br /> <input type="checkbox" name="interests" value="other" />Other <br /> <input type="text" name="other" size="80" value="Please specify other interests that are not included." onfocus="this.value = '';"/> </td> </tr> </table> <p> <input type="submit" name="submit" value="Submit" onclick=""/> <input type="reset" name="reset" value="Reset" onclick="confirmReset()" /> </p> </form> </body> </html> Help would be much appreciated!
  10. I am taking beginner Javascript and PHP at the same time. I understand Javascript but am NOT getting PHP at all. The teacher is horrible- I have basically had to teach myself everything on my own. We have a take home test and I am freaking out because I don't even know where to begin. The assignment is to create a form in HTML or javascript (which is fine- I'm ok with that part) But then I need a submit button which saves the data from the form in a text file, AND I need a link for opening a document that displays the items that were submitting using the form. Can someone give me a sample code? This is due tomorrow so answer ASAP! Thanks!!!
×
×
  • 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.