Hello how can I do this to test my ads

I just want to test my instertical codes I want to create a text field to enter my code
when entering the code, click on load ads, then show ads, result

Please elaborate more