Skip to content
Advertisement

Input Id Name showing to URL?

I have a problem, I am trying to make some forms in bootstrap however it messed up.

Once I converted the forms to bootstrap related they are no longer doing the job they’re supposed to do. What I am trying to do is to save form logs to a txt file, but they won’t save.

When I add name="test" it won’t work, instead it writes in the url.

URL: localhost/save.php?John

save.php

JavaScript

index

JavaScript

Advertisement

Answer

Seeing the comment you left with this code: (edit: you added that in the question just now in an edit)

JavaScript

Forms default to a GET method if there is no POST implied. So you’re getting the ?John back because of it.

Add method="post" in your form.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement