+ 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
8 odpowiedzi
+ 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.
+ 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.
+ 2
so for the above code to run property it is not possible onsololearn ?
+ 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
+ 2
Yeah Brent Meeusen
Sololearn barely supports php thats why php code are hardly seen