Assigning variables from mysql to php -


I am trying to send a username and password, which sends users from my database via email. How do I get this objective? I am using the current code below and whenever I receive an email, I realized there are spaces for $ username and $ password, which means that the database value is not being sent.

  & lt; ? Php $ to = $ email; $ Theme = "Details registered with BFS!"; $ Message = "Dear $ username, as requested, these are your login details."; $ Message = "Username = $ username password = $ password"; $ Headers = 'to: noreply@bfs.com'; $ Sentmail = Mail ($ $, $ theme, $ message, $ header); ? & Gt;  

Edit ****

Full code

   

change this:

  $ Username = mysql_query ("user select user where username = '$ user name' ');  

In:

  $ res = mysql_fetch_assoc ($ result); $ Res = $ res ['username']; $ Username = mysql_query ("Select from user where * username = '$ res'");  

And this:

  $ result = mysql_fetch_assoc ($ username);  

In:

  $ result = mysql_fetch_assoc ($ username); $ Username = $ result ['username']; $ Password = $ result ['password']; $ Result = $ result ['username'];  

If this does not work then I may have missed something :-) But if this happens then use it to understand more about the work of reason, and after that Read and use it instead. : -)


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -