Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to return a HTML file as the response to a POST request?

Tags:

php

I send a POST request to a PHP page, and depending on what the contents are I want it to return one of two independent HTML pages I have written.

like image 937
telaviv Avatar asked Jun 23 '10 20:06

telaviv


1 Answers

if ($_POST['param'] == 'page1' )
    readfile('page1.html');
else
    readfile('other.html');
like image 112
Dogbert Avatar answered Oct 20 '22 14:10

Dogbert