+ 9

Forms in JS and PHP in Sololearn

I know this has been answered before in different ways. The answers I found did not get me to clearly understand what happens. If I try to get info from a user using html, neither PHP nor JS scripts retrieve results as I expect here in JS. Scripts alone work without trying to use a form (randomizing a number, for instance, as in my Primes in JS code), but if I make them a function and try to run them getting the info from a form, something goes awkward. Any ideas? Thanks.

16th Mar 2019, 10:13 AM
D.R.
D.R. - avatar
5 Respuestas
+ 6
After doing some searching, I found a discussion that mentions server side calls don't work on SoloLearn's playground for PHP and that it'll work if you use a real server. https://www.sololearn.com/Discuss/1287135/?ref=app Edit: It'll be great if someone managed to find a solution for your issue despite the lack of a server side support for PHP.
17th Mar 2019, 7:00 AM
silentlearner
silentlearner - avatar
+ 5
I'm not sure if this is what you're looking for, but I got to understand how PHP forms work by going along with this YouTube tutorial. I hope it can help you too. https://youtu.be/3xRMUDC74Cw
16th Mar 2019, 10:37 AM
silentlearner
silentlearner - avatar
+ 4
Super thanks, silentlearner. I'll make sure to check this out.
16th Mar 2019, 10:39 AM
D.R.
D.R. - avatar
+ 4
Hi, silentlearner. Thanks for answering. It was not exactly what I was looking for. I'm trying to find a way for "post" to work with php in SL. That goes along with CRUD, though. That will be really helpful in the future, I'm sure.
16th Mar 2019, 11:05 PM
D.R.
D.R. - avatar
+ 4
A friend actually help me solve the form problem for JS. What I'm looking for is related to this simple code: https://code.sololearn.com/w5JJvqRvr88A/?ref=app
16th Mar 2019, 11:06 PM
D.R.
D.R. - avatar