Wednesday, 18 September 2013

From php file call another php file by giving it also a parameter

From php file call another php file by giving it also a parameter

I will explain with a simple example:
myphp1.php:
$html = get_html("myphp2.php", "parameter1"); //pseudocode
myphp2.php
<html>
<head>
</head>
<body>
<?php
echo $_POST["parameter1"];
?>
</body>
</html>
So basically the $html will hold the myphp2.php html output. Can I do that?

No comments:

Post a Comment