Hello everyone ,,there are any constraints to run php code in chrome ? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Hello everyone ,,there are any constraints to run php code in chrome ?

I have 2 file ,first one main.html have a form and second one welcome.php to print data fields after submit,when click in submit it is install welcome.php!!! Why?? _______________main.html________________ <html> <body> <formĀ action="welcome.php"Ā method="post"> Name:Ā <inputĀ type="text"Ā name="name"><br> E-mail:Ā <inputĀ type="text"Ā name="email"><br> <inputĀ type="submit"> </form> </body> </html> _____________welcome.php_______________ <html> <body> Welcome <?php echo $_POST["name"]; ?><br> Your email address is: <?php echo $_POST["email"]; ?> </body> </html>

9th Sep 2019, 10:43 AM
Ayah K Alrifai
Ayah K Alrifai - avatar
5 Respostas
+ 6
Do you have a local host like XAMPP installed on your computer?
9th Sep 2019, 11:28 AM
Oma
Oma - avatar
+ 1
Chee-Oma thank you šŸŒ¹šŸŒ¹
9th Sep 2019, 11:51 AM
Ayah K Alrifai
Ayah K Alrifai - avatar
+ 1
Php is server script, it cannot run directly by openning the local php file alone. If your machine os is Windows, you could install local server tool such as XAMPP to form a local php server on your machine first, which allow local browser to open php from C:\xampp\htdocs folder or run php -S index.php cmd to run index.php php file from other folder.
9th Sep 2019, 12:20 PM
CalviÕ²
CalviÕ² - avatar
0
Chee-Oma no , i am beginner in php and i am write codes in this app before learn forms ,i need to download local host in my computer !!?
9th Sep 2019, 11:36 AM
Ayah K Alrifai
Ayah K Alrifai - avatar