Jump to content

simple security issue


user4fun

Recommended Posts

if i would start my php files with *************<?php$host="localhost"; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name="test"; // Database name $tbl_name="guestbook"; // Table name ********************in order to connect to mysql and add, update, insert records and stuff? What would happen if someone uses their Internet explorerto click on view, then source?that would give them my local host, username, password, and everthing else right???if that is correct, how can i make that information invisible or something?

Link to comment
Share on other sites

When the server executes a php page it does what is called 'parsing' the php. It reads everything between the php tags and executes that code. Once the script is executed the php is removed before the html is submitted to the browser, the php tags and everything between them is removed, thus making your page secure.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...