Angel ofDemons Angel ofDemons - 7 months ago 9
PHP Question

Passing variable in a URL not working

So as usually I put in information in the url leading towards another page like this:

<form action="index.php?type=question">
<input class="log-btn extra" type="submit" value="Home">
</form>


Usually it always works, I even copy pasted it because I've used the exact same url before and on the other page it works but doesn't on this one it just returns empty after the questionmark like this:


index.php?

Answer

Try using a method='post' on your form like

<form action="index.php?type=question" method='post'>
 <input class="log-btn extra" type="submit" value="Home">

like it has been mentioned before in the comments. Should work!

Comments