• Hello,

    I am currently on a project where I am, for the fun and experience of it, trying to make a agegate. Simple as it is, i just want the users to insert a date, hit submit, and a if statement will check whether they are >= 18 or not.

    Anyways, when hitting the submit button i obviously want you to get redirected to a index site. I thought this was going to be easy, such easy as in adding a header(“Location:”) after a if statement. Nope, didn’t work. I know why it doesn’t work, but i still either need a alternative or another way of doing the agegate with use of PHP, preferrably keeping myself from Javascript as far as it goes. Any help appreciated, and if you want me to paste the code that i have this far here, i will do so.

    Regards,
    Xariez

Viewing 1 replies (of 1 total)
  • Thread Starter Xariez

    (@xariez)

    I can, in afterhand say that I used a alternative to the function. Not the best way of doing things, but for the experience of it it works. Instead of at all trying to redirect it with a PHP command or function, I simply wrote :

    echo "Age verified. Please press <a href="#">here</a> to continue"

    So when that executes, it will print a text allowing you to redirect.

Viewing 1 replies (of 1 total)
  • The topic ‘Alternatives to header, to use in a agegate?’ is closed to new replies.