Good morning, I have a problem, because I was using a website sending the data by GET and of course now I am aware of this and I want to modify it to POST so that the data is not displayed. The GET data was sent via URL as follows:
<td>
<a href="?action=editar&id=<?php echo urlencode($r->acronimo); ?>"><img src="icon_editthis.png" width="30px" height="30px"/></a>
</td>
<td>
<a href="?action=eliminar&acronimo=<?php echo urlencode($r->acronimo); ?>"><img src="delete.png" width="30px" height="30px"/></a>
</td>
Now the idea is how to modify that to send it pos POST.
My form is this which should allow modifying or entering data, which for example selected to edit or delete records from the code that I entered before.
<form action="?action=<?php echo isset($obj_categoria) ? 'actualizar' : 'registrar'; ?>" method="POST" class="pure-form pure-form-stacked" style="margin-bottom:30px;">
<input type="hidden" name="id" value="<?php echo isset($obj_categoria) ? $obj_categoria->__POST('acronimo') : ''; ?>" />
<table style="width:500px;">
<tr>
<th style="text-align:left;">Acronimo</th>
<td><input type="text" name="acronimo" value="<?php echo isset($obj_categoria) ? $obj_categoria->__POST('acronimo') : ''; ?>" style="width:100%;" required /></td>
</tr>
<tr>
<th style="text-align:left;">Categoria</th>
<td><input type="text" name="categoria" value="<?php echo isset($obj_categoria) ? $obj_categoria->__POST('categoria') : ''; ?>" style="width:100%;" required/></td>
<td colspan="2">
<button type="submit" class="pure-button pure-button-primary">Guardar</button>
</td>
</tr>
</table>
</form>
So in summary is can I use URL to go through POST or how should I do it?
If it wasn't possible, how could it be then, thanks in advance
To send the information by post you must send the data using a form.
For example: