remove a ; from emails in textarea
Posted on
16th Feb 2014 07:03 pm by
admin
Code: <?php
session_start();
Did you know?Explore Trending and Topic pages for more stories like this.
$database_host = "localhost";
$database_username = "";
$database_password = "";
$database_name = "";
$connection = mysql_connect($database_host, $database_username, $database_password) or die(mysql_error());
$db = mysql_select_db($database_name, $connection);
if(!$_POST)
{
echo "<FORM METHOD=POST ACTION=$PHP_SELF>";
echo "<TEXTAREA NAME=my_textarea COLS=30 ROWS=5></TEXTAREA><BR>";
echo "<INPUT TYPE=SUBMIT VALUE=Submit>";
echo "</FORM>";
}
else
{
$entries = explode( "n", $_POST[my_textarea]);
$x=0;
foreach($entries AS $entry)
{
if($entry!=="")
{
$register_sql = "INSERT INTO emails(emails_email) VALUES ('$entry')";
$register_row = mysql_query($register_sql);
echo "$entry added to database
";
$x++;
}
}
}
?>
i have the above code, where you enter emails in a textarea like
email1@hotmail.com
email2@hotmail.com
and then it will put them into my database.
right now what i want to do is adapt the above code to do the same when you put emails in the textarea like..
email1@hotmail.com; email2@hotmail.com
thanks in advance
No comments posted yet
Your Answer:
Login to answer
187
51
Other forums
Alternate messaging
I have 4 strings in MySQL db1
$string1 : Hello
$string2 : Hi
$string3 : Great
$strin
Gantt Chart Tool
Does anyone know of a good free gantt chart creator tool
Thanks
Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne
Comma seperated implode & modifying returned string.
I have a PHP post form that posts up to 4 variables. I need whatever variables are passed to be comb
Warning: session_start() [function.session-start]: Cann.....
hi, can someone help me with this? I keep getting this error....
Warning: session_start() [fu
Change Web page language
i doing this thing first time but i dont find any suitable solution for it. On the demand of user. I
mail with attachment problems
Hi. I have the following code:
Code: else if(file_exists("site".$timp.".zip")
need help in update query
hi
i have a dynamic form. i need help in how can i use update query when values from dynamic for
how to insert value
I am having file bookissueadd.php..... in which i am having tag
<td height="21&q
Form validation with functions
Hi there
I am trying to make a very simple form validation function. I currently have the fol