[PHP] One form - Two emails, I need some help please

2002-01-29 Thread Edward R. Bailey

Hi,

I am trying to submit the contents of a form via email to a set address
and then send a confirmation email based on the entered email address
from the form.

Sending the confirmation email works fine but the second email
confirming delievery of the email is not working. Right now the script
is not picking up the user email varible from the form. The email field
name is biz_email and you can see where I set the varible in the script
$mailto=$biz_email. When I test the form I get the first email without
any problems but the second email comes back to me with the error
stating the user is unknown and I see nobody@"domain name" in the To:
field. So I guess the varible from the form is not being picked up. Any
ideas

Below is the relevent code - I would greatly appreciate any help -
thanks

if (isset($PHP_MAIL_FORM)) {
include("classes/MailClass.php");
$tgFormMail=new phpMailer();
$mailto= "Webmaster Form Submission email address";
$subject="Basic Registration Submission Form";
$from="Website";
$FormMail_sent ="home.php";
if ($from ==""){
$lol =$HTTP_HOST;
$a = str_replace ("www.","",$lol);
$replaced = "webmaster@$a";
$from = $replaced;
}
if($subject ==""){
$subject ="Server Generated Email";
}
$i=0;
$arr = array($HTTP_POST_VARS);
while(list($key, $val) = each($HTTP_POST_VARS)) {
$mex = $mex."$key: $val\n";
}
$FormMail->AddSender($from,$HTTP_HOST);
$FormMail->AddAddress($mailto,$mailto);
$FormMail->SetSubject($subject);
$FormMail->AddBody($mex);
$FormMail->Send();
if($tgFormMail_sent != ""){
header("Location: $FormMail_sent");
}
}
if ($PHP_MAIL_FORM=true){
   include("classes/MailClass.php");
   $FormMail=new phpMailer();
   $mailto=$biz_email;
   $subject1="Your Submission has been recieved";
   $message="Submission email body";
 
   $FormMail->AddSender($from,$HTTP_HOST);
   $FormMail->AddAddress($to,$to);
   $FormMail->SetSubject($subject1);
   $FormMail->AddBody($messsage);
   $FormMail->Send();
if($tgFormMail_sent != ""){
header("Location: $FormMail_sent");
}
}


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Custom email after form submission

2002-01-29 Thread Edward R. Bailey

Can anyone point me in the right direction about how to send a custom
email to a user after a form submission. The user would provide their
email address in the form.

Thanks

Ed


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Easy Question -- Show/ Hide text based on output of query

2002-02-05 Thread Edward R. Bailey

Hi,

I am working on a page the displays the output of a query in a table and
I only want to show the field labels that have corresponding output from
the database. I am only really concerned with the last label in the
table.

The label is called "Notes" and the corresponding field in the database
is "memberNotes" 

So I wrote the following script where I think I am saying if memberNotes
returns any value then print the output of $notes in the table cell
where it is called, but nothing happens and the output of $notes is not
displayed regardless whether "memberNotes" has any output.

Notes:";
 }else {
  $notes = "";
 }
?>

In the table cell I placed the following



Can anyone see what I am doing wrong??

Thanks for the help

Ed


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Easy Question -- Show/ Hide text based on output of query

2002-02-05 Thread Edward R. Bailey

I used echo($notes) at the bottom of the page and the output of $notes
prints reardless of whether or not the db field $memberNotes contains
any data. It seems to me that $notes is always acting as if $memberNotes
always contains data. Is their some way to invoke $notes only if
$memberNotes returns any data?

Thanks for your help,
ED



> -Original Message-
> From: Jason Wong [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, February 05, 2002 1:22 PM
> To: PHP General Mailing List
> Subject: Re: [PHP] Easy Question -- Show/ Hide text based on 
> output of query
> 
> 
> On Wednesday 06 February 2002 02:14, Edward R. Bailey wrote:
> 
> Please keep the discussion on the list!
> 
> > Thanks for responding! Yes the "memberNotes" database field only 
> > contains information in about a third of the records so I wanted to 
> > hide the entire field and label when their was no relevent data.
> >
> > I made the change you suggested, but the field label does 
> not show up 
> > when "memberNotes" contains data. As follows is the current 
> script. Is 
> > what what you suggested?
> >
> >
> >  > $notes = " > size=\"/-1\"/>Notes:";
> >   } else {
> > $notes = " > size=\"/-1\"/>";
> >   }
> > ?>
> 
> What are those forward slashes (/) doing in $notes? Try 
> getting rid of them, 
> they don't look very HTML to me :)
> 
> Also try echo($notes) OUTSIDE of a  construct to see 
> what it contains.
> 
> 
> hth
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> 
> /*
> Q:What do Winnie the Pooh and John the Baptist have in common?
> A:The same middle name.
> */
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Easy Question -- Show/ Hide text based on output of query

2002-02-05 Thread Edward R. Bailey

Sorry -- Here it is


 Notes:";
   } else {
 $notes = "";
   }
 ?>

Then I call $notes using --

echo ($notes)

