I know this is very basic [stupid] question. But I am not a programmer, so please help me. I want to show a dynamic page inside another page. Actually, I want to display a page like this: something1.php?param1=something¶m2=something Inside another page, say something2.php. Both are in same directory. How do I do this?
If both files are in the same directory (or even the same hosting account) you can use: <?php include 'something1.php'; ?> PHP: If "something1.php" expects variables from URL string you can declare them before including the file: <?php $_GET['param1'] = 'something1'; $_GET['param2'] = 'something2'; include 'something1.php'; ?> PHP:
When I tried it, It didn't work. Then I again looked at the something1.php, which contained if (isset($_REQUEST["something"])) and so on. I guessed $_REQUEST might be similar to $_GET , and used it. It's working. Again thank you for your kind help.