I have absolutely no idea how to deal with this problem because you have not said when or where the script runs, what are the next and previous question, what the scripting language is ...
There is some good information about how to ask an effective question at
LQ's How To Ask a Question.