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




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?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
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?

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:

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]"

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...

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:

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 )

Form To Email AND Database
The server I am on requires using cgiemail to send form data. I want to also send this data to a mysql database using php. Is this possible? How?

Database/Email Script
I am no PHP programmer. At my current job I made it known that I was no
PHP programmer during the interview. Still they have given me a script
to write with the understanding that it will take me a while (This
information is just for general knowledge as I don't want anyone
thinking I am trying to be dishonest with my intentions. Also, I do not
portray myself as something I am not. I am a beginner.)

Anyway, what the script needs to do is to take variables passed from an
HTML form and do two things. One is read it into a database. The other
is to send me an email with all of the customer's information.

//Name of the script is test.php
<?php
//I am using this echo command to make sure that the variables where
passed correctly.
echo $_Post['FName']; //Never displays
//Here is where the script for the database connections starts
$username='username'
$password='password'
$hostname='localhost'
$databasename='database'
//Here is where the database connection is actually made
$conection = mysql_connect($hostname, $username, $password);
mysql_select_db($databasename) or die ("Cannot connect to
database");
//With the database connection open, I start to insert the data from
the HTML form.
$result = mysql_query("INSERT INTO table() VALUES($FName,
$LName, $Company, $Title, $Address, $Apt, $City, $State, $Zip, $Phone,
$Fax, $Email, $Var1, $Var2, $Var3, $Var4, $Var5)");
//After reading the information into the table, we close the database
connection
mysql_close();
//This is where the email script starts (Both the database and email
scripts are inside the same php tags)
$mail_to="email address";
$mail_subject = "Review Registration";
$mail_body = "First Name: $_Post[FName]";
$mail_body .= "Last Name: $_Post[LName]" ;
$mail_body .= "Company: $_Post[Company]" ;
$mail_body .= "Title: $_Post[Title]" ;
$mail_body .= "Street: $_Post[Address]" ;
$mail_body .= "Apt: $_Post[Apt]" ;
$mail_body .= "City: $_Post[City]" ;
$mail_body .= "Zip: $_Post[Zip]" ;
$mail_body .= "Phone: $_Post[Phone]" ;
$mail_body .= "Fax: $_Post[Fax]" ;
$mail_body .= "Email: $_Post[Email]" ;
$mail_body .= "Var1: $_Post[Var1]" ;
$mail_body .= "Var2: $_Post[Var2]" ;
$mail_body .= "Var3: $_Post[Var3]" ;
$mail_body .= "Var4: $_Post[Var4]" ;
$mail_body .= "Var5: $_Post[Var5]" ;..........

Email Users From Database
I know how to code it all, but how should I go about emailing all users from a database?

The db has their emails and stuff.

Update Database With Data Received By Email
I d like to create a little script that check a mail box, get message and then update my progres database with data from the email. I need light on how to receive and process mail automatically.

POST To Mysql Database And Email Results?
I have a simple html form that POSTs to a mysql database. Can I, and if so, how can I, have it post to the mysql database, and email the form results too.

I also have some other html forms that just mail() the results. So I can do both things separately, but I'm not sure how to combine them.


Pulling Email Address From Database For Mail()
Maybe it's because it's late or maybe I'm just a newbie (couldn't be) but I'm having trouble with getting all the names from my database into my $to variable.

$sql_mail = "SELECT email
FROM players
WHERE email!= 'none'";
$result_mail = mysql_query($sql_mail);

//bunch of error message validation stuff...

//fetch email addresses from query
while($row_mail = mysql_fetch_assoc($result_mail)){
$to = $row_mail['email'].", ";
}
$subject = $_POST['subject'];
$headers .= "From: Me <email@site.com>";
$headers .= "Reply-To: email@site.com;
$message = $_POST['message'] . "";

//now before sticking $to in mail() now with my $headers, $subject and $message I figured that if I try that php will only include the first record.

echo $to; //returns first record as I figured.

