Benjamin Oats Benjamin Oats - 7 months ago 54
HTML Question

write a POST button in codeigniter

I have a simple HTML post with a php variable included as the value, I wish to use this in my codeigniter project what is the best way to do this.

here is my correct code (I do have the form helper)

<form action="" method="POST">
<input id="start-test" type="hidden" name="userid" value="<?php echo htmlspecialchars($userID); ?>;
<input class="btn btn-primary" type="submit" role="button" id=""></input>


I may have misunderstood your question with my first answer.

If all you want is a post button, then you can write this

<input type="submit" class="btn btn-primary" role="button" value="Send" />

Or use the form helper

 <?php echo form_submit('BtnName', 'Send'); ?>
// Would produce:<input type="submit" name="BtnName" value="Send" />