Jump to content

editing multiple emails


brown2005

Recommended Posts

			$get_emails = mysql_query("SELECT * FROM emails");

		while($row = mysql_fetch_assoc($get_emails))
		{

			$curr_email = $row['emails_email'];
			$curr_id = $row['emails_id'];

			$email = strtolower($curr_email);
			$email = rtrim($email);
			$email = ltrim($email);									
			$email = mysql_escape_string($email);

			$del = mysql_query("UPDATE emails SET emails_email=$email WHERE emails.emails_id=$curr_id LIMIT 1");
		        
    		echo "$email added to database<br>";
    					
		}

 

hi i have the above code to take emails from my database and string them to lower and remove any white space left on the left or right of the entry, but it is not working.

 

any help please

Link to comment
https://forums.phpfreaks.com/topic/174372-editing-multiple-emails/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.