Potatobob Potatobob - 1 month ago 7
HTML Question

How to use "HTML form target self"?

I have a database with some numbers assigned to a fake account (PHP).
I try to contact the database (with success) and get the right result from the form.

My issue is that the form result open a new page and display there...
I would really like the result to be displayed IN the module I use to send the form OR anywhere else on the same page I used to send the form.

<!DOCTYPE html>
<html>
<body>

<form
method="post"
action="http://ggdbase.dx.am/impulseGetInfo.php"
target="_self">

Account name:<br>
<input type="text" name="name" value="derps">
<br>
<input type="submit" value="Click To Load Account Info">
</form>

</body>
</html>


This is what the module look like (on Enjin.com)

enter image description here

This is what I get when clicking the button

enter image description here

I did try replacing '_self' with '_blank' or parent and all the other options I could find but none of them gave me a different result :S

Could it be caused by the Enjin system itself ?

Answer

Do not use target. And replace the action as

action=""

This will ensure that you are calling the same page. Write the PHP code there itself.

Hope that help!