fabiez Posted April 11, 2011 Share Posted April 11, 2011 Three post variables are recived from a previous page. All three are inserted into a table, then a mail is compost based on the post variables. And the mail printout was: Welcome. Your login information is: User: $usr Password: $pw So how do I give the user his info without printing the variable? require("id.php"); $usr = $_POST['usr']; $pw = $_POST['passwd']; $email = $_POST['email']; $Link = mysql_connect($Host, $User, $Password); mysql_select_db('db', $Link); $Sql = "select user from users where user='$usr'"; $Result = mysql_query($Sql, $Link); $Num = mysql_num_rows($Result); $Result = mysql_fetch_array($Result); if($Num == 0){ $Sql2 = "INSERT INTO users (user, password, email) VALUES ('$usr', sha1('$pw'), '$email')"; mysql_query($Sql2, $Link); $from = '[email protected]'; $subject = 'Welcome'; $message = 'Welcome. Your login information is: User: $usr Password: $pw'; mail("$email", $subject, $message, "From: $from"); } else { } Link to comment https://forums.phpfreaks.com/topic/233400-mail/ Share on other sites More sharing options...
requinix Posted April 11, 2011 Share Posted April 11, 2011 Learn about strings Link to comment https://forums.phpfreaks.com/topic/233400-mail/#findComment-1200228 Share on other sites More sharing options...
fabiez Posted April 11, 2011 Author Share Posted April 11, 2011 thanks Link to comment https://forums.phpfreaks.com/topic/233400-mail/#findComment-1200250 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.