Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Email All Addresses In A Mysql Table


I recently closed my site down for a few months, and now I'd like to invite all my members back. All addresses are in a mysql database and id like to email them all. is there a form i can make to email them a message. If possible id like to refer to them as their username. so an email would be sent like this

"Hi [username]"




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Send E-mail To Some Or All Email Addresses That Are In A Table
I have a DB table that contains the individual e-mail addresses.  I want to be able to send an email to some or all of the individuals on the table. Right now it will only send to one individual at a time. I have made an e-mail form using check boxes to select the e-mail address. Code:

Grab Email Addresses From MySQL And Send An Email....
I am making a simple mail form that will SELECT email address from a MySQL table based on the userid of the person sending the email.

if (isset($_POST['submit'])) {
require('../database.php');
$result = mysql_query("SELECT * FROM emailList WHERE merchantId = '".$_SESSION['id']."'") or die(mysql_error());

What would be the most efficient way of storing the email addresses from MySQL (may be 1 or may be 100) and then sending them in BCC to all the people gathered from the MySQL table?

How To Send PHP Email To 100+ Email Addresses
I have a script that send out html email and I have over 100 email address from people who would like to join my newsletter. But I cannot get my script to email all 100+ of these people. Any one know how I can do this? Code:

Using Php To Protect Email Addresses
I'm creating a site that has several contact email addresses. These are
vlid addresses, i'm wondering if i can use php to alter these addresses so
that spam harvesters can't get them, yet a normal user clicking on them can?

Email Addresses In Database
I've just created a login system, and everything works fine. There's only one problem that I'm faced with at the moment, and that's the update profile page.

Now when you appear on this page, the data form fields show up, containing your current username, email address, name etc. But when you click submit, it comes back with "Your email is already in use!". Yes it's in use, because the user is signed up with that address.

What piece of code would I need to add in order to update the profile without getting an email in use error?

How Do You Check For Dubious Email Addresses?
If I pull out a list of email addresses from the database, I'd like to get rid of some of the erroneous ones.

I want to get rid of blanks (i.e. they never bothered putting in an email address in the first place so there is just a blank) and check that each email address has a . and a @.

So the following records would not be displayed in the list

test@test
here.now.com

Mailings And Bounced Email Addresses
I'm developing a mailing list manager in PHP/MySQL. The idea is to have as many features as possible and I'm half way there. I just wonder if anyone here would know how to eliminate bounced email addresses so they just get removed from the database.

I have this idea to check MX mail server so it would check if the email address actually exists when the user is subscribing. That would be my first step, then (as a lot of bounced email addresses would still go through and because people change email addresses later). I thought that the if the email address bounced that it would be removed.
Any ideas or suggestions on how this can be accomplished would be great.

Hiding Email Addresses - Rot13
Before I try and reinvent the wheel, can anyone help me with a basic routine
to hide email addresses from harvesting.

I currently use pull my page content from a db and run this ereg_replace:
$pagetext=ereg_replace('[A-Za-z0-9_]([-._]?[A-Za-z0-9])*@[A-Za-z0-9]([-.]?[A
-Za-z0-9])*.[A-Za-z]+', '<a href="mailto:"><font
color="#0000FF"><b></b></font></a>', $pagetext);

This simply replaces any emails within the page text with an <a> tag.

