Jump to content

Can this be acheived in PHP ?


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


?>
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.