Jump to content

Archived

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

Guest iv

Can this be acheived in PHP ?

Recommended Posts

Guest iv
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


Share this post


Link to post
Share on other sites
[quote]Can this be done?[/quote]
Yes. Just as you have done it.

Share this post


Link to post
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 = "$me@mysite.com"; 
$subject = "Sending Email Feedback From My Website"; 
$message = "$name, $email\n\n$feedback"; 
 
// send the email 
mail($sendto, $subject, $message); 


?>

Share this post


Link to post
Share on other sites

×

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.