http_post_data(), http_put_data(), http_post_fields() - Functions are not working
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1.php
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<html>
<head>
<title>
Test
</title>
</head>
<body>
<?php
$to=$_POST['to'];
$from=$_POST['from'];
$sub=$_POST['sub'];
$msg=$_POST['msg'];
$msg="From: $msg";
mail($to,$sub,$msg,$from);
?>
</body>
</html>
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2.php
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<html>
<head>
<title>
Test
</title>
</head>
<body>
<?php
$info = array(
'to' => 'my@my.com',
'from' => 'we@my.com',
'sub' => 'Test',
'msg' => 'Testing!'
);
$none=array();
http_post_fields("1.php", $info, $none);
echo "DONE!";
?>
</body>
</html>
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I wrote these two files but 2.php is saying Call to undefined fuctions. I also tried these - http_post_data(), http_put_data(), http_post_fields() - These
functions are also not working. Please help me. I want that people open 2.php and the php post those data to 1.php. Please help me.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1.php
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<html>
<head>
<title>
Test
</title>
</head>
<body>
<?php
$to=$_POST['to'];
$from=$_POST['from'];
$sub=$_POST['sub'];
$msg=$_POST['msg'];
$msg="From: $msg";
mail($to,$sub,$msg,$from);
?>
</body>
</html>
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2.php
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<html>
<head>
<title>
Test
</title>
</head>
<body>
<?php
$info = array(
'to' => 'my@my.com',
'from' => 'we@my.com',
'sub' => 'Test',
'msg' => 'Testing!'
);
$none=array();
http_post_fields("1.php", $info, $none);
echo "DONE!";
?>
</body>
</html>
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I wrote these two files but 2.php is saying Call to undefined fuctions. I also tried these - http_post_data(), http_put_data(), http_post_fields() - These
functions are also not working. Please help me. I want that people open 2.php and the php post those data to 1.php. Please help me.