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
compile php5 with DOM
Hi,I can't manage to compile php 5.3.0 from source on Windows to include DOM,in spite of the documentation saying that DOM is built into PHP5.I'm compiling php 5.3.0 using the following minimalistic
$_FILES array
Ok,I just started experimenting with PHP today. My goal right now is to have people be able to upload files to my website, but I am starting at square one. I can make a .php print out the name of
Help with PHP Email Script
Hi guys,I'm a newbie to php and need help with the script below:At the moment when I receive the automated email of data, I'm not receiving any information with the form field names I receive blank
How can i use [] tags instead of <> tags for profiles??
On my site im making ive made it so u can register, login and u have a profile which u can update..http://90.202.46.253thats the site, if u go on there, regsiter and login u will see that u can then
get font info from a font file
hello,Does anyone know how to get font info from a font file ... using php of course ! The stuff I need to extract is Font Family, Author, Copyright etc which is contained as attributes in the font
Is there a quick way to do this?
Hi all,I need to create a mysql table from php that goes a little something like thisid, name, total, place1today, place1yersterdayhowever place1today and yersterday need to goto place2, place3 upto
Filename and Line Number Custom Error
I have a class, with a method that accepts 2 parameters. I would like to output error messages. So, lets say a new file is created, and my class is used in that file. We will call that file test.php
Inserting the current date/time while submitting the forum
What do I need to add below to update the current date/time? I have a field in the database called datetime. I tried to use Now() but its not working. Code: <?php$con =
Problem executing bash script using shell_exec
Hi there,I created a bash script file using following code to convert doc documents to pdf using OpenOffice macros.*************************doc2pdf:#!/bin/shecho "hi"DIR=$(pwd)
Blogging s/w
heya frndz!!! i want to start a blog.... m looking for a s/w like oscommerce which is thr for e-comm websites... so can u please suggest me some s/w through which i can set up the blog... thnx in