Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Parse error: syntax error, unexpected T_STRING, expecting ')' in
Old 10-07-2010, 03:26 AM Parse error: syntax error, unexpected T_STRING, expecting ')' in
Isabella_Smith's Avatar
Ultra Talker

Posts: 285
Trades: 0
Hi,

I am facing syntax error for the, It seems fine....I don't know where it mistook.

Please see the code below:

PHP Code:

require_once ("Mail.php");
session_start();

if(
$_POST['verifycode']==$_SESSION['security_code'])
{
        
$from "Sandra Sender info@mydomain.com";
        
$to "Ramona Recipient myname@gmail.com";
        
$subject "Hi!";
        
$body "Hi,\n\nHow are you?";
        
        
$host "mail.mydomain.com";
        
$username "info@mydomain.com";
        
$password "abcdefg";
        
        
$headers = array (''From'' $from,''To'' $to,''Subject'' $subject);
        
$smtp Mail::factory(''smtp'',    array (''host'' $host,''auth'' true,''username'' $username,''password'' $password));
        
$mail $smtp-send($to$headers$body);
        if (
PEAR::isError($mail)) {
        echo(
$mail-getMessage() . p);
        } else {
        echo(
Message successfully sent!p);
        }
}
else
{
    
$_SESSION['msg'] = "Please enter correct verification code.";
    
header('Location: ../askquote.php?');

__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE



Please login or register to view this content. Registration is FREE
buy all indian salwar Kameez, Sarees and clothes
Isabella_Smith is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-07-2010, 03:42 AM Re: Parse error: syntax error, unexpected T_STRING, expecting ')' in
miki86's Avatar
Extreme Talker

Posts: 185
Location: print_r($serbia);
Trades: 0
Are you sure this lines are correct?
PHP Code:
echo($mail-getMessage() . p);
        } else {
        echo(
Message successfully sent!p); 
What is "p"? Constant? String? Paragraph?

I think it goes like this:
PHP Code:
echo '<p>' $mail-getMessage() . '</p>';
        } else {
        echo 
'<p>Message successfully sent!</p>'

Last edited by miki86; 10-07-2010 at 03:48 AM..
miki86 is online now
Reply With Quote
View Public Profile
 
Old 10-07-2010, 03:57 AM Re: Parse error: syntax error, unexpected T_STRING, expecting ')' in
Isabella_Smith's Avatar
Ultra Talker

Posts: 285
Trades: 0
Its solved now....thanks miki
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE



Please login or register to view this content. Registration is FREE
buy all indian salwar Kameez, Sarees and clothes
Isabella_Smith is offline
Reply With Quote
View Public Profile
 
Old 10-07-2010, 05:28 AM Re: Parse error: syntax error, unexpected T_STRING, expecting ')' in
miki86's Avatar
Extreme Talker

Posts: 185
Location: print_r($serbia);
Trades: 0
No problem
miki86 is online now
Reply With Quote
View Public Profile
 
Reply     « Reply to Parse error: syntax error, unexpected T_STRING, expecting ')' in
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.19095 seconds with 12 queries