How to post and retrieve the posted value using header functions in php by

padhu_ps

New member
using the follwing code? $post_data = 'var1=123&var2=456';
$content_length = strlen($post_data);

header('POST /test.php HTTP/1.1');
header('Host: localhost');
header('Connection: close');
header('Content-type: application/x-www-form-urlencoded');
header('Content-length: ' . $content_length);
header('');
header($post_data);

exit();
 
Back
Top