How do I keep the list of emails from my while without having all the other stuff ($headers etc) repeat with every record?

Complicated Email Parse Or Text Extraction And Database Insertion
I am trying to strip some data out of numerous emails and place it in
my database. I know that this seems as if it has been done before.
But, this is a little different. First, the numerous emails all have a
set of data that needs to be extracted and inserted into the database.
Some of the data in the email is id, name, address, city, state, zip,
company, etc. The catch is that the date is formated and presented
differently in each email. Take into consideration the following email
examples:

- excert from email #1
ID:.............. 12345
Name:............ JOHN DOE
Address:......... PO BOX 9999
City:............ Somecity
State:........... CA
Zip Code:........ 90210 ....

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? 

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.*

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?

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:

Different Ip Addresses Returned By Different Websites
I'm posting this to comp.lang.php and comp.protocols.tcp-ip.

I'm quite new to php. I made a simple test page in php with
"_SERVER[REMOTE_ADDR]" and "_SERVER[REMOTE_PORT]" server variables. I
uploaded my page in tripod.co.uk as they provide free php hosting. The
above variables gave me an ip address and port number. To double
check, I tried few other websites such as www.whatismyip.com and
http://checkip.dyndns.org. The first one gave me a different ip from
the one shown by my test page. The second one, however, showed exactly
the same ip address. I don't know what's going on? Isn't it meant to
be just ONE ip?

I am behind Wingate proxy which is on another pc on my home LAN. I use
dial-up to connect to ISP.

Now about "_SERVER[REMOTE_PORT]". In my test page, after few
refreshments, the REMOTE_PORT number also chages to new number. Why is
this? As far as I understand, "REMOTE_PORT" is the port my computer
uses to communicate with the web server. So every time I refresh, does
it assign a random port number?

