Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <style type="text/css">
- table{
- color: #ffffff;
- }
- </style>
- <script type="text/javascript">
- function validate(){
- var filter = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
- if(document.text.message.value == "" || document.text.p1.value == "" || document.text.p2.value == "" || document.text.p3.value == "" || document.text.email.value == ""){
- alert("Error: All fields must be filled out");
- return false;
- } else {
- if(filter.test(document.getElementById('email').value) == false){
- alert("Error: Invalid email address");
- return false;
- } else {
- return true;
- }
- }
- }
- </script>
- <script type="text/javascript">
- function move(field,nextElem) {
- if(field.value.length >= field.maxLength){
- document.getElementById(nextElem).focus();
- }
- }
- </script>
- </head>
- <div align='center'>
- <body onLoad="document.text.p1.focus();" bgcolor='#00000'>
- <font color="white">
- <p><H3>Send Free Text Messages!</H3></p>
- <form name='text' action='text.php' method='POST' onSubmit="return validate();">
- <table>
- <tr>
- <td>Number To Text: </td><td><input type='text' name='p1' id='p1' size='2' maxlength='3' onKeyUp="move(this,'p2');">
- <input type='text' name='p2' id='p2' size='2' maxlength='3' onKeyUp="move(this,'p3');">
- <input type='text' name='p3' id='p3' size='3' maxlength='4' onKeyUp="move(this,'email');">
- </td>
- </tr>
- <tr>
- <td>Your Email Address: </td><td><input type='text' name='email' id='email'></td>
- </tr>
- <tr>
- <td>Message: </td><td><textarea name='message'></textarea></td>
- </tr>
- <tr>
- <td>Carrier: </td><td>
- <select name='carrier'>
- <option value='verizon'>Verizon</option>
- <option value='att'>ATT</option>
- <option value='tmobile'>Tmobile</option>
- <option value='metropcs'>Metro PCS</option>
- <option value='virgin'>Virgin Mobile</option>
- <option value='vmcanada'>Virgin Mobile Canada</option>
- </select>
- </td>
- </tr>
- <tr>
- <td><input type='submit' value='Send'></td><td><input type='reset' value='Clear'></td>
- </tr>
- </table>
- </form>
- <p><?if($_GET['blank'] == 'true') { ?> Error: Please fill in all fields <? } ?>
- <?if($_GET['send'] == 'true') { ?> Message Sent! You should recieve a confirmation email shortly. <? } ?>
- <?if($_GET['error'] == 'true') { ?> Error: Message could not be sent <? } ?>
- <?if($_GET['inemail'] == 'true') { ?> Error: Invalid Email Address <? } ?>
- </p>
- </font>
- </body>
- </div>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement