I am designing a restful web app to access mysql database's table. The flow of the process i am intending is like this, user fills form and submit to php then from that php it will send request to another php which will then print out the specific data.
It contain of 3 files:
- form in html
- client in php
- server in php
So far i have manage to pass the data entered by user in html form to client PHP using if(isset($_GET["input"]
.
Before i go any further i have a question, is it possible to pass a user input variable from a php to another php using $request = file_get_contents? if so, could you please enlighten me with the right ways.
Much regards, fellow stackoverflow user
You would not be able to execute localy like this
file_get_contents('path/to/file.php');
Bud you can bypass this by making http call
file_get_contents('http://yourdomain.com/file.php?input='.$_GET['input']);
Bud it is not recomended.. Is there any specific reason you have to call the second script?