Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Update</title>
- <link href="style.css" rel="stylesheet" type="text/css" />
- <script>
- function Blank_TextField_Validator(frmContact)
- {
- //Trim the value in the field
- frmContact.cid.value = frmContact.cid.value.trim();
- // Check the value of the element named text_name
- // from the form named text_form
- if (frmContact.cid.value == "")
- {
- // If empty display and alert box
- alert("Please fill in the text field.");
- // Place the cursor on the field for revision
- frmContact.cid.focus();
- // return false to stop further processing
- return false;
- }
- // If text_name is not null continue processing
- return true;
- }
- </script>
- </head>
- <body>
- <div class="wrapper">
- <div class="content" style="width: 500px !important;">
- <?php include 'header.php'; ?><br/>
- <div>
- <form name="frmContact" id="frmContact" method="POST" action="index.php" onsubmit="return Blank_TextField_Validator(this)">
- <input type="hidden" name="ContactID"
- value="<?php echo (isset($gresult) ? $gresult["id"] : ''); ?>" />
- <table align="center">
- <tr>
- <td>
- <label for="cid">Cx ID: </label>
- </td>
- <td>
- <input type="text" name="cid"
- value="<?php echo (isset($gresult) ? $gresult["cid"] : ''); ?>"
- id="cid" class="txt-fld"/>
- </td>
- </tr>
- <tr>
- <td>
- <label for="name">Name: </label>
- </td>
- <td>
- <input type="text" name="name"
- value="<?php echo (isset($gresult) ? $gresult["name"] : ''); ?>"
- id="name" class="txt-fld"/>
- </td>
- </tr>
- <tr>
- <td>
- <label for="email">Email: </label>
- </td>
- <td>
- <input type="text" name="email"
- value="<?php echo (isset($gresult) ? $gresult["email"] : ''); ?>"
- id="email" class="txt-fld"/>
- </td>
- </tr>
- <tr>
- <td>
- <label for="points">Points: </label>
- </td>
- <td>
- <input type="text" name="points"
- value="<?php echo (isset($gresult) ? $gresult["points"] : ''); ?>"
- id-"points" class="txt-fld"/>
- </td>
- </tr>
- </table>
- <input type="hidden" name="action_type" value="<?php echo (isset($gresult) ? 'edit' : 'add');?>"/>
- <div style="text-align: center; padding-top: 30px;">
- <input class="btn" type="submit" name="save" id="save" value="Save" />
- <!-- <input class="btn" type="submit" name="save" id="cancel" value="Cancel"
- onclick=" return GotoHome();"/> -->
- <input class="btn" type=button onClick="parent.location='index.php'" value="Home"/>
- </div>
- </form>
- </div>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement