Search the Community
Showing results for tags 'age verification'.
-
Hello everyone! This is my first post here! I was hoping I could get some help! I'm trying to create an age gate form and I'm running into a problem. The index page that I created actually works fine, but when I create the form and set up the php code the form is not interacting with the data beyond the action. I really don't understand what's going on here. I have a verify.php page that has a form on it and the php that should interact with it is at the top like so: <?php session_start(); if(isset($_POST['submit'])) { $remember = $_REQUEST ['remember']; $day = $_POST ['day']; $month = $_POST ['month']; $year = $_POST ['year']; $country = $_POST ['country']; $birthday = mktime(0,0,0,$month,$day,$year); $difference = time() - $birthday; $age = floor($difference / 31556926); echo $age; if($age >= 21) { $_SESSION ['verifyok'] = 1; header ("location: index.php"); } else { $_SESSION ['verifyfail'] = 0; header("loaction: http://www.centurycouncil.org/"); } if($remember == 'save') { setcookie("verifyok", 1,mktime(0,0,0,01,01,date("Y")+30)); $_SESSION['verified'] = 1; header("location: index.php"); exit(0); } } ?> And here I have the form that does not interact with the php and has the action as verify.php, the test server works and the php at the top of my index.php does redirect me to the verify page, but the verify page just isn't working. <form action="verify.php" method="POST"> <span class="heading">ENTER YOUR BIRTH DATE</span> <div id="dob"> <select name="day" class="styled" /> <option selected="selected" disabled="disabled">DD</option> <option>01</option> <option>02</option> <option>03</option> <option>04</option> <option>05</option> <option>06</option> <option>07</option> <option>08</option> <option>09</option> <option>10</option> <option>11</option> <option>12</option> <option>13</option> <option>14</option> <option>15</option> <option>16</option> <option>17</option> <option>18</option> <option>19</option> <option>20</option> <option>21</option> <option>22</option> <option>23</option> <option>24</option> <option>25</option> <option>26</option> <option>27</option> <option>28</option> <option>29</option> <option>30</option> <option>31</option> </select> <select name="month" class="styled" /> <option selected="selected" disabled="disabled">MM</option> <option>01</option> <option>02</option> <option>03</option> <option>04</option> <option>05</option> <option>06</option> <option>07</option> <option>08</option> <option>09</option> <option>10</option> <option>11</option> <option>12</option> </select> <select name="year" class="styled" /> <option selected="selected" disabled="disabled">YYYY</option> <option>2013</option> <option>2012</option> <option>2011</option> <option>2010</option> <option>2009</option> <option>2008</option> <option>2007</option> <option>2006</option> <option>2005</option> <option>2004</option> <option>2003</option> <option>2002</option> <option>2001</option> <option>2000</option> <option>1999</option> <option>1998</option> <option>1997</option> <option>1996</option> <option>1995</option> <option>1994</option> <option>1993</option> <option>1992</option> <option>1991</option> <option>1990</option> <option>1989</option> <option>1988</option> <option>1987</option> <option>1986</option> <option>1985</option> <option>1984</option> <option>1983</option> <option>1982</option> <option>1981</option> <option>1980</option> <option>1979</option> <option>1978</option> <option>1977</option> <option>1976</option> <option>1975</option> <option>1974</option> <option>1973</option> <option>1972</option> <option>1971</option> <option>1970</option> <option>1969</option> <option>1968</option> <option>1967</option> <option>1966</option> <option>1965</option> <option>1964</option> <option>1963</option> <option>1962</option> <option>1961</option> <option>1960</option> <option>1959</option> <option>1958</option> <option>1957</option> <option>1956</option> <option>1955</option> <option>1954</option> <option>1953</option> <option>1952</option> <option>1951</option> <option>1950</option> </select> </div> <span class="heading" id="heading2">ENTER YOUR LOCATION</span> <div id="location"> <select name="country" class="styled" id="country" /> <option>USA</option> </select> </div> <div id="cookie"> <div id="box"><input type="checkbox" name="remember" value="save" class="styled" /></div><span id="notice"><b>Remember Me</b><br> <i>Do not check this box if you use a shared computer.</i> </span> </div> <div class="clear"></div> <div id="button"> <input id="enter" type="image" name="submit" src="images/enter_inactive.png" WIDTH="117" HEIGHT="44" BORDER="0" ALT="SUBMIT!"> </div> </form> I put a couple of divs inside the form but I don't see how that would really effect the PHP at all, the whole form is still together. I can't even get an echo test to work. I'm completely stumped here. I would greatly appreciate some help! Thanks You!
- 9 replies
-
- form
- age verification
-
(and 2 more)
Tagged with: