forms - Pass php variable to another php page -
is possible pass unique $comment->comment_id; php file? want have same id li input button. when clicked want pass variable php "/model/editcomment.php".
<div class="comment-buttons-holder"> <ul class="comment-buttons-holder-ul"> <li id="<?php $comment->comment_id; ?>" class="edit-btn"> <form action ="/model/editcomment.php" method="post"> <input>" type="submit" value="edit"> </form> </li> </ul blockquote
</div> using post
you've got form. utilize hidden input.
<input type="hidden" name="comment_id" value="<?php echo $comment->comment_id; ?>" /> on editcommit.php page, would;
$intcommentid = (isset($_post['comment_id']) , ctype_digit( (string) $_post['comment_id'] )) ? (int) $_post['comment_id'] : 0; using get append action url in query string.
<form action="/model/editcomment.php?id=<?php echo $comment->comment_id; ?>" on editcommit.php page, would;
$intcommentid = (isset($_get['id']) , ctype_digit( (string) $_get['id'] )) ? (int) $_get['id'] : 0; php forms
No comments:
Post a Comment