Method For Addresses Masking
I have domain:
http://www.main_domain.com/index.ph...1=2&parametr2=3
(and other site files like
http://www.main_domain.com/page1.ph...herparameter=32
http://www.main_domain.com/page2.ph...herparameter=11 etc.)
At this address there is an template site for many users. Personal site
is identified by userid.

I want to do short subdomain for all users like this:
www.hisowndomain.com?parametr1=2&parametr2=3
but this short address should call main domain (with masking long
address):
http://www.main_domain.com/index.ph...1=2&parametr2=3

www.main_domain.com/index.php?userid=23 -->

Mail() - Arriving At Some Addresses, Never At Others
My habitual use of mail() is causing me some grief. I am having
slightly different results depending on the server I use but the gist
is that mail() is returning 1, and I can send mail to yahoo.com,
gmail.com, and hotmail.com no problem. 100% success.

Same script from some servers gets mail through to cox.net addresses,
my ISP.

However, my own domain, nolaflash.com is not receiving these mails at
all, nor are several other domains on shared hosting servers.
NolaFlash.com and Artifexdev.com for two examples.

I have tried running the scripts on three different servers with the
only difference that the Cox address works on one AND if I host the
script on NolaFlash then the mail to NolaFlash addresses gets through.

Here are four ways I have tried this:

// NO HEADERS
$to = 'someone@gmail.com'
$subject = "Inquiry from some.com";
$msg = 'whatever'
$result = mail($to, $subject, $msg);

// FULL HEADERS
$to = 'someone@gmail.com'
$subject = "Inquiry from ENLA.com: $_POST[name] $_POST[company]";
$headers = "From: $_POST[name] <$_POST[email]>
";
$headers .= "Reply-to: $_POST[name] <$_POST[email]>
";
$headers .= "Return-Path: $_POST[name] <$_POST[email]>
";
$headers .= "Message-ID: <" . date("YdmHis") .
".TheSystem@".$_SERVER['SERVER_NAME'].">" . "
";
$headers .= "X-Mailer: PHP v". phpversion() . "
";
$result = mail($to, $subject, $msg, $headers);

// FULL HEADERS PLUS -f FLAG to set the envelope sender address
$to = 'someone@gmail.com'
$subject = "Inquiry from ENLA.com: $_POST[name] $_POST[company]";
$headers = "From: $_POST[name] <$_POST[email]>
";
$headers .= "Reply-to: $_POST[name] <$_POST[email]>
";
$headers .= "Return-Path: $_POST[name] <$_POST[email]>
";
$headers .= "Message-ID: <" . date("YdmHis") .
".TheSystem@".$_SERVER['SERVER_NAME'].">" . "
";
$headers .= "X-Mailer: PHP v". phpversion() . "
";
$result = mail($to, $subject, $msg, $headers,

Comparing Street Addresses (abbreviations And Such)
I have a database table that contains street addresses in the following
format:

123 Any St.
456 Some Rd.
7789 That Blvd.
etc.

I.e. Street number, street name, standard abbriviation of road type.

Now, I have a web form where people will type in an address. The
problem is for what I have in the database (123 Any St.) a person might
type in:

123 Any St.
123 Any Street
123 Any
123 Any Street Apt. 4D
123 Any St. # 4D
#4D 123 Any St
etc.

What would be my best bet here? What I need is a sort of "best match"
ability (I'm assuming), but I'm unsure how to do it. Anyone have any
really good ideas?

Note: I'm not interested in Apartment numbers. They should be ignored.
I'm only concerned with building locations.

Building Portable Server Addresses
I'd like to build – with PHP – a background-image url
on a server (Apache) (url itself or a full directory name).
I'd like to use a portable mechanism, I mean a PHP script
should work in Windows, Unix and Linux. In Windows I use:

...
<style type="text/css">

..a_class
{
<?php
$S_1 = getcwd()."/images/image_1.jpg"; //BACKGROUND PICTURE
echo "background-image: url($S_1);";
?>
....

Getenv Not In ISAPI? Workaround For Getting Ip Addresses?
I had a great idea that I would create temporary mysql tables for a "dynamic calculator" and have been stuck on how to identify the name of the temporary table - each user's IP address seems good. But I find out that this does not work in ISAPI installations - which is, I am fairly sure, my installation of php. I tried the script in the manual and it returns nothing. QUESTION: IS THERE A WORKAROUND?

below is from the php manual
-----------------------------------------------
string getenv ( string varname)
Returns the value of the environment variable varname, or FALSE on an error.
$ip = getenv ("REMOTE_ADDR"); // get the ip number of the user

Autoresponder Only Works For Hotmail Addresses?
I'm using the mail function to send an autoresponder out after people submit information on a website, using the email they provided in the form. It works fine when sending to hotmail addresses, but when tested on a college email addy, and aol addy and a cox.net addy, it never showed.

Is it being filtered as junk mail somewhere along the line (although the cox.net account is actually setup to accept all mail, according to the user)? Or what could be the issue. And, is there anyway to use a remote smtp server without editing the php.ini file? I don't seem to have access to it.

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:

Read E-mail Addresses From Outlook Express
how to read email addresses from outlook express (from local hard disk) It will be great if you help me to read e-mail addresses from and folders (of outlook Express) like Send, input, output etc).

Looking For A Database-driven Email "contact Manager" Application
I'm going to be collecting lots (a few thousand) email addys. Each of
these people will be interested in recieving mail on one or more
topics, with an open ended and growing number of topics. Mailman with
a BD application behing it might be ideal as it would let users add
and delete themselves and each topic would have it's own email list
name identity.

Including Files With Images And Relative/absolute Addresses
I have an included file (header.php) that contanis a reference to a graphic.
If I stay at the root level, then I can control the relative path of the
image.
eg. images/imagename.jpg

However, if I include this file (header.php) in a lower level directory then
of course, I end up with no image displaying as the relative path is no
longer correct.

Currently I am using the following to provide an absolute path to the image.

$path = "http://".$_SERVER["HTTP_HOST"]."/images/";
$image = $path."imagename.jpg";
echo "<img src="$image">";

This works fine, but looks klunky.

I would like to avoid specifying an absolute hardcoded path name so I can
load this function on any site I choose.

how to get images displaying when including a
header.php file in a lower lever directory?

Need Email Address From Submitted Html Email Form
I have an html email that contains a form with questions for the user to fill out. Without asking the user to re-input there email address into the form, is there a way for me to grab the email address its coming from when the user submits the form to the php processing program. I need a way to match the questions to the user when they submit the form.

Email Array Checking Validity Of Email Address
I had the following working but since I changed the email variable to an array it doesn't work. email[] This is part of an edit form where emails in the mailing lists can get updated however, before they get updated i need to check that each of the email addresses are valid.But the code doesn't work for the array. Code:

Hiding The Receipeint Email Address While Sending Email
i am sending an email using php. i dont want the receipeints to see the to address. the problem is i am sending to a mailing list email address. so how can i hide the to address and the from address if possible?

Block Email Address / Domain From Using Email Form
I keep getting the same person spamming people on my website through my email form.

The email address is they keep using is sadlowski_lidia@o2.pl but this sometimes changes to a different name but still from the o2.pl domain

How can I block anyone using my email from the domain name o2.pl

Why Does Mail() Only Send Messages To Some E-mail Addresses?
I've got a form that I use to collect information and store it in a MySQL database and use PHP to send a mail() message confirming registration. When I use my work e-mail address, I never receive the message, but when I use my home e-mail address, I get it right away. What am I doing wrong?

Google Groups Email Spider,Auction Software, Directory PPC Search Engine Software, Email Spiders - 1
Free download full version , all products

http://netauction8.url4life.com/

Groupawy
---------------
Google Groups Email spider. The first email spider for google groups.
Millions of valid and active emails in one easy location to collect.

Spiderawy
---------------
Email spider machine. Multithreads and Multiplexed connections per
thread with built in database system for the highest scalability and
performance. Email and URL spider and extractor.

Auction software for your site
----------------------------------------
Run your own auction site in minutes. Open source code in perl. Create
your own auction site in just a few minutes. NetAuction is the
complete auction package for every business from the personal to the
corporate business. SQL database backend for the highest scalability
and performance.

Directory, Pay per click search engine software
------------------------------------------------------------------
Open source code in perl. Build your own pay per click search engine
and build your entire sites in minutes with this software. NetEngine
is turn key Pay per click search engine and content management with
built in portal tools. SQL database backend for the highest
scalability and performance.

Site builder software
--------------------------------
Open source code in perl. Build and manage your sites with the fastest
browser based site builder and content management software ever.
NetBuilder is a complete package very easy to use for building your
sites online and offline with all the tools you ever need to manage
any site of any size.

Email list manager tools, free download full version
---------------------------------------------------------------------
Full Email lists tools suite. Email Extractor, Spider emails from
online web pages, Filter lists, Merge lists, Remove unsubscribe lists
from lists, Splitter to split larg email list file to smaller files,
Deduplicator to remove duplicated emails.

Email Authentication, How To Check If Just One Email
I've a few functions to check if an email is valid. What I'm wondering is how to make sure there are only one email for each field? What we are building is a contest in which a participant can send an invitation to up to 5 friends (5 email fields), sending an invitation would give one more chance of winning the prize.

The fields are 40 characters, but how do I prevent someone from entering 2 email in the same field provided that the 2 are less then 40 characters total? If the 2 email are complete it's not so much of a problem, the participant would only receive one extra chance not two the mail function would send to both email no problem (provided the user superated them by either a space of semi-colon). But if the second email is incomplete and the user doesn't notice it then the mail admin would receive an error stating that the second email is not good...

Anyway to prevent all that I really need to make sure of 2 things.
1) that there's only one email listed in the box and
2) that the email is valid.


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