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
send message to the java application
Oracle 10g with Windows platform.
I have a java application that periodically pings the d
Hardcopy printing is to wide
I want to make a hardcopy at runtime of my active form like this
Inserting a variable in a link
I have this code that I want to insert for my own variable but I have no idea how. This is what I wa
Multithreading in Oracle (Java, SQLJ, Pro*C,??) on 10g
I am investigating how to run a Java stored procedure in multithread mode.
I know that if I chang
PHP and Javascript
Hi Guys,
Im trying to load the contents of an html file into a text area for editing, this is
need good snippet manager
Hi. as i am coding and learning more, it is becoming difficult to manage code snippets. how you mana
Why doesn't this work? (SSH2)
This is my script:
Code: <?php
$connection = ssh2_connect('213.251.167.109', 22);
insert quotes
Hi,
I have an output like this:
Code: john,18,Cancer
How can I change this to
Code:
PHP Display Telephone Number On Referrer
I have used the php below to show a different telephone number in the header of the site depending u
writing a screen scraper
Hello,
I'm writing a screen scraper application and want to be able to get absolute addresses