Code: <?php
session_start();
$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
php form help
Hey,I use a control file to set my meta tags and titlesHere's an exampleCode: <?phpswitch ($sheet_name) { case 'page-2'://The page that has $sheet_name equal to the case value, this is the
Javascript form submit and radio buttons?
When this form is submitted, it is automatically resubmitted using JS.All my fields are carried over in the $_post except for total, and state which are radio buttons and a drop down.Code:
Display Database
I need to create a shopping cart. I found this code online: http://conceptlogic.com/jcart/Unfortunately, I dont know how to display my product from MYSQL rather than hardcoding as shown in the script
'210010106140040100' == '210010106140040101'
Debugging this simple line of a PHP scriptCode: if($a == $b){ } I've found that with value of$a = '210010106140040100' (type = string)$b = '210010106140040101' (type = string)the result of the
what business processes?
Hi,
Need help/w Page: 1,2,3,4 function!
So I have this code im working on where it's ment to display seperate pages having 20 logs eachI'm having SOOOOOOOOO much trouble with it... it's supposed to work! >,<I get the right
Easy administration on MySQL databases
My website is database driven and I am very tired of manually making queries to my tables in order to update my site. I decided to make a form that only I should have access to that PHP can filter and
Greek characters in php
Hi,I'm making a script and I m using for first time greek characters.I started to write a simple drop down menu that loads some city names from the database. The names are in Greek in the database and
problem in program for counting no of chars using pointers
Hi all, I was trying to make a program which counts number of chars in a string using concpt of pointers. Following is the code:
Help with echo()
I'm having some problems with this code:Code: echo ' <A