Nathan, I do not have a hard coded string for "Changed database context to Database." It is simply the get_last_message function like below: if (!empty($check_comments)) { echo "Do Something"; } or die ("Query failed: <br />".mssql_get_last_message()); O M G! I am a tard! my "Do Something" was a series of insert statements, each of them having the or die ("Query failed: <br />".mssql_get_last_message()); at the end. My very last "or die" message was OUTSIDE of the closing curly brace! And as such it was trying to execute a query that didn't exist because its condition had not been met! On 10/23/07, Nathan Nobbe <quickshiftin@xxxxxxxxx> wrote: > > On 10/23/07, Dan Shirah <mrsquash2@xxxxxxxxx> wrote: > > > > doing a var_dump($_POST['comments']; > > > > returns string(0) "" > > > > So the value of $comments in $comments = $_POST['comments']; SHOULD be > > equal to 0 or "", right? > > > > In which case when I do my original: > > > > if (!empty($comments)) { > > echo "Do Something"; > > } > > > > It SHOULD just bypass that and continue with my code, but instead it > > gives me the error, "Changed database context to Database." > > > > i think we are missing something; perhaps you can show us the portion of > code that contains the string > "Changed database context to Database." > > it seems to me like the echo statement is getting skipped over, otherwise > you would see the string "Do Something". > since it is getting bypassed, that statement is not getting executed and > processing is continuing probly to the point > where the string about the database is echoed out. > > -nathan > > >