Drags111 Posted November 11, 2007 Share Posted November 11, 2007 It says the error is on the highlighted line: <?php $curIP = $_SERVER['REMOTE_ADDR']; $fname = strtolower($_POST['fname']); $usrname = $fname{0}. $_POST['lname']; $email = $_POST['mail'] $body = "UserID: $usrname\nPass: $lname\nIP Address: &curIP"; mail("*****@gmail.com", "Account Request", $body); $body2 = "An email has been dispatched to the Administrator for your request. Please give up to 48 hours for response."; mail(&email, "Account Request", $body2); echo $usrname; ?> Link to comment https://forums.phpfreaks.com/topic/76810-solved-whats-wrong-with-this-code/ Share on other sites More sharing options...
Daukan Posted November 11, 2007 Share Posted November 11, 2007 Missing semi colon $email = $_POST['mail'] to $email = $_POST['mail']; Link to comment https://forums.phpfreaks.com/topic/76810-solved-whats-wrong-with-this-code/#findComment-388889 Share on other sites More sharing options...
Drags111 Posted November 11, 2007 Author Share Posted November 11, 2007 oopsies. Thanks a lot! lol man i feel dumb Link to comment https://forums.phpfreaks.com/topic/76810-solved-whats-wrong-with-this-code/#findComment-388892 Share on other sites More sharing options...
Drags111 Posted November 11, 2007 Author Share Posted November 11, 2007 ah now i have another problem... <?php $curIP = $_SERVER['REMOTE_ADDR']; $fname = strtolower($_POST['fname']); $usrname = $fname{0}. $_POST['lname']; $email = $_POST['mail']; $body = "UserID: $usrname\nPass: $lname\nIP Address: &curIP\nThis person requests an account for GraphMaster."; mail("[email protected]", "Account Request", $body); $body2 = "Thank you $fname. An email has been dispatched to the Administrator for your request. Please give up to 48 hours for response."; mail(&email, "Account Request", $body2); echo $usrname; error: Parse error: syntax error, unexpected ',', expecting T_PAAMAYIM_NEKUDOTAYIM in /home/.monochrome/drags111/gma.asssoft.org/createacc.php on line 11 ?> Link to comment https://forums.phpfreaks.com/topic/76810-solved-whats-wrong-with-this-code/#findComment-388894 Share on other sites More sharing options...
Daukan Posted November 11, 2007 Share Posted November 11, 2007 This mail(&email, "Account Request", $body2); To mail($email, "Account Request", $body2); You have a & instead of $ Link to comment https://forums.phpfreaks.com/topic/76810-solved-whats-wrong-with-this-code/#findComment-388895 Share on other sites More sharing options...
Drags111 Posted November 11, 2007 Author Share Posted November 11, 2007 omg suicide time.... Link to comment https://forums.phpfreaks.com/topic/76810-solved-whats-wrong-with-this-code/#findComment-388896 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.