I have a form in which I want to add a field for people to fill it with their whatsapp number.
The idea is that when the data of this form arrives to the recipient (an email account) that whatsapp number arrives already with the link so that when pressing it the whatsapp opens to communicate with the person who left his number in the form.
I know that the link https://wa.me/ is used to link a cell phone number to whatsapp.
I leave you the content of my php file and the question and help I need is to know how to link the number that goes in the whatsapp field in that file.
<?
//Configuracion:
$file_done = "gracias.htm";
$email_to = "hola@gmail.com";
$email_subject = "Consulta";
$email_body = "
<FONT face=\"Verdana\" size=\"2\">
<b>Nombre:</b> $_POST[nombre] <br>
<b>WhatsApp:</b> $_POST[whatsapp] <br>
<b>Email:</b> $_POST[email] <br>
<b>Consulta:</b><br> $_POST[consulta] <br>
</FONT><BR><BR><HR>
<FONT face=\"Verdana\" size=\"1\" color=\"#999999\">
$HTTP_USER_AGENT<BR>
IP:$REMOTE_ADDR<BR>
$HTTP_HOST$REQUEST_URI<BR>
</FONT>
";
//Envia el mail:
$fullname = $_POST[nombre] . " " . $_POST[apellido];
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: $fullname <$_POST[email]>\r\n";
mail($email_to, $email_subject, $email_body , $headers);
//Una vez listo muestra el msg de ´listo´:
include($file_done);
?>
source https://stackoverflow.com/questions/70128614/how-do-i-link-whatsapp-link-in-a-form-field
Comments
Post a Comment