PHP

From: Date: Thu, 29 Jul 2010 07:38:02 +0000
Subject: PHP
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-8635@lists.php.net to get a copy of this message
Hello, I tried using PHP to send email but have encountered some problems. The error is: *Parse error*: syntax error, unexpected T_STRING in * C:\xampp\htdocs\portal\email_send.php* on line *83* The code on that line is: for ($list_length = 0 && strlen($_POST[email][$list_length]) > 0; $list_length <= 0 && strlen($_POST[email][$list_length]) > 0; $list_length++) { // 8 is the number of characters desired in each password. $Password = random_string($charset, 8); $FirstName = $_POST[FirstName][$list_length]; $LastName = $_POST[LastName][$list_length]; $Email = $_POST[email][$list_length]; * ** $query = "INSERT INTO recipient (FirstName, LastName, Email, Password) *VALUES('$FirstName', '$LastName', '$Email', '$Password')"; $result = mysql_query($query); $formsent = mail($Email, "Login and password info", "Your login is: $FirstName $LastName.\r\nMake sure there is only one space between the two words you log in.\r\nYour Password is: $Password.", "From: mailinglist@sendhost\r\nReply-to: help@sendhost"); echo "The result is $formsent for $list_length.<BR>\n"; } Please advise me on what I should do. Thank you. -- Best Regards, Melissa

Attachment: [application/vnd.openxmlformats-officedocument.wordprocessingml.document] php_codes.docx
« previous php.webmaster (#8635) next »