Jump to content

Recommended Posts

Alright Ive been trying to make a tos for a friend but im having someproblems at the part where they type i agree to enter and no to not enter. heres what i got so far:

 

<br /><br /><font color="white">Type <i>'yes'</i> if you agree to <i>ALL</i> of the above terms. Click <i>'no'</i> if you do not agree to <i>ALL</i> of the above term<br />
</font> <br /><form method="get" action="my website is entered here.">  <input name="agree" size="20" /><br />
  <input type="submit" name="Submit" value="I Agree" />
  <input type="submit" name="No" value="No" />

 

Now when i enter yes it takes me to my web site but if i enter no it also takes my to my site.... If i click no it still takes me to my site. Any ideas on what i should do for if i click no or enter no for it to redirect me straight back to the tos?

Link to comment
https://forums.phpfreaks.com/topic/89072-help/
Share on other sites

that is all the code. the rest is just the terms and ect that they have to read and decide if the agree to it or not. Its a terms of sevice page just like on Moparisthebest and a couple other sites. I just want to make it so when they click no it just redirects them back to the terms of service page again

Link to comment
https://forums.phpfreaks.com/topic/89072-help/#findComment-456185
Share on other sites

Do it like this

 

1. Create a form (method post) call a file like continue.php

2. Put two checkboxes

3. Put one submit button

4. One checkbox can be called I agree and value="I Agree"

5. Second checkbox can be called No and value="No"

6. Put some code in continue.php like:

if ($checked == I agree){
header("Location:somepage.php");
} else {
header ("Location: #");
}

 

The code is not completly done for you. Try to play a little bit. I gave a hint how to do it.

Link to comment
https://forums.phpfreaks.com/topic/89072-help/#findComment-456193
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.