Jump to content

Can this be acheived in PHP ?


Guest iv

Recommended Posts

I just to know if this is achieveable in PHP, when I have googles for this and came across scripts they are full blown appas that require the form be on a php server as well as the action page.

This is my scenario

I have a html feedback form on a server that does not run PHP.

To get around this I want to send the form processing (action page) to a colleagues server that has PHP installed

i.e.

<form action="http://www.anotherserver.com/sendmail.php" method="post">

Can this be done? If so any pointers to tutorials would be great


Link to comment
https://forums.phpfreaks.com/topic/13545-can-this-be-acheived-in-php/
Share on other sites

Ok

So this can be done by sending a html based form to a php script on another server.

But do you have any script examples

i.e.

would this work as the php script ?

<?
if ($REQUEST_METHOD == "POST") {
 
// Just to be safe, I strip out HTML tags 
$name = strip_tags($name); 
$email = strip_tags($email); 
$feedback = strip_tags($feedback); 
 
// set the variables 
$sendto = "[email protected]"; 
$subject = "Sending Email Feedback From My Website"; 
$message = "$name, $email\n\n$feedback"; 
 
// send the email 
mail($sendto, $subject, $message); 


?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.