You can do this a couple different ways, both of which that come to mind involve using forms.
You can either have a check box that says "I agree" and a "continue" button (this is the usual method, probably the best way) or you can have two buttons: I agree, I disagree.
Either way, you have to use PHP to process the form and determine whether or not the user agreed.