Left Quote    I find that the harder I work, the more luck I seem to have.
- Thomas Jefferson    
Right Quote
[login] | [Register]
Forum Index » PHP and mySQL » Viewing Topic and Replies
Post Reply

        Viewing Topic: p problems
  This user is offline  swaves
  Subject: " p problems" Posted: @ 7:08 pm on Feb 10 2009   
Member #: 856
Rank: User - (1)
Since: 02/10/09
Posts: 1

I am a noob at php and trying to figure this out is making my head explode! So I am posting here in hopes that someone can help me figure this out. I have a "sendtofri end.php" that is giving me errors. It is in a program I bought, but I am getting no help from the seller. Below are all the related php's. Any help would be appriciated. If you can show an expample of what it should look like that would help greatly. Also I am on a Linux server.

errors in p:
Parse error: parse error, unexpected T_VARIABLE in /u34/swaves/ema gs/sendtofriend .php on line 7

include on line 4 (.:/usr/local/p hp/include) - this I gather is the include path of the mail.php. Where is this & how on line 4?
config.php (**** to block out private info)


#Change the value of the following variables according to your configuration

$smtphost = "*****&quo t;; #SMTP Server name/IP
$smtpport = 587; #Change to your SMTP server port if not 25
$username = "****" ;; #SMTP UserName
$password = "****" ;; #SMTP Password
$fromName = "Sound Waves Magazine"; #A default name value to indicate where the email is from
$fromEmail = "****" ;; #A default email value to indicate where the email is from

function SendEmail ($strFrom,$strT o,$strSubject,$ strMailBody){
$headers = array ('From' => $strFrom,
'To' => $strTo,
'Content-Type' => "text/html ; charset=ISO-885 9-1",
'Subject' => $strSubject);

$smtp = mail::factory(' smtp', array ('host' => $GLOBALS['smtph ost'],
'auth' => true,
'port' => $GLOBALS['smtpp ort'],
'username' => $GLOBALS['usern ame'],
'password' => $GLOBALS['passw ord']));

$mail = $smtp->send( $strTo, $headers, $strMailBody);

if (PEAR::isError( $mail)) {
return "action=er ror occured";
//return $mail->getMe ssage();
} else {
return "action=se nt";
Bold Text HereBold Text Here

---------- p


include("c onfig.php"< img src=http://www. orums/images/sm ilies/wink.gif border=0>;
require_once "mail.php& quot;

$job=$_REQUEST[ "job" ];

if($job==" sendtofriend&qu ot
$yname=$_REQUES T["yname&q uot;];
$yemail=$_REQUE ST["yemail "];
$fname=$_REQUES T["fname&q uot;];
$femail=$_REQUE ST["femail "];
$message=$_REQU EST["Messa ge"];
$url=$_REQUEST[ "Url" ];

$msg="Your friend <b>" .$yname."& lt;/b> (".$yemail ." sent you this article!<br& gt;";
$msg.="< ;br><br&g t;<a href=".$ur l."> Click here to view article</a&g t;";
$msg.="< ;br><br&g t;".$url;
$msg.="< ;br><br&g t;Your friend's message:<br& gt;<br>&q uot;.$message;

$subject=$yname ." sent you an article!";

//echo SendEmail($GLOB ALS['fromName'] ."<&quo t;.$GLOBALS['Fr omEmail']." ;>",$fe mail,$Subject,$ msg);
echo SendEmail($fema il,$Subject,$ms g);

} else {
echo("acti on=error occured";


Edited at 07:18:18 pm on 02/10/09

    Viewed: 2,503 Times | Reply to This | To top
Viewing Page: 1 of 1

You must be logged in to post on the forums. Login or Register

"" Copyright © 2002-2018; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank