mds1256 Posted September 12, 2010 Share Posted September 12, 2010 Hi I am wanting to put my php/mysql queries into a functions file (using php include), I will include that php file at the top of the page which requires the sql query. But.... i have added the query into a function and just wanting to know if it is secure to pass the username and password as arguments when calling the function? e.g. fuctionname($username, $password) Quote Link to comment Share on other sites More sharing options...
mds1256 Posted September 12, 2010 Author Share Posted September 12, 2010 Sorry should have said that the $password and $username are used in the SQL query Quote Link to comment Share on other sites More sharing options...
objnoob Posted September 12, 2010 Share Posted September 12, 2010 Sure... it's not leaving your server. You'll be fine. Just think when you call mysql_connect($host, $user, $pass, $db), your pretty much doing the same thing. Quote Link to comment Share on other sites More sharing options...
mds1256 Posted September 12, 2010 Author Share Posted September 12, 2010 Many thanks, never thought of it that way lol. Cheers again Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.