What I would like to do is replace it with:
<script language="JavaScript">
document.write(rot13('<n
uers="znvy@rknzcyr.pbz">znvy@rknzcyr.pbz</n>'));
</script>

So, somehow I need to PHP's str_rot13() on the email addresses before the
ereg_replace.

Get All The Email Addresses From A Text File
I have a .txt file with a lot of text mixed with some email addresses. I
would like to get all the email addresses in a $mails[] variable. Does
anyone know how to do this in php.

Validating Email Addresses In Windows
What are the methods used in validating email addresses in Windows i.e
what are the replacement for getmxrr? does anyone have an example?

Storing Email Addresses In A String...
If i pull say 10 email addresses from a mysql database, how can I show them onto the page, in a form along other inputs (e.g. an email message) so there are inputs like $message and $from, and then post these form values to sendForm.php, collect them and send an email to each email address - individulaly? My original idea was to send all the email addresses in a hidden field and collect them like this, but this obviously wont work becuase I'm sending other form data? Code:

Creating Email Addresses In Php Code
Is it possible to create email addresses in php code? I have checked the documentation and can't find it anywhere.

Displaying Email Addresses - Spam Protection
is there any function or class that converts you@example.com into
you [at] yourdomain [dot] com when an actual email is passed to the class/function?

I wrote <?php ...

Question About Blocking Email Addresses In Forms
I am wondering if there is a way to block out email addresses in specific
format from a form? We ahve a form that people have to enter an email
address, and the form has been getting used by bots to send spam to a
listserv. The email address they enter is in this type of format
gfjh...@jhgfghjk.com, and of course it is always just a bit different every...

Sending Form To Multiple Email Addresses
I am sending a form to multiple email addresses using the $header variable to cc a string of addresses. For some reason, when I enter one of the addresses, the form says there is an error. I can use other email addresses and it works fine. Im not sure what the problem is with this email address.

And ofcourse it is the one person that needs to receive the forms the most. I tried even just putting the email address in the mailto line and whenever this email is used in the php, the form will not validate. If anyone can help.. it will be the best birthday gift ever.. its my birthday.. WOO WOO 26.

Also, are there any limits on the number of addresses you can cc?

Here is my variable code:

$EmailTo = 'xxxxxxx@googlegroups.com';
$header = "cc: xxxxxxxx@ggsf.com, xxxxxxx@maverickssurf.com";

the email address that makes it crash is xxx@ggsf.com

Regex To Turn URL's And Email Addresses Into Links
Does anyone know of a regular expression that will turn email addresses and URL's into links to themselves? I was thinking of something like this, really, to avoid problems with full-stops being tagged onto the end of the actual link:

<link>http://www.site.com</link>
<link>don@site.com</link>

Or I could use the square-brackets instead of angle-brackets, which is probably better as I intent to strip out any other HTML tags.

Does anyone know what kind of regex I should use for this, and how would it be implemented in the PHP?

How Do I Prevent Bogus Email Addresses With Legit Domains? I Thought This Worked
I came up with functions that I thought would do the trick:

Code: ( php )

PHP, MySQL And IP-addresses
I use this code to store the IP addresse:

<?php
$IP = $_SERVER['REMOTE_ADDR'];
$query = "update mytable set ipaddr=inet_aton('$IP') where <some code>";
mysql_query ($query);
?>

When I do a 'select inet_ntoa(ipaddr) from mytable' most of the ip-addesses
shows up correctly, but one showed up as "127.255.255.255", which is
meaningless. Comparing to the log, the IP-address was 195.x.x.x

Is the $_SERVER['REMOTE_ADDR'] safe to use? Can it be something else that
the actual source of the http request to my server?

Ip Addresses, Php And Mysql.
as part of flood control for users registering on my site, i want to log their ip and stop any further registrations from that ip. what php functions should i look at to get their ip address?

Mail A Set Of Addresses From A MYSQL Result
I'm populating a field in MYSQL that collects email addresses for a certain topic and saves them like this:

mail1@mail.com|emailaddress2@mail.com|email3@email.com

- Basically what I'd like to do is explode the data, and set up a mailer from PHP that informs each of the addresses individually that there has been an update to the topic.

I *don't* want each of the mail addresses to be visible to all the recipients on the list, so simply inserting the data into the TO: field won't do, because then all the addresses are visible, causing security concerns. Code:

Grab Content From HTML Table And Place Into MySQL Table?
I am in the process of helping a co-worker upgrade some of his old static html pages into dynamic MySQL driven pages. He currently has a lot of pages with huge tables displaying data. Does anyone know if there is a script or class that can convert a table to a .sql file for upload?

Table Background Color Based On Results From MySQL Table
I am trying to get the "Did User Agree" field on a database query to be colored Green for "Agreed" Red for "Disagreed" and Blue for "Agreed (2nd Time)" .. I have my PHP setup to do the query just fine as of right now with alternating column colors, just can't seem to get the colors to work as I am hoping for.  Can anyone help me get the Agreed? table's background color to the colors above? Code:

Mysql Fetch_field Gets Table Alias, Not Real Table Name
After a SQL 'select .... from tablename alias'
the mysql_fetch_field function returns a value $result=>table which
will contain the alias, not the actual table name.
Is there a way to get the actual table name ?

I am running mysql 4.1 and php 4.4

Using PHP To Sort Data In MySQL Table 1 By Values In Table 2
I have a MySQL database with 2 tables in it. products and prices.. Products has a field in it called 'prodno'. Prices has a field in it called 'prodid'.

There is one of each item in products and each product has it's own unique 'prodno'

There are multiple instances of each product's pricing in prices.. One for each price.. So if a product had multiple prices depending on quantity it would have an entry for each price.. Example:

id = 1
prodid = 7001
qty = 300
price = 12.5

id = 2
prodid = 7001
qty = 400
price = 15.5

I was wondering if I could query the database getting info from the products table but sort it according to the prices in the prices table.

Kinda like doing a "SELECT * FROM products" ordering it by the lowest price value from each item..

This is all very confusing to me, and I'm the one writing it. Let's try one last time..

Query the database selecting * from products (I plan on using all the info in products) and ordering them by the lowest price for each item in the prices table. I've tried sorting the results of just a basic SELECT * FROM products using Javascript and PHP but with pagination in the results it makes it a bit hard.

Not Sending Email After Select From Table
I want users who have forgotten their registration number to be able to input there email address and have the registration number sent to them.  My problem is if they have more than one registration number with the same email address it will only send one email from the first row it come to.  If they have 3 registration numbers in 3 rows I want them to receive all three numbers.  It would be 3 seperate emails. Code:

Table Based Order Form That Can Email Text Entered?
I have a custom order form that I collaborated on with a friend who knows php.

The form needs updated and the code we put together is hard for me to read and update. I think the form can be refined or rewritten in a more OOP way and hopefully as sematic as possible.

The Form is for entering ready made frames. The Choices are color and size. Here is what I need to do:

Enter Name, Email, Store Number, Comments Etc.Create a table based form where users can only enter numbers in each text field.Upon completion, agreement, and submission of the order an html email is kicked to our inbox. The table remains as it was on the website due to html and a separate print css file. Code:

PHP/MySQL: Using PHP To Probe MySQL Db And Send An Email Automatically
Let's say you have a login feature on your site... and a user forgets their password which is stored along side their email address in a MySQL database. Is it possible to use PHP to automatically send the password to that email address upon request? If so, please provide a detailed solution. If not, can Java be used in some way to accomplish this?

Ip Addresses And AOL
I through together a poll script along with lots of help from the members here at phpfreaks...  We added an IP feature to prevent people from voting more then once.  And it works great however not with AOL for some reason if the user is using aol they are sent right back and it still shows the option to vote and they can keep voting... anyone here of this issue with aol and ip addresses? 

From CSV To MySQL Table
I've a CSV file with 3 columns

ID - Price1 - Price2

How I would like to update the records of a MySQL tables that has the
same ID of the CSV files.

How Can I do this? Read from CSV and update MySQL table?

Blocking IP Addresses
Hi, this is my code for only letting one ip address through.. mine.. problem: it blocks mine as well as everyone eles!! Any ideas would be great!! Thanks, ben

Code:
<?
$ip = "195.92.168.165";
if($REMOTE_ADDR != $domian):
?>

<html>
<head>
<title>
Jones Computer Network
</title>
</head>
<body>
Sorry you are not on a Jones Computer Network Computer so you will not be able to use this site.
</body>
</html>

<?
else:
?>
<html>
<head>
<title>
Jones Computer Network
</title>
</head>
<body>
U r logged in
</body>
</html>
<?
endif;
?>

Ip Addresses Won't Work
Hi I am trying only to let a group of people into my site, they all have the IP address that starts with a certain code, in this example 65.23.54.*

Finding Out IP Addresses
is it possible to get the persons IP address so that depending on what IP he has come from, I send him to a different page? any ideas?

Sorting By Ip Addresses
I am trying to sort some information from the database by ip address but for obvious reasons it does not sort the ips in a propper order for example the ips get listed like this: Code:

Exporting MySQL Table
Hi,

How do you export a MySQL table to a tab-delimited text file so I can put it into excel?

Select From A Mysql Table
I want to pull one field from a mysql table. How do I do that? Do I use SELECT? The field name is $sip_visitornum. And I want the last value that was inputted in to the db. I already have the code to get the visitor number but I don't know how to display data from the database properly. Thanks.

How To Create A MySQL Table With PHP?
How to create a MySQL table with PHP?

Getting Mysql Table Info?
Suppose I have a table with name 'tablename' in my database.

If I have no idea what are the contents of this table, is it still possible to retrieve the structural info in this table, like the field names and sizes?

Get Max Value In MySQL Table Field
I have a 2-field table "pageref".

The fields are: "pagerefno" - which is index and primary key, and "url".

I need to find the max value in "pagerefno", so wrote the following code:

$query ="SELECT max(pagerefno) FROM pageref";
$result = mysql_query($query) or die ("Error in query: $query. " .
mysql_error());
$row = mysql_fetch_row($result);
echo row[0];

But this results in a blank screen. I'd be grateful for a steer, here.

Search A MySQL Table
I want to create a php script to search a mySQL table. I started to create the script myself, but I got stuck, because the script became VERY complex. The reason why it's complex is this:

*the script must be able to search all four columns of the table.
if the user defines four different values to search (one for each type of variable (ie.: for each column)). If he doesn't give four values but by example only two, the script needs to search on these two values...

*the script needs to return all four values of all the rows that match the query

*the script may not return each result more than one time

*if possible, the script needs to return 'the best match' on top

examples:
consider a table with four columns:
animal_type |age | name | sex
horse | 5 |beauty| female
horse | 4 |bless |male
cat | 9 |***** |female

the query (horse,5,beauty,female) must return
horse | 5 |beauty| female (only one time!!! this sounds logic, but it isn't!!!)

the query(female) must return
horse | 5 |beauty| female
cat | 9 |***** |female

the query (horse, female) must return
1) horse | 5 |beauty| female
2) horse | 4 |bless |male
3) cat | 9 |***** |female
(number 1 must be on top; 2 and 3 may be changed of place, because they only match one variable!!)

