-2

I have a simple php connection to my database, I think i did most of the process right, but when I hit the submit button it just renders my actual php file on my screen.

rc_dz
  • 461
  • 4
  • 20

1 Answers1

2

Make sure you are using a web server that supports PHP. It is rendering the code because PHP is not processing your code and renders it as text.

Try using another web server or install PHP on your current setup.

Also use MySQLi or PDO for your database part (it's safer and mysql_* is deprecated).

chris85
  • 23,846
  • 7
  • 34
  • 51
Marnix Bouhuis
  • 430
  • 1
  • 6
  • 15