Skip to main content
added 2395 characters in body
Source Link

Process.php

<?php $redirectTo = '/thankyou.html'; $subject = 'New message from site'; // Email SUBJECT field $receive = array( '[email protected]' ); if($_POST['email_check'] == '') { if (isset($_POST['first_name'])){ $message = '<table width="100%" border="0" cellspacing="0" cellpadding="8" style="border:1px solid #f3f3f3"> <tr> <td colspan="3" height="30" style="font-size:20px"><strong>' . $subject . '</strong></td> </tr> <tr> <td width="100" bgcolor="#f3f3f3"><strong>First Name: </strong></td> <td width="14" height="30" bgcolor="#f3f3f3">&nbsp;</td> <td width="305" bgcolor="#f3f3f3">' . $_POST ['first_name'] . '</td> </tr> <tr> <td><strong>Last Name: </strong></td> <td width="14" height="30">&nbsp;</td> <td>' . $_POST ['last_name'] . '</td> </tr> <tr> <td bgcolor="#f3f3f3"><strong>Email: </strong></td> <td bgcolor="#f3f3f3" width="14" height="30">&nbsp;</td> <td bgcolor="#f3f3f3">' . $_POST ['email'] . '</td> </tr> <tr> <td><strong>Phone Number: </strong></td> <td width="14" height="30">&nbsp;</td> <td>' . $_POST ['phone'] . '</td> </tr> <tr> <td bgcolor="#f3f3f3"><strong>Check: </strong></td> <td bgcolor="#f3f3f3" width="14" height="30">&nbsp;</td> <td bgcolor="#f3f3f3">'; foreach($_POST['role'] as $value) { $message.=$value.'<br>'; } $message.='</td> </tr> <tr> <td><strong>Message: </strong></td> <td width="14" height="30">&nbsp;</td> <td>' . $_POST ['message'] . '</td> </tr> <tr> <td><strong>Referer:</strong></td> <td width="14" height="30">&nbsp;</td> <td>' . $_SERVER ['HTTP_REFERER'] . '</td> </tr> <tr> </table>'; for ($i = 0; $i < count($receive); $i++){ $to = $receive[$i]; $headers = 'MIME-Version: 1.0' . "\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\n"; $headers .= 'From: ' . $_POST['email'] . "\n" . 'Reply-To: ' . $_POST['email'] . "\n"; mail($to, $subject, $message,$headers); } header('Location: '.$redirectTo); } } else{ header('Location:'.$_SERVER['HTTP_REFERER']); die(); } ?> 

Process.php

<?php $redirectTo = '/thankyou.html'; $subject = 'New message from site'; // Email SUBJECT field $receive = array( '[email protected]' ); if($_POST['email_check'] == '') { if (isset($_POST['first_name'])){ $message = '<table width="100%" border="0" cellspacing="0" cellpadding="8" style="border:1px solid #f3f3f3"> <tr> <td colspan="3" height="30" style="font-size:20px"><strong>' . $subject . '</strong></td> </tr> <tr> <td width="100" bgcolor="#f3f3f3"><strong>First Name: </strong></td> <td width="14" height="30" bgcolor="#f3f3f3">&nbsp;</td> <td width="305" bgcolor="#f3f3f3">' . $_POST ['first_name'] . '</td> </tr> <tr> <td><strong>Last Name: </strong></td> <td width="14" height="30">&nbsp;</td> <td>' . $_POST ['last_name'] . '</td> </tr> <tr> <td bgcolor="#f3f3f3"><strong>Email: </strong></td> <td bgcolor="#f3f3f3" width="14" height="30">&nbsp;</td> <td bgcolor="#f3f3f3">' . $_POST ['email'] . '</td> </tr> <tr> <td><strong>Phone Number: </strong></td> <td width="14" height="30">&nbsp;</td> <td>' . $_POST ['phone'] . '</td> </tr> <tr> <td bgcolor="#f3f3f3"><strong>Check: </strong></td> <td bgcolor="#f3f3f3" width="14" height="30">&nbsp;</td> <td bgcolor="#f3f3f3">'; foreach($_POST['role'] as $value) { $message.=$value.'<br>'; } $message.='</td> </tr> <tr> <td><strong>Message: </strong></td> <td width="14" height="30">&nbsp;</td> <td>' . $_POST ['message'] . '</td> </tr> <tr> <td><strong>Referer:</strong></td> <td width="14" height="30">&nbsp;</td> <td>' . $_SERVER ['HTTP_REFERER'] . '</td> </tr> <tr> </table>'; for ($i = 0; $i < count($receive); $i++){ $to = $receive[$i]; $headers = 'MIME-Version: 1.0' . "\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\n"; $headers .= 'From: ' . $_POST['email'] . "\n" . 'Reply-To: ' . $_POST['email'] . "\n"; mail($to, $subject, $message,$headers); } header('Location: '.$redirectTo); } } else{ header('Location:'.$_SERVER['HTTP_REFERER']); die(); } ?> 

I am trying to add recaptcha into my custom PHP form and am confused about how can i include itto do so. As recaptcha require Recaptcha requires adding recaptchalib.php into the form so, but if itI add verify.php then my form will not process, as iI am using my PHP file to process my form.

<form method="POST" action="process.php" id="form-ok"> 

As per thierThe documentation is a bit confusing. so My question is that should i, what do I need to do to process two actions?

Any idea how can iI get this working?

I am trying to add recaptcha into my custom PHP form and confused how can i include it. As recaptcha require recaptchalib.php into the form so if it add verify.php then my form will not process as i am using my PHP file to process my form.

<form method="POST" action="process.php" id="form-ok"> 

As per thier documentation is bit confusing. so My question is that should i need to process two actions?

Any idea how can i get this working?

I am trying to add recaptcha into my custom PHP form and am confused about how to do so. Recaptcha requires adding recaptchalib.php into the form, but if I add verify.php then my form will not process, as I am using my PHP file to process my form.

<form method="POST" action="process.php" id="form-ok"> 

The documentation is a bit confusing. My question is, what do I need to do to process two actions?

Any idea how can I get this working?

Source Link

Recaptcha into custom PHP form

I am trying to add recaptcha into my custom PHP form and confused how can i include it. As recaptcha require recaptchalib.php into the form so if it add verify.php then my form will not process as i am using my PHP file to process my form.

<form method="POST" action="process.php" id="form-ok"> 

As per thier documentation is bit confusing. so My question is that should i need to process two actions?

Any idea how can i get this working?