Creating Mysql Table
I have PHP script that creates a mysql table. My problem is when I goto the following php page to access the table it says "missing table 'table name'" I look in phpmyadmin and its clearly there. Eventually after refreshing the page like ten times it detects and works. Do I have to reconnect the mysql connection or something?

PHP MySQL Updating Table Row
I have a small database of books that a client can add, search and edit (hopefully) books; all online (something very simple). So far I've been successful in creating the adding of books and searching and retrieving the info in fields to edit; but I haven't been able to execute the edits. Here's the script I have to retrieve the database info and place them in the fields to edit (I didn't copy all the mysql connection script, it works fine): PHP Code:

How To Get A Field In The Last Row Of Mysql Table.
There is a certain field that I wish to get in the last row (it will always be in the last row, even if I add to the table) of my mysql table. How do I output this? I assumed that I would be using a LIMIT command and a DESCRIBE command, however I looked at mysql.com and couldn't find anything .

Table Dump With MySQL
I have recently moved from a host that provided only 1 mySQL db, to a host that allows multiple db's. How do I dump a table, or tables from the single db...into a new db(s)?
I've used this before (to dump the entire db):

mysqldump -h mysite.com -q mysite_dbname > db_dump.sql -pmysitepassword

but I want to extract specific table(s) from the origian db and move them into newly created db's of their own on the new server.

Mysql Empty Table
does anyone know what the mysql comand to empty and table?

MySQL Table Create
Here is the code I'm trying to create the database with (I'm using phpMyAdmin so I just select the file I want to use and press submit and it creates the tables).

CREATE TABLE bips (
banned_ip varchar(15) NOT NULL);

CREATE TABLE messages (
entry_id double(16,4) DEFAULT &#390;.0000' NOT NULL auto_increment,
name varchar(25) NOT NULL,
email varchar(35) NOT NULL,
icq int(11) NOT NULL,
http varchar(50) NOT NULL,
message mediumtext NOT NULL,
when int(12) NOT NULL,
ip varchar(15) NOT NULL,
UNIQUE entry_id (entry_id),
PRIMARY KEY (entry_id));

------------------------
phpMyAdmin gives me an error with that, (none of those tables exists btw)... the error is

MySQL said: You have an error in your SQL syntax near 'when int(12) NOT NULL, ip varchar(15) NOT NULL, UNIQUE entry_id (entry_i' at line 8 .

Getting Mysql Table Size?
How would I go about getting the size of a table in a mysql database with php? I am unable to find info on this in the manual. Which page is it on?

PHP Variables From Mysql Table
I have a PHP script which parces a mySQL table and shows which
sections meet on which day by using an array containing (mon,...Fri)
and another lisitng sections. I then have the PHP do to selecrt
statements on to list those sections that are mixed and those that are
not.

I have a title "Open to Boys and Girls" then it cycles through the
applicable groups. I want to hide this title if there are no group
from the mysql search but can't figure out how as the actual varaible
$result is set once the search is done even if it pulls nothing back

Code is below,

CODE
-------------------------------------------
$result = @mysql_query("SELECT Group_Name FROM `groups` where
".$section."_comment like '%".$day."%' and ".$section."_comment like
'%mixed%'");
echo "<u>Open to Boys & Girls</u></br>";
while($row = mysql_fetch_array( $result )) {
$Group_Name = $row['Group_Name'];
echo "&bull; ".$Group_Name."</br>";
}// end Group Name loop mixed

Creating Table Using PSP And MySQL
Ok, so Ive overcome the first hurdle of connecting to MySQL and MyDatabase on my
web server using PHP scripts. Now I want to create a simple table with 3
fields. Don't have a clue where to start using PHP.

Date Into Mysql Table?
how I can add a date to a mysql table with php? I am wanting to add the date when an article has been entered into the table.


Copyright © 2005-08 www.BigResource.com, All rights reserved