User input in PHP.
I have just started learning php.I am confused about taking some input from user like we do in python or java.
PHP is a little weird in the sense that it relies on HTML to gather all of its information and data, meaning that you can't take user input directly in from your PHP code. The way that you do so is by implementing a form within your HTML code and linking it to your PHP file (because of this, you can't really take user input with PHP on Sololearn). Hope this helped! d:
Actually, You CAN use the command line to have input from. It is like any other language, You have STDIN. If You want to read data sent via the network, The best option is to use POSTMAN or create a simple page which will utilize methods such as (ofc) GET, POST, PUT and handle them. To create a handle for STDIN use: "fopen ("php://stdin","r");"
Spaarwiel Yeah, PHP works better (for what I know) when separated by a file
Faisal so you can have all your php in different files? https://www.sololearn.com/discuss/1325020/?ref=app
Bug: Sololearn notification is still showing number in the notification icon even i did mark as read
Finished python for beginners
Izzy the iguana code coach
C++ Question re stringstream
Why sometimes 0 is printed?