2
hello I’m making a website and I wanted so the person type the link javascript pick up and send the form but it is sending but when I try to recover with the $_POST it n recovers the value q was sent code q I am using.
<?php echo $_POST['link'] ; ?>
<form name="form" action="" method="POST" id="meuForm" name="meuForm">
<input type="txt" name="link" id="link" class="form-control form-control-lg" placeholder="Link Para Encurtar" onkeydown="myFunction()">
</form>
<script>
function myFunction() {
meuForm.submit();
}
</script>
but will send to the same page?
– Wees Smith
yes so I left the action empty, it works like I put action="#" it sends to the same page , and so has the <?php echo $_POST['link']; ? > to q when send it receive and show the value q is in the input
– romulo henrique
removes the action="", lets without and can delete the script q will work
– Wees Smith