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
Filtering Tables
Hello Thanks for any help any one can give Im very new to PHP..
I need to pull data for clien
Registration
ok so i have a site where people can register and login which works now thanks to someone on here th
Multiple includes losing variables
Hey all,
just starting out w php and ran into a problem pretty quickly. I'm
including seve
GET vs SUBMIT Button to show sections on one index.php page?
Just curious if one of these ways is better (i.e. more efficient) than the other.
I have a
getAlexaRank($url) function not working
I have made a function to get alexa rank
the site is here: http://mytestsite.rack111.com/1
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
keeps going back to index.html ???????
ok so i started making my site using mostly.html files now i have added a fair chunk of php. My inde
Load file in PHP
I have 2 files. The first is a PHP generated XML file that's dependent by 2 inputs. The second is a
xml element exists
Code: [Select]<?xml version="1.0"?>
<Addresses>
<
Server side $_SESSION
how does one keep the session completely server side. no cookies to the browser at all. i need this