AlexWebDevelop

Untitled

Dec 23rd, 2020 (edited)
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.53 KB | None | 0 0
  1. <script>
  2. function submitForm(row_id, user_id)
  3. {
  4.     document.getElementById('row_id').value = row_id;
  5.     document.getElementById('user_id').value = user_id;
  6.     document.getElementById('detail_form').submit();
  7. }
  8. </script>
  9.  
  10. <form action="detail.php" method="post" id="detail_form">
  11. <input type="hidden" name="id" id="row_id">
  12. <input type="hidden" name="user_id" id="user_id">
  13. </form>
  14.  
  15. <?php
  16. for(....)
  17. {
  18.     ?>
  19.     <span style="cursor: pointer;" onclick="submitForm(<?php echo $row_id; ?>, <?php echo $user_id; ?>);">READ MORE</span>
  20.     <?php
  21. }
Add Comment
Please, Sign In to add comment