Butterbean Posted October 15, 2014 Share Posted October 15, 2014 I am trying to learn PHP on my own through examining existing code that I have. It's code written for a database. The web app allows the user to login and interrogate the system for and extract information onto a utility bill. I noticed this nice bit of informational code at the top.... if( $conn ) { echo "Connection established.<br />";}else{ echo "Connection could not be established.<br />"; die( print_r( sqlsrv_errors(), true));} I would expect the output would be "Connection established". or "Connection could not be established". but it reads this. "Connection established. You are currently logged in as" 123456 No where in the code is there a statement that includes "You are currently logged in as". Maybe I'm overlooking something. thanks for any help. I can not send the code because I do not have permission. Any help would be greatly appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/291636-connection-established/ Share on other sites More sharing options...
ginerjm Posted October 15, 2014 Share Posted October 15, 2014 I suggest that the code you are looking at is not the code that is being run at that time. Try altering the message and running it again. Quote Link to comment https://forums.phpfreaks.com/topic/291636-connection-established/#findComment-1493596 Share on other sites More sharing options...
Solution Butterbean Posted October 15, 2014 Author Solution Share Posted October 15, 2014 (edited) Thank you. That was it. So, there is a master sheet somewhere I suppose. Edited October 15, 2014 by Butterbean Quote Link to comment https://forums.phpfreaks.com/topic/291636-connection-established/#findComment-1493597 Share on other sites More sharing options...
ginerjm Posted October 15, 2014 Share Posted October 15, 2014 whatever Quote Link to comment https://forums.phpfreaks.com/topic/291636-connection-established/#findComment-1493599 Share on other sites More sharing options...
Butterbean Posted October 15, 2014 Author Share Posted October 15, 2014 (edited) Any particular reason you were an a#% to me just now? I was kidding that you can make the system good but someone like me will come along and complicate it. Not sure why you felt inclined to act the way you did, but anyway. Edited October 15, 2014 by Butterbean Quote Link to comment https://forums.phpfreaks.com/topic/291636-connection-established/#findComment-1493627 Share on other sites More sharing options...
ginerjm Posted October 15, 2014 Share Posted October 15, 2014 No intent to offend, simply a retort to your bringing up something about your script that had not been mentioned before and had nothing to do with the current discussion. Quote Link to comment https://forums.phpfreaks.com/topic/291636-connection-established/#findComment-1493630 Share on other sites More sharing options...
Butterbean Posted October 15, 2014 Author Share Posted October 15, 2014 (edited) My apologies for overreacting. Thanks for your help. Edited October 15, 2014 by Butterbean Quote Link to comment https://forums.phpfreaks.com/topic/291636-connection-established/#findComment-1493632 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.