C
cj
Guest
I am horrible at programming and I was wondering if anyone could help me with this. Thanks in advance if you can or point me in the right direction.
This is the instructions my teacher gave me:
Write a stand-alone web page that contains a signup form for a textbook rental service. Fields include first name, last name, real address, e-mail address, cell number, account password, credit card number, CC expiration date, name on CC, and CC cvvs value. Feel free to add more fields if you like.
But here's the thing: I want it to be a security and data quality nightmare. Don't check any data types, don't look for empty fields, leave the CC data and password in plain text. And worst of all, don't prevent the user from entering code into text fields.
Then, when the user has filled out the form and pressed the "submit" button, I want you to take all the data and repeat it on the bottom of the form in text, ostensibly for validation purposes. Use innerHTML to fill a <div> with it or something. Make it look neat, sort of like e-commerce systems do right before you "press to submit your order".
That way, if the last name (or any text¬) field had <script>alert("ugh");<script> in it, that would execute once you put it in the innerHTML of a div on the screen.
Instead of innerHTML, experiment with document.write.
This is the instructions my teacher gave me:
Write a stand-alone web page that contains a signup form for a textbook rental service. Fields include first name, last name, real address, e-mail address, cell number, account password, credit card number, CC expiration date, name on CC, and CC cvvs value. Feel free to add more fields if you like.
But here's the thing: I want it to be a security and data quality nightmare. Don't check any data types, don't look for empty fields, leave the CC data and password in plain text. And worst of all, don't prevent the user from entering code into text fields.
Then, when the user has filled out the form and pressed the "submit" button, I want you to take all the data and repeat it on the bottom of the form in text, ostensibly for validation purposes. Use innerHTML to fill a <div> with it or something. Make it look neat, sort of like e-commerce systems do right before you "press to submit your order".
That way, if the last name (or any text¬) field had <script>alert("ugh");<script> in it, that would execute once you put it in the innerHTML of a div on the screen.
Instead of innerHTML, experiment with document.write.