For reference, Stack Overflow is not a code writing service. It's a QA site for experienced programmers. As such, your question is off-topic, on the basis that it doesn't contain the necessary debugging information, minimal effort is not provided, and the scope of your question is too broad, or not clearly defined. —
Andreas detests censorship 12 secs ago