Npc Bugadi Posted July 8, 2020 at 12:07 AM Report Share #618701 Posted July 8, 2020 at 12:07 AM Desculpe se postei errado, primeiro dia no forum; Eu comecei a estudar php ontem, queria saber se tem alguma maneira de colocar uma barra de edit como essa: <td width="25%">Quantidade de Moedas</td> <td> <input type="text" value="1" size="5" maxlength="5" $Test > </td> E dependendo dq a pessoa colocar dentro.. ela seguir uma determinada url, por exemplo se ela deixar o numero 1, e apertar algum button associado a essa barra de edit( não sei se chamam assim em php) ele seguir a url responsável pelo numero, se colocar o numero 2 seguir outra url, etc Link to comment Share on other sites More sharing options...
XsTeAl Posted July 9, 2020 at 10:13 AM Report Share #618719 Posted July 9, 2020 at 10:13 AM O encaminhamento da página a seguir, podes fazer via JS ou PHP validando o valor do input. Em PHP nas variáveis $_POST, em JS "document.getElementById("myText").value". JS var x = document.getElementById("myText").value; if(x==....){ window.location="https://stackoverflow.com"; } PHP $varx = $_POST['input1]; if($varx==....){ header('Location: https://stackoverflow.com'); } 1 Report Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now