Support » Plugin: PHP Code Widget » Problems with $user_login

  • Resolved jhrenon


    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!

    $user = $user_login;
    $email = “$”;
    $headers = “From: $” . “\r\n” .
    ‘Reply-To:‘ . “\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 }
    { ?>
    <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”>

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Problems with $user_login’ is closed to new replies.