Problems with $user_login
-
Hey man, sorry for the poor english, but i will try to be the most clearly possible.
I am doing a wordpress site and in the widgets area i want to make a note area where people leave them note and sent it to an email, all the php works perfectly only the function $user = $user_login where i try to get the login from the user isnt doing well. I will post my code down here them you can look at. Thank You!<?php
if(isset($_POST[‘BtnSubmit’]))
{
$user = $user_login;
$email = “$user@blablab.com”;
$headers = “From: $user@blablab.com” . “\r\n” .
‘Reply-To: no-reply@blablab.com’ . “\r\n” .
‘Content-type: text/html; charset=ISO-8859-1’.”\r\n”;
$subject = ‘=?UTF-8?B?’.base64_encode(“[PET][Recado] Recado de $user”).’?=’;
$texto = $_POST[‘texto’];
$envio = mail($email, $subject, $texto, $headers);
if ($envio){?>
<script type=”text/javascript”>
alert(“É nós!”);
</script> <?php }
else
{ ?>
<script type=”text/javascript”>
alert(“Não deu!”);
</script> <?
}
}?>
<form name=”UserInformationForm” method=”POST” action=”#”>
<textarea name=”texto” rows=”10″ cols=”10″></textarea><input name=”BtnSubmit” type=”submit” value=”Enviar”>
</form>
- The topic ‘Problems with $user_login’ is closed to new replies.