If you really need a link
Just use this format:
<a href="#" onclick="document.nomeDoSeuForm.submit(); return false;">
Applying to your case:
<a href="#" onclick="document.nomeDoSeuForm.submit(); return false;"><?php
echo htmlentities( $this->idPessoa = $lotacao[$i][3] );
?></a>
Note that the htmlentities()
I added has nothing to do with the question, but it's good to use it to make the accent OK. If your variables are already encoded, you can remove them.
If you just need the look of the link
Just use input
normal in form, or even button
:
<input type="submit" name="idPessoa" id="idPessoa" class="meulink"
value="<?php echo $this->idPessoa = $lotacao[$i][3];?>">
And stylize with CSS:
.meulink {
display:inline;
background:transparent;
text-decoration: underline;
border: none;
cursor: pointer;
color: #00f;
}
See working at JS Fiddle