Register and Login PHP?

hey all i have my script done for my register page it works fine i would like the login to be on the same page…how should i go about laying out the code so that it doesnt execute both scripts on load of page.

would i need to use a loop on the register code then start my login script or something?

thanks in advance peeps for any help :slight_smile: