Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script
- src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/core.js">
- </script>
- <script type="text/javascript">
- function clickButton(){
- var phone=document.getElementById('phone').value;
- var id=document.getElementById('id').value;
- $.ajax({
- type:"post",
- url:"userDetaiAjax.php",
- data:
- {
- 'phone' :phone,
- 'id' :id
- },
- cache:false,
- success: function (html)
- {
- alert('Data Send');
- $('#msg').html(html);
- }
- });
- return false;
- }
- </script>
- <div class="col">
- <div class="form-group">
- <h6><label>Name :</label> <?php echo $name ?></h6>
- <h6><label>Email :</label> <?php echo $email ?></h6>
- <input type="" name="phone" id="phone">
- <input type="" name="id" id="id" value="<?php echo $_SESSION["staff_id"];?>" hidden>
- <h6><label>Phone :</label> <?php echo $phone ?></h6>
- <input type="submit" name="aa" value="submit2" onclick="return clickButton();">
- </form>
- <p id="msg"></p>
- </div>
- </div>
- </div>
- </div>
Add Comment
Please, Sign In to add comment