1

I've looked online however I can't seem to get my head around this problem.Below is the screenshot of the code which is showing. I have Apache and MySQL running. Any help would be amazing!

Below is my code for the form.

Name: <input type = "text" name = "Full Name">
MobileNumber: <input type = "interger" name = "Mobile Number">
Email: <input type = "text" name = "Email">
Address: <input type = "text" name = "Address">
PostCode: <input type = "text" name = "Post Code">
Interests: <input type = "text" name = "Interests">
<input type = "submit" value = "Enter">
</form>
Donald Duck
  • 8,409
  • 22
  • 75
  • 99
dave
  • 13
  • 3

1 Answers1

2

Your solution is simple.

You can't run directly PHP as a file. You have tu run it via your localhost (assuming you have PHP installed)

Locate where your "public_html" o "web" or "www" folder is. And that is where you should put/move your PHP files.

After you move your file to the appropriate web folder, you can run it like this:

http://localhost/datanew.php

http://127.0.01/datanew.php

NOTE: when you call a PHP file outside a server environment, you are simply showing the content of your file. But if you call the file through a web server, then web server runs the PHP scripts and outputs the results of your PHP script.

docliving
  • 111
  • 1
  • 6