php problem | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

php problem

i didn't specify an action attribute for the form, so that it could submit to itself , but every time i run the code and submit the form , on the output tab it shows the coding and not the result can somebody please help me with this , i ran it on my pc and it runs normally code: <?php if (isset($_POST["submitted"]) ) { die("welcome"." ".$_POST["username"]); }?> <form method="post" > enter username :<input type="text" name="username"><br/> <input type="hidden" name="submitted" value="true" > <input type="submit" value="GO" > </form> link : https://code.sololearn.com/wDOfotih8K15/#php

28th Aug 2018, 6:04 AM
kim thapa magar
kim thapa magar - avatar
5 Answers
+ 4
You can use most PHP functions here, but it is certainly limited in this environment. Server-side languages have many limitations in these cases.
28th Aug 2018, 6:25 AM
Mickel
Mickel - avatar
+ 3
PHP codes can not make calls to the server in Code Playground as far as I know, whenever I've tried it, that behavior you specify occurs.
28th Aug 2018, 6:15 AM
Mickel
Mickel - avatar
+ 2
so for the above code to run property it is not possible onsololearn ?
28th Aug 2018, 6:59 AM
kim thapa magar
kim thapa magar - avatar
+ 2
Brent Meeusen but doesn't not specifying action imply specifying action to itself and like you said setting action to other .php file was the idea but file not found error shows up so i tried this but neither seems to be working for me
28th Aug 2018, 7:53 AM
kim thapa magar
kim thapa magar - avatar
+ 2
Yeah Brent Meeusen Sololearn barely supports php thats why php code are hardly seen
28th Aug 2018, 12:23 PM
Femi
Femi - avatar