> -Original Message-
> From: Jason Wong [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, February 05, 2002 1:39 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Easy Question -- Show/ Hide text based on 
> output of query
> 
> 
> On Wednesday 06 February 2002 02:38, Edward R. Bailey wrote:
> > I used echo($notes) at the bottom of the page and the 
> output of $notes 
> > prints reardless of whether or not the db field 
> $memberNotes contains 
> > any data. It seems to me that $notes is always acting as if 
> > $memberNotes always contains data. Is their some way to 
> invoke $notes 
> > only if $memberNotes returns any data?
> 
> 
> Please post your full code.
> 
> 
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> 
> /*
> "I go on working for the same reason a hen goes on laying eggs."
> - H. L. Mencken
> */
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Easy Question -- Show/ Hide text based on output of query

2002-02-05 Thread Edward R. Bailey

Thanks for all your help, but I figured out what I did wrong

I was calling the memberNotes field using

 echo $get_detail->Fields("memberNotes") 

so when I replaced $memberNotes in the script with
$get_detail->Fields("memberNotes") it worked like a charm

 If ($get_detail->Fields("memberNotes")) {
 $notes = "Notes:";
} else {
 $notes = "";
}

Dumb error on my part. 

Thank you very much for your patience,

Ed


> -Original Message-
> From: Jason Wong [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, February 05, 2002 1:53 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Easy Question -- Show/ Hide text based on 
> output of query
> 
> 
> On Wednesday 06 February 2002 02:53, Edward R. Bailey wrote:
> > Sorry -- Here it is
> >
> >
> >   >  $notes = " > size=-1>Notes:";
> >} else {
> >  $notes = "";
> >}
> >  ?>
> >
> > Then I call $notes using --
> >
> > echo ($notes)
> 
> I meant your *whole* script -- never mind, have you tried 
> echo($memberNotes) 
> to see what that contains? Are you sure it doesn't contain 
> spaces or other 
> non-visible characters?
> 
> 
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> 
> /*
> "All language designers are arrogant.  Goes with the 
> territory..." (By Larry Wall) */
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: DreamWeaver/PHP ability?

2002-02-07 Thread Edward R. Bailey

 
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Actually Ultradev does support PHP if you buy a php application
server extension. A company in Romania (The name escapes me) makes
the extension and I have heard it works very well. I am sure somebody
can find the name of the company by searching for "PHP & Ultradev &
extension".

Just my two cents,

Ed

> -Original Message-
> From: Gary [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, February 07, 2002 7:15 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: DreamWeaver/PHP ability?
> 
> 
> There is no PHP support in Dreamweaver UltraDev.
> 
> Gary
> 
> Luke Crouch wrote:
> 
> > I know Dreamweaver UltraDev has nice site management features for
> >  using a JSP/SQL type serverdoes it have similar 
> capabilities with 
> > PHP/MySQL? Does anyone know?
> > 
> > -L
> > 
> > 
> > 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-BEGIN PGP SIGNATURE-
Version: PGPfreeware 7.0.3 for non-commercial use 

iQA/AwUBPGMzjd/a5giN7qTnEQJQZQCffLQzy7ZQMQccQdcsjYv3Ha/L5m4AoJL3
JuORBJVQ7el//bdKgUWesnoH
=rB4g
-END PGP SIGNATURE-


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Assigning the contents of a file to a variable

2002-04-11 Thread Edward R. Bailey

Hi,

I am trying to create an html automatic response email to users that
fill out a form.

Workflow - 

1. User fills out form and selects submit
2. The contents of the form are then mailed to a secretary for record
keeping
3. (Where the problem is) An html based email is sent to the email
address that the user entered into the form.
4. The user is redirected to a confirmation page

Ok - steps one and two work fine so on to step three.

After the code that mails the form then my code --

if ("PHP_MAIL_FORM=true") 
{
$to = "$address_email";
$subject = "Uncharted Outposts Newsletter";
$message = Test Email;
$headers = "To: $name_first <$address_email>\nFrom: \nReply-To: \nMIME-Version: 1.0\nContent-type:
text/html; charset=iso-8859-1\n"; 
mail($to, $subject, $message, $headers);  
}

Where $address_email and $name_first are variables from the form

The script as is works fine, but I want to assign the contents of a
separate file (a web page) to $message instead of inserting the contents
of the file as a string in the actual script. I want the body of the
email to come from a separate file to help make changing the body of the
email easier too. I tried using - 

readfile("includes/news.html")

But that did not work and instead inserted file into the actual webpage
instead of the email.

Does anyone have an idea or suggestion?

Thanks for your help,

Ed


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: Assigning the contents of a file to a variable

2002-04-12 Thread Edward R. Bailey

Thanks for helping a newbie out - fread() worked perfectly:)

Ed

> -Original Message-
> From: CC Zona [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, April 11, 2002 5:21 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: Assigning the contents of a file to a variable
> 
> 
> In article <00bc01c1e131$7a7bb7e0$[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED] (Edward R. Bailey) wrote:
> 
> >  I want to assign the contents of a separate file (a web page) to
> >  $message instead of inserting the contents of the file as 
> a string in 
> >  the actual script. I want the body of the email to come 
> from a separate 
> >  file to help make changing the body of the email easier 
> too. I tried 
> >  using - 
> > 
> > readfile("includes/news.html")
> > 
> > But that did not work and instead inserted file into the actual 
> > webpage
> > instead of the email.
> > 
> > Does anyone have an idea or suggestion?
> 
<http://php.net/file> or <http://php.net/fread>

-- 
CC

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php