1
In my project I am creating buttons (in exchange for a form) with the name of the tasks to register daily, so it becomes more practical and faster to register.
Code with the buttons:
<div class="form-group">
<label class="col-md-4 control-label" for="PequenoAlmoco" id="acao"></label>
<div class="col-md-4">
<button id="PequenoAlmoco" name="PequenoAlmoco" class="btn btn-info">Pequeno Almoço</button>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="Almoco" id="acao"></label>
<div class="col-md-4">
<button id="Almoco" name="Almoco" class="btn btn-info">Almoço</button>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="Lanche" id="acao"></label>
<div class="col-md-4">
<button id="Lanche" name="Lanche" class="btn btn-info">Lanche</button>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="Jantar" id="acao"></label>
<div class="col-md-4">
<button id="Jantar" name="Jantar" class="btn btn-info">Jantar</button>
</div>
</div>
My problem is how I save tasks that the user clicks on variables and do the insert
in the database table.
Your question seems too wide, I think you need more of a tutorial than a more specific help. Have you looked at the other questions about entering data with php right here on the site? Like this: https://answall.com/questions/76766/comort-insert-com-valores-postados-em-textarea and https://answall.com/questions/248757/comort-valor-no-mysql-com-php-e-ajax
– Ricardo Pontual