Get PHP Coding Help for Beginners | Troubleshooting Tips

  • Thread starter Thread starter sean1234
  • Start date Start date
  • Tags Tags
    Coding Php
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 4K views
sean1234
Messages
40
Reaction score
0
I am just starting out with this and am having trouble getting the code to translate to a webpage. It is not really clear as to how this is to be done. I have created a basic program in notepad, saved it as .php and have attempted to open in IE but get a message that says something about not having the proper devices to run it.

Also I have attempted to run it through XAMPP, but have received errors about SQL syntax or something along those lines. I would appreciate any input on this matter.
 
Last edited:
Physics news on Phys.org
I installed apache on my computer though I am still seeing these problems. Should I be able to run the program through IE with Apache?
 
You should drop the php file in your Apache site root and access it via IE as http://localhost/myphpfile.php

If the PHP file uses SQL you also need to have MySQL installed and configured.
 
Last edited by a moderator:
Apache also needs to have PHP installed and you may have to add some stuff to the Apache config file so it knows to use PHP to interpret .php files.