Problem with PHP form | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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 ?

18th Jul 2017, 6:39 AM
Enzo Andreacchio
Enzo Andreacchio - avatar
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
18th Jul 2017, 1:34 PM
Αητοιπe
Αητοιπe - avatar
+ 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 !
18th Jul 2017, 12:12 PM
Enzo Andreacchio
Enzo Andreacchio - avatar
+ 1
Et en passant c'est cool qu'il y ait d'autres fr xD
18th Jul 2017, 12:30 PM
Enzo Andreacchio
Enzo Andreacchio - avatar
+ 1
Ok so with JavaScript it's possible to ask the user in real time ?
18th Jul 2017, 12:34 PM
Enzo Andreacchio
Enzo Andreacchio - avatar
+ 1
Ah ok j'ai compris merci à vous deux ! Du coup je vais réviser le JS et je faire comme ça ! Mrc !
18th Jul 2017, 4:08 PM
Enzo Andreacchio
Enzo Andreacchio - avatar
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.
18th Jul 2017, 12:06 PM
mexikodro thanksgiving samples 1/1
mexikodro thanksgiving samples 1/1 - avatar
0
Je pense que ça serait possible qu'avec JavaScript I think it would be only possible with JavaScript
18th Jul 2017, 12:32 PM
mexikodro thanksgiving samples 1/1
mexikodro thanksgiving samples 1/1 - avatar
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)
18th Jul 2017, 12:37 PM
mexikodro thanksgiving samples 1/1
mexikodro thanksgiving samples 1/1 - avatar
0
Thank you I will use JS !
18th Jul 2017, 4:09 PM
Enzo Andreacchio
Enzo Andreacchio - avatar
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
18th Jul 2017, 4:09 PM
mexikodro thanksgiving samples 1/1
mexikodro thanksgiving samples 1/1 - avatar