Link to home
Start Free TrialLog in
Avatar of Robert Granlund
Robert GranlundFlag for United States of America

asked on

PHP Syntax Error

What is wrong with the following PHP?
If my url is:
http://www.MYSITE.com/file.php?d=2013-09-08
Why does the following not work?
if ((isset($_GET['d']))) {
	$rd = $_GET['d'];
	$requestDate = date($rd, strtotime("+2 weeks"));
	echo '<h1>NEW DATE: '.$requestDate.'</h1>';
}

Open in new window


it always echo's; 2013-09-08
There is something wrong with the way I am formatting:
$requestDate = date($rd, strtotime("+2 weeks"));
ASKER CERTIFIED SOLUTION
Avatar of gr8gonzo
gr8gonzo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial