There is no question.
Sometimes (note "sometimes") a "mostly" code only question can be acceptable if the question is very very simple, and only requires a short sentence to ask about the code provided.
However, in this case, you have not asked anything at all, you have just provided some code.
- Is there an error in the code?
- Does it not do what you want?
- Do you want it to do something in addition to what it currently does?
- etc etc
We could evaluate your code to try to ascertain what you want, and perhaps (for example) see a syntax error, however users won't use their time evaluating code trying to find out what you want or what is wrong. Usually it's impossible to guess or determine what is needed, and so is an unfair waste on users time trying to find out.
eg - Perhaps that syntax error was a secondary issue to what you originally wanted, so an answer pointing out the error would become wrong once you edit your question and make it more clear.
The first thing I see is you have no password assigned to your database credentials -
$pass="";. In my "guessing", do I mention this? Or presume you left that out for security reasons not posting it publicly?
Already I am guessing, and proposing things you probably don't need.
A waste of mine and your time, which a simple question informing of what you want would resolve right away.
I see you have provided some information, but I only see that when I've already begun to "evaluate" your code, and Stack is not about code evaluation or guessing, it's about answering a question.
In your code comments, you have:
//always get wrong
//can't find problem
And question text:
shows $Desc And then Wrong
You have to remember, while it may be clear in your mind what is wrong and what you need, we are new not only to your problem, but to your scenario and your code!
So you need to provide clear and concise information explaining what you want, which should be easy as you already know what is required as it's you who came here to ask the question you have.
So you need to actually ask it!
Also, your question here (MSE) is lacking in detail too. While your subject does ask a question, and arguably we know what you want, it is prudent to offer some details, in this case (eg) why you feel the original question was ok.
At the least a small sentence explaining any arguments you have as to why your original question was clear, or, even a link to the original question would have been good.
How to ask a good question?
What types of questions should I avoid asking?
Why do I see a message that my question does not meet quality standards?