Hello I'm new also with the php programming language i tried to put this code. I wanted to happen is when it submit it will email to me the name of the user.

 <?php
$alert = $user->get('username');

if (isset($_POST['continue'])){
mail("www.warviper@gmail.com","User Login",$alert);

}
?>

<form name="frm" action="http://google.com" method="post">
Good Day! <?php echo $user->get('username'); ?><br><br>

You are now log on. Please click continue to see our products.<br/><br/>
<input type="submit" name="continue" value="Continue" />
</form>
Member Avatar for rajarajan2017

Any Error Message?

Any Error Message?

No, there is no error and it works fine. But I dont have receive the email. That is my problem.

1st keep in mind that inorder for you to use php mail() function, you should set-up a working email system

Member Avatar for rajarajan2017

Remove all the things and only write or create a new file:

<?php
mail("www.warviper@gmail.com","User Login","test");
?>

Execute the file and check if any warnings or error messages

Remove all the things and only write or create a new file:

<?php
mail("www.warviper@gmail.com","User Login","test");
?>

Execute the file and check if any warnings or error messages

I have now solve this problem thank you for your help rajarajan07.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.