Advertisement
Guest User

Untitled

a guest
Nov 11th, 2014
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.74 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <title>Update</title>
  5.     <link href="style.css" rel="stylesheet" type="text/css" />
  6. <script>
  7.  
  8. function Blank_TextField_Validator(frmContact)
  9. {
  10.     //Trim the value in the field
  11.     frmContact.cid.value = frmContact.cid.value.trim();
  12.     // Check the value of the element named text_name
  13.     // from the form named text_form
  14.     if (frmContact.cid.value == "")
  15.     {
  16.         // If empty display and alert box
  17.         alert("Please fill in the text field.");
  18.         // Place the cursor on the field for revision
  19.         frmContact.cid.focus();
  20.         // return false to stop further processing
  21.         return false;
  22.     }
  23.     // If text_name is not null continue processing
  24.     return true;
  25.  
  26. }
  27.  
  28. </script>
  29. </head>
  30. <body>
  31.     <div class="wrapper">
  32.         <div class="content" style="width: 500px !important;">
  33.             <?php include 'header.php'; ?><br/>
  34.             <div>
  35.             <form name="frmContact" id="frmContact" method="POST" action="index.php" onsubmit="return Blank_TextField_Validator(this)">
  36.                 <input type="hidden" name="ContactID"
  37.                 value="<?php echo (isset($gresult) ? $gresult["id"] :  ''); ?>" />
  38.                 <table align="center">
  39.                    
  40.                         <tr>
  41.                         <td>
  42.                             <label for="cid">Cx ID: </label>
  43.                         </td>
  44.                         <td>
  45.                             <input type="text" name="cid"
  46.                             value="<?php echo (isset($gresult) ? $gresult["cid"] :  ''); ?>"
  47.                             id="cid" class="txt-fld"/>
  48.                         </td>
  49.                     </tr>
  50.                     <tr>
  51.                         <td>
  52.                             <label for="name">Name: </label>
  53.                         </td>
  54.                         <td>
  55.                             <input type="text" name="name"
  56.                             value="<?php echo (isset($gresult) ? $gresult["name"] :  ''); ?>"
  57.                             id="name" class="txt-fld"/>
  58.                         </td>
  59.                     </tr>
  60.                     <tr>
  61.                         <td>
  62.                             <label for="email">Email: </label>
  63.                         </td>
  64.                         <td>
  65.                             <input type="text" name="email"
  66.                             value="<?php echo (isset($gresult) ? $gresult["email"] :  ''); ?>"
  67.                             id="email" class="txt-fld"/>
  68.                         </td>
  69.                     </tr>
  70.                     <tr>
  71.                         <td>
  72.                             <label for="points">Points: </label>
  73.                         </td>
  74.                         <td>
  75.                             <input type="text" name="points"
  76.                             value="<?php echo (isset($gresult) ? $gresult["points"] :  ''); ?>"
  77.                             id-"points" class="txt-fld"/>
  78.                         </td>
  79.                     </tr>
  80.                     </table>
  81.                 <input type="hidden" name="action_type" value="<?php echo (isset($gresult) ? 'edit' :  'add');?>"/>
  82.                 <div style="text-align: center; padding-top: 30px;">
  83.                     <input class="btn" type="submit" name="save" id="save" value="Save" />
  84.                 <!--    <input class="btn" type="submit" name="save" id="cancel" value="Cancel"
  85.                     onclick=" return GotoHome();"/> -->
  86.                 <input class="btn" type=button onClick="parent.location='index.php'" value="Home"/>
  87.                 </div>
  88.             </form>
  89.             </div>
  90.         </div>
  91.     </div>
  92. </body>
  93. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement