Current location: Hot Scripts Forums » Programming Languages » PHP » Emailing users Information


Emailing users Information

Reply
  #1 (permalink)  
Old 07-13-04, 11:17 PM
mcrob mcrob is offline
Coding Addict
 
Join Date: Jul 2004
Posts: 266
Thanks: 0
Thanked 0 Times in 0 Posts
Emailing users Information

Ok I used this server behaviour that allowes you too send out emails. What I want too do is after the user registers, there username and password emails too them but i am having a lil problem. A stupid parse error

PHP Code:

<?php require_once('MainConnection.php'); ?>

<?php
mysql_select_db
($database_MainConnection$MainConnection);
$query_users "SELECT * FROM dbusers ORDER BY firstName ASC";
$users mysql_query($query_users$MainConnection) or die(mysql_error());
$row_users mysql_fetch_assoc($users);
$totalRows_users mysql_num_rows($users);

// DWTeam HTML Email
$htmlheader "Content-Type: text/html; charset=us-ascii\n";
$htmlheader .= "Content-Transfer-Encoding: 7bit";
$to "<?php echo $row_users['email']; ?>
"
$subject ="welcome"$message join("",file("emailedUsersInfo.php")); $from ="From: RoB<mseerob@yahoo.ca>"$replyto ="reply-to: [email]mseerob@yahoo.ca[/email]"$header $from// set the from field in the header $header .="\n"; // add a line feed $header .= $replyto; // add the reply-to header to the header $header .="\n"; // add a line feed $header .="MIME-version: 1.0\n"; //add the mime-version header $header .= $htmlheader."\n"; mail($to, $subject, $message, $header); // send the e-mail ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>

</body>
</html>
<?php
mysql_free_result
($users);
?>
please alert me ASAP
RoB

Last edited by mcrob; 07-13-04 at 11:20 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 07-14-04, 12:10 AM
kvnband kvnband is offline
Wannabe Coder
 
Join Date: Jun 2003
Posts: 242
Thanks: 0
Thanked 0 Times in 0 Posts
You mind telling us where supposed parse error is?

First thing I see:
Code:
$to = "<?php echo $row_users['email']; ?>
Why are you re-opening the <? tags inside of <? tags? No need to do that. Just have
Code:
$to = $row_users[email']; $subject = "welcome"; $message = join.........
That help ya at all?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 07-14-04, 08:07 AM
mcrob mcrob is offline
Coding Addict
 
Join Date: Jul 2004
Posts: 266
Thanks: 0
Thanked 0 Times in 0 Posts
PHP Code:

// DWTeam HTML Email

$htmlheader "Content-Type: text/html; charset=us-ascii\n";
$htmlheader .= "Content-Transfer-Encoding: 7bit";
$to "$row_Recordset1[email]";
$subject ="welcome";
$message join("",file("emailedUsersInfo.php")); $from ="From: Rob<mseerob@yahoo.ca>"$replyto ="reply-to: [email]mseerob@yahoo.ca[/email]"$header $from// set the from field in the header $header .="\n"; // add a line feed $header .= $replyto; // add the reply-to header to the header $header .="\n"; // add a line feed $header .="MIME-version: 1.0\n"; //add the mime-version header $header .= $htmlheader."\n"; mail($to, $subject, $message, $header); // send the e-mail ?> 
still doesnt work
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 07-14-04, 11:35 AM
optix's Avatar
optix optix is offline
Newbie Coder
 
Join Date: Jul 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Again, where is the parse error??? What is it?? give more detail!
__________________
[B] ModernConspiracy.com - Conspiracy Theory Forums (Talk Conspiracy)
DIYAutoForum.com - DIY Auto Forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 07-14-04, 12:00 PM
kvnband kvnband is offline
Wannabe Coder
 
Join Date: Jun 2003
Posts: 242
Thanks: 0
Thanked 0 Times in 0 Posts
Uh, why are there [ email ] [ /email ] tags? Are those supposed to be there, because...well, I don't think they should
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 07-14-04, 02:30 PM
mcrob mcrob is offline
Coding Addict
 
Join Date: Jul 2004
Posts: 266
Thanks: 0
Thanked 0 Times in 0 Posts
Basically Im using the server behaviours on dreamweaver mx 2004. And I guess it just does that. Is there an alternative way in doing this?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #7 (permalink)  
Old 07-14-04, 02:57 PM
kvnband kvnband is offline
Wannabe Coder
 
Join Date: Jun 2003
Posts: 242
Thanks: 0
Thanked 0 Times in 0 Posts
I don't know anything about dreamweaver server behaviors or anything like that. However, if you could post the full script up here, and the EXACT lines that you get the parse error on, then you would have your problem solved today.

Help us help you

Kevin
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
retaining information between pages davidklonski PHP 0 05-31-04 06:36 PM
Query for existing users and emails mdhall PHP 7 02-21-04 02:56 PM
Emailing a form HUH? icesayain2k HTML/XHTML/XML 5 01-13-04 01:13 PM
Need Epinions-lite system in PHP & MYSQL wali001 Job Offers & Assistance 4 01-12-04 07:02 AM
Help Transfering information praeclarus PHP 1 07-24-03 07:03 PM


All times are GMT -5. The time now is 01:03 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.