I need to have a php script pull data from a mysql table and send it
in the body of an email
I know I can get the script to display information in the browser by
doing this:
$i=0;
while ($i < $num) {
$who=mysql_resu lt($result,$i," who");
$where=mysql_re sult($result,$i ,"where");
echo "<b>$who</b><br>$where<hr ><br>";
$i++;
}
and the output will look like:
john
toronto
If I use:
$message = "message text goes here";
I can get an email where the message reads "message text goes here"
how do I replace "message text goes here" with the information from
the mysql table 4 2062 ca******@gmail. com wrote:
I need to have a php script pull data from a mysql table and send it
in the body of an email
I know I can get the script to display information in the browser by
doing this:
$i=0;
while ($i < $num) {
$who=mysql_resu lt($result,$i," who");
$where=mysql_re sult($result,$i ,"where");
echo "<b>$who</b><br>$where<hr ><br>";
$i++;
}
and the output will look like:
john
toronto
If I use:
$message = "message text goes here";
I can get an email where the message reads "message text goes here"
how do I replace "message text goes here" with the information from
the mysql table
you are kidding right?
How about $message = $who."\n".$wher e; ca******@gmail. com wrote:
>I need to have a php script pull data from a mysql table and send it
in the body of an email
I know I can get the script to display information in the browser by
doing this:
$i=0;
while ($i < $num) {
$who=mysql_resu lt($result,$i," who");
$where=mysql_re sult($result,$i ,"where");
echo "<b>$who</b><br>$where<hr ><br>";
$i++;
}
and the output will look like:
john
toronto
If I use:
$message = "message text goes here";
I can get an email where the message reads "message text goes here"
how do I replace "message text goes here" with the information from
the mysql table
We cannot tell you as there is insufficient information here to tell where
that data is stored.
On Mar 20, 6:32 pm, Michael Austin <maus...@firstd basource.comwro te:
canaj...@gmail. com wrote:
I need to have a php script pull data from a mysql table and send it
in the body of an email
I know I can get the script to display information in the browser by
doing this:
$i=0;
while ($i < $num) {
$who=mysql_resu lt($result,$i," who");
$where=mysql_re sult($result,$i ,"where");
echo "<b>$who</b><br>$where<hr ><br>";
$i++;
}
and the output will look like:
john
toronto
If I use:
$message = "message text goes here";
I can get an email where the message reads "message text goes here"
how do I replace "message text goes here" with the information from
the mysql table
you are kidding right?
How about $message = $who."\n".$wher e;
unfortunately I'm not kidding, we have a form that sends to a
database, I tried to get to get it to send an email at the time the
form is submitted when a certain condition is met but no-one seems to
know how to do it, so the next best thing was to write a php script
and run a cron job with wget to search the database once a day looking
for entries that meet the criteria and send the email to the people
who need it
tried your suggestion, but it didn't work :( no email gets sent, but
it does give me some ideas
thanks ca******@gmail. com wrote:
On Mar 20, 6:32 pm, Michael Austin <maus...@firstd basource.comwro te:
>canaj...@gmail .com wrote:
>>I need to have a php script pull data from a mysql table and send it in the body of an email I know I can get the script to display information in the browser by doing this: $i=0; while ($i < $num) { $who=mysql_re sult($result,$i ,"who"); $where=mysql_ result($result, $i,"where"); echo "<b>$who</b><br>$where<hr ><br>"; $i++; } and the output will look like: john toronto If I use: $message = "message text goes here"; I can get an email where the message reads "message text goes here" how do I replace "message text goes here" with the information from the mysql table
you are kidding right?
How about $message = $who."\n".$wher e;
unfortunately I'm not kidding, we have a form that sends to a
database, I tried to get to get it to send an email at the time the
form is submitted when a certain condition is met but no-one seems to
know how to do it, so the next best thing was to write a php script
and run a cron job with wget to search the database once a day looking
for entries that meet the criteria and send the email to the people
who need it
Get someone competent to do your scripting. It should be a pretty minor
matter to add this to the script which stores data in the database.
tried your suggestion, but it didn't work :( no email gets sent, but
it does give me some ideas
thanks
It's not that hard in many cases, but can be very difficult in others.
It depends mainly on how your email server is set up.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== === This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: dave |
last post by:
I am trying to generate an email from the webpage using code below, which
works fine. However I want to be able to include some dyanmic data how do I
go about it ?can anybody point me in the direction of some sample code ?
Thanks Dave
<%@ Language=VBScript %>
<HTML>
<HEAD>
|
by: mike |
last post by:
I have created a side application in VB.NET which reads
rows from a DB and builds an email message.
when i have a long string the the mailmessage.body or the
mailmessage, it puts in an "!<linefeed><space>" at about
every 980th space. I have confirmed that these characters
are not in the string or the message body before the email
is sent. Has anyone seen this or have any thoughts?
Thanks
|
by: Nigi |
last post by:
I've made a mysql database with php front end which, in part, contains
mailing lists. I've used a mailto: link to create a new email with
their names in the bcc: field.
Unfortunatley their is a limit on the size of a mailto: field that
outlook can accept, and so it can't be used to mail more than about 80
people at a time. Our lists go up to 200.
Can anyone suggest a workaround that will enable people to follow a
link to a new email...
|
by: Zman |
last post by:
I've recently added form functionality on my website, which runs with the
aid of a perl script and sends the results via an email message.
I'm currently able to import, or link, data from a specific mail folder
(Outlook 2002) to an MS Access database (Access 2002). However, my problem
is the message body, which contains the data I'm interested in, is all
placed in the one field.
I would like the data contained in the message body to be...
|
by: I am Sam |
last post by:
Ok I don't know what is the problem with my code But I am trying to build a
newsletter that gathers parameters from 3 textbox controls and a Listbox
control. The form then queries the event table based on 2 of the textboxes
one for the start date of the events required and one for the last date of
the events required. The 3rd textbox works fine. It passes the text from the
textbox to the stringbuilder I built on the codebehind just fine....
| |
by: chris_fieldhouse |
last post by:
Hi,
I have a script for processing emails,
The script finds email sent to a particular alias, grabs the body text
of the email and stores it into a database.
Problem is that certain character like '_' sometimes get stored as =5F,
and some email clients seem to add in =0D encoded characters.
I store the text in an Mysql database, and depending on the message
|
by: Ken D. |
last post by:
I have an asp page that collects data on referrals. The user inputs the
information and selects the rep to receive the referral. My data is being
saved to a backend database (SQL) and the user is receiving a confirmation
page after hitting the Submit button. Now, what I need is a way to have an
email sent to the rep that is selected in the drop down list on the asp form.
I have a SQL table containing the reps and corresponding email...
|
by: 5070707 |
last post by:
Hi all!
I have a small form build with visual studio 2005 (Visual Basic)
in that form i have some text boxes and some combos.
these are being field by the users followed by an mail submit button i
created using a snipet.
the button code:
Private Sub butmail_Click_1(ByVal sender As System.Object, ByVal e As
|
by: ddtpmyra |
last post by:
Need help as a newbie I'm trying to create auto email everytime the users execute the button below. Please tell me what wrong with my mail.php file
<html>
<head>
<form action="mail.php" method="POST" enctype="multipart/form-data">
<input type="submit" value="mail now">
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |