Hi, I have adopted the http_post method for passing data to scripts. However, I'm having problem to execute the instructions for the script which my data has been passed to.
Here's my program portion <adopted from xiaoxin's posted message):
// scriptname : http_post_ex.php3
$form_data = array('first' => $first, 'last' => $last, 'address' => $address, 'position' => $position);
$a = new http_post;
$a->set_action('http://xxx.xxx.xx.xxx/http_post_ex2.php3');
$a->set_timeout(30);
$a->set_element($form_data);
if ($debug) $a->show_post();
$content = $a->send($debug) or die("http_post's send failed!");
echo $content;
The "http_post_ex2.php3" file is mainly formatted output of the data and then readfile("thanks.html");
It successfully passing data to the script but it did not display the data and readfile as the second script suppose to do.
Question:
Is the class only pass data to the appointed script while it will not run the appointed script's instructions ?
Correct me if I'm wrong, I suppose this class will work for those scripts that call itself ( where the class being used and data processing functions are scripted in the same file ).
I need some consultation on how this class really works. Thanks !