how can i pass a php variable from parent page to include page -
i including page childpage.php in parent page, want pass variable parent page childpage.php , want access variable in childpage.php. here code:
include_once("childpage.php?a='$x'"); why doesn't work?
you can define variable before include so
$x = 'something needed in include file'; include_once("childpage.php"); you can use $x variable in childpage.php now.
Comments
Post a Comment