user4fun Posted February 15, 2006 Share Posted February 15, 2006 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 More sharing options...
gsmith Posted February 15, 2006 Share Posted February 15, 2006 No, the users shouldn't see that.They'll see any HTML tags that are generated from your php code, but no php code itself on that page. Link to comment Share on other sites More sharing options...
DarkElf Posted February 20, 2006 Share Posted February 20, 2006 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now