• Resolved jhrenon

    (@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!

    <?php
    if(isset($_POST[‘BtnSubmit’]))
    {
    $user = $user_login;
    $email = “[email protected]”;
    $headers = “From: [email protected]” . “\r\n” .
    ‘Reply-To: [email protected]’ . “\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>

    https://ww.wp.xz.cn/plugins/php-code-widget/

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.