User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 397,817 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,620 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 3306 | Replies: 3
Reply
Join Date: Apr 2007
Location: NORAD
Posts: 2
Reputation: Duke Nukem is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Duke Nukem Duke Nukem is offline Offline
Newbie Poster

Age Verification Script

  #1  
Apr 9th, 2007
Duke Motherf***in" Nukem will only allow 18 and above on his site. It seems like my html page is correct and my php is the problem. Anyone have any answers they would like to share with me? MAY JUSTICE REIGN SUPREME!!!!!





 <?php
$month = $_REQUEST['bmonth'];
$day = $_REQUEST['day'];
$year = $_REQUEST['year'];
$this_day = date(d);
$this_month = date(m);
$this_year = date(Y);
$day_val = $this_day - $day;
$month_val = $this_month - $month;
$year_val = $this_year - $year;
if($year_val >= 19) {
 header('Location: http://www.mistysxxxgirls.com/Tour/Tour1.html');
} 
if($month_val >= 0) {
 header('Location: http://www.mistysxxxgirls.com/Tour/Tour1.html');
} 
if($day_val >= 0) {
 header('Location: http://www.mistysxxxgirls.com/Tour/Tour1.html'); 
 
} else { 
 header('Location: http://www.mistysxxxgirls.com/notvalidbday.html');
}
?> 




Last edited by stymiee : Apr 10th, 2007 at 10:34 am. Reason: removed vulgarities
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2006
Location: syria
Posts: 157
Reputation: w_3rabi is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 8
w_3rabi's Avatar
w_3rabi w_3rabi is offline Offline
Junior Poster

Re: Age Verification Script

  #2  
Apr 10th, 2007
dude you should remove the three conditions and put em in one condition so the code should look something like this

<?php
$month = $_REQUEST['bmonth'];
$day = $_REQUEST['day'];
$year = $_REQUEST['year'];
$this_day = date(d);
$this_month = date(m);
$this_year = date(Y);
$day_val = $this_day - $day;
$month_val = $this_month - $month;
$year_val = $this_year - $year;
if($year_val >= 19&&$month_val >= 0&&$day_val >= 0) {
 header('Location: http://www.mistysxxxgirls.com/Tour/Tour1.html');
} 
else {     
 header('Location: http://www.mistysxxxgirls.com/notvalidbday.html');
}

?> 
Last edited by w_3rabi : Apr 10th, 2007 at 6:18 am.
Reply With Quote  
Join Date: Apr 2007
Location: NORAD
Posts: 2
Reputation: Duke Nukem is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Duke Nukem Duke Nukem is offline Offline
Newbie Poster

Re: Age Verification Script

  #3  
Apr 11th, 2007
Nice!!! Thanks for the help!
Reply With Quote  
Join Date: Dec 2006
Location: syria
Posts: 157
Reputation: w_3rabi is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 8
w_3rabi's Avatar
w_3rabi w_3rabi is offline Offline
Junior Poster

Re: Age Verification Script

  #4  
Apr 11th, 2007
no problem man
take care
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb PHP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 6:39 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC