+ 4
Problem with PHP form
I have a form with selects inputs and so on and I want to get these values with PHP after the choice of the user with the select. I've already written an input submit and my form is : <form action = "" type = "get"> So the problem is that when the user click on the submit button to send its informations, it opens a real webpage (for me it's google but the user is automatically redirected on a webpage outside the application... My question is : How can I do to continue on the Sololearn application, use PHP ?
10 Answers
+ 2
Pour php il faut un serveur (xampp par exemple) et là les forms peuvent fonctionner en méthode get ou post
For php, you need to have a server (xampp for example), then the form are able to work with the get and the post method
+ 1
Ok Thank you very much ! It helps me a lot... So do you know the best technik to ask the user (for example date of birth or country, so from a list) without use a form method ? Thank you !
+ 1
Et en passant c'est cool qu'il y ait d'autres fr xD
+ 1
Ok so with JavaScript it's possible to ask the user in real time ?
+ 1
Ah ok j'ai compris merci à vous deux ! Du coup je vais réviser le JS et je faire comme ça ! Mrc !
0
wesh le français
You cannot create a form in Code Playground as it doesn't support multiple pages in one code.
If you have a PC, install WAMP, set it up and you will be able to create forms that do not redirect you to Google.
0
Je pense que ça serait possible qu'avec JavaScript
I think it would be only possible with JavaScript
0
oui, avec les events de type "onclick", "onchange"... mais ils seront pas envoyés à toi (sur SoloLearn on peut pas faire ça vu qu'on a pas de stockage
Yes, with events like onclick, onchange, but they won't be sent to you, only the client (not possible on Sololearn)
0
Thank you I will use JS !
0
si t'installes xampp/WAMP pas besoin de JS pour le formulaire.
mais c'est pas un problÚme de l'apprendre ça sera utile