Reputation: 53
I want to echo what the users puts in their textfield when their accounts are not "Activated" Like this
if(active == NULL);{
//This is the methods i have tried.
//In this example username is the name of the textfield.
//I want the username to be displayed as what the typed in, but instead it just says "username"
echo '<span style="color:#AFA;text-align:center;">Please actiave your account, username we have sent you a mail with an activation link.</span>';
/*In this example username1 is the id of the textfield.
I want the username to be displayed as what the typed in, but instead it just says "username"*/
echo '<span style="color:#AFA;text-align:center;">Please activate your account, username1 we have sent you a mail with an activation link.</span>';
}
Any ideas?
Upvotes: 0
Views: 54
Reputation: 445
You need to get the POST values from the textfield ,
if your using CORE PHP you can get the post values on submit button and form post method like
$_POST['username'];
For your example do this way (as mentioned the name of the textfield is username)
$username = $_POST['username'];
echo '<span style="color:#AFA;text-align:center;">Please actiave your account, '.$username.' we have sent you a mail with an activation link.</span>';
Upvotes: 1