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
Applet JTextField Size Problem
Hello,
I recently started making an applet to calculate certain values for airplanes. However
Combining Two Queries
I have two scripts that each work fine by themselves. One is a search script with a variable that de
A href problem under php
Hello...
I tried to explain the issue in an earlier post.. but was not clear enough....
I am stumped
OK. Here is what I am trying to do. I have the conditions set, and if the conditions are met, I want
Table colours fail when extra row added
Hey Gurus,
I got a weird problem with formating the colour of a table made in php. Everything
Calander Basic Spript help
hi, just starting out with PHP and have the following script:
<?php
//This gets t
smart reading from a text file
Hello there fellow coders, i was wondering if one of you wouldnt mind helping me with this problem i
$_GET problem
Hi all,
Have a bit of a problem with a little piece of code, I am not sure if this should be
upload only text files
hi guys i want to upload only text like like (pdf,note pad and ofiice files) so can any one please t
Error in write byte array into document in SM58
Hi Gurus,
Getting the following error status in Transactional RFC (SM58) ..... *Error i