View unanswered posts | View active topics It is currently Sun Dec 17, 2017 1:27 am



Reply to topic  [ 16 posts ]  Go to page Previous  1, 2
 Parse error: parse error, unexpected T_IF 
Author Message
Junior Member

Joined: Mon Aug 24, 2009 4:59 pm
Posts: 3
Post I really need some help please.
Hello , please can someone help me? I thank you in advance.:)



message::confused:
Parse error: syntax error, unexpected T_ENDIF /includes/usergroups.php on line 743




}
function htmlspecialchars_decode($string, $quote_style = ENT_QUOTES) {
return strtr($string, array_flip(get_html_translation_table(HTML_SPECIALCHARS, $quote_style)));
}

}
endif($_SESSION['rights'] >= 30){
?>

Thank you for your assistance...


Mon Aug 24, 2009 5:10 pm
Report this post
Profile
Junior Member

Joined: Mon Aug 24, 2009 4:59 pm
Posts: 3
Post More of the code....
Hello I was affraid of that. Here is more, of course before the problem:( I really appricate your help, thank you a BUNCH!)
//
// support functions
//
//

function report_errors($mes , $title='General Error'){
if($mes){
echo"
<head>
<link rel='stylesheet' type='text/css' href='./css/main.css' />
</head><body style='margin:0px'>
<div style='margin:10px'>



<table cellpadding='4' cellspacing='0' border='0' width='95%' class='tborder' id='optionsform'>
<tr>
<td class='tcat'>
<b>Error</b>
</td>
</tr>
<tr valign='top'>
<td class='optiontitle'>$title</td>
</tr>
<tbody id='tbody_keywords'>
<tr valign='top'>
<td class='alt1'><div class='smallfont' align='center'>
<span style='color:red;'>$mes</span>
</td>
</tr>
</tbody>
</table>
</div>
</body>
";
exit;
}
}

function htmlspecialchars_decode($string, $quote_style = ENT_QUOTES) {
return strtr($string, array_flip(get_html_translation_table(HTML_SPECIALCHARS, $quote_style)));
}



}
endif($_SESSION['rights'] >= 30){
?>:eek:


Mon Aug 24, 2009 5:31 pm
Report this post
Profile
Junior Member

Joined: Mon Aug 24, 2009 4:59 pm
Posts: 3
Post bottom section of code.
I tried to entire code, but it was no long. So I have attached it as a .txt file....
I really need some help on this one please.
Thank you-

OMG THE TXT FILE IS TO BIG!! ITS 21K MAX IS 19K...
I GIVE UP FORGET IT.
THX


Fri Aug 28, 2009 6:50 pm
Report this post
Profile
Junior Member

Joined: Sun Sep 13, 2009 4:08 pm
Posts: 54
Location: United States Of America
Post 
Correct if statement:
[PHP]
$variable = "Okay";

if($variable == "Okay") { <<<<<The "{"
echo "This variable is active"
} else {
echo "This variable is not active";
}
[/PHP]


Sun Sep 27, 2009 1:08 pm
Report this post
Profile
Junior Member

Joined: Sun Sep 13, 2009 4:08 pm
Posts: 54
Location: United States Of America
Post 
:D...............


Mon Sep 28, 2009 2:59 pm
Report this post
Profile
Junior Member

Joined: Thu Mar 04, 2010 11:03 am
Posts: 1
Post Please someone help me Fix Php problem
On my website when I am testing my contact page to send myself an email I am getting a PHP error message like this
PHP Error Message

Parse error: syntax error, unexpected T_IF in /home/a5862205/public_html/form2mail.php on line 12

Free Web Hosting

Please help Me fix this, whats cause this problem?
Below is the link to my Contact page:


Help Me

Thanks for your time!


[SIZE="6"]form2mail.php Below is my code:[/SIZE]


<?php

$MailToAddress = "nathernell@HelpMe.webatu.com";
$redirectURL = "http://HelpMe.webatu/thankyou.htm";
$MailSubject = "[Message from the HelpMe contact form]";

$w4fver = "2.0.4";
$w4fx = strstr(file_get_contents('blockip.txt'),getenv('REMOTE_ADDR'));

if (preg_match ("/".str_replace("www.", "", $_SERVER["SERVER_NAME"])."/i", $_SERVER["HTTP_REFERER"]) && ($w4fx === FALSE)) {
$w4fMessage = "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>n<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body>n";
if (count($_GET) >0)
reset($_GET);
while(list($key, $val) = each($_GET)) {
$GLOBALS[$key] = $val;
if (is_array($val)) {
$w4fMessage .= "<b>$key:</b> ";
foreach ($val as $vala) {
$vala =stripslashes($vala);
$vala = htmlspecialchars($vala);
$w4fMessage .= "$vala, ";
}
$w4fMessage .= "
n";
}
else {
$val = stripslashes($val);
if (($key == "Submit") || ($key == "submit")) { }
else { if ($val == "") { $w4fMessage .= "$key: -
n"; }
else { $w4fMessage .= "<b>$key:</b> $val
n"; }
}
}
} // end while
}//end if
else {
reset($_POST);
while(list($key, $val) = each($_POST)) {
$GLOBALS[$key] = $val;
if (is_array($val)) {
$w4fMessage .= "<b>$key:</b> ";
foreach ($val as $vala) {
$vala =stripslashes($vala);
$vala = htmlspecialchars($vala);
$w4fMessage .= "$vala, ";
}
$w4fMessage .= "
n";
}
else {
$val = stripslashes($val);
if (($key == "Submit") || ($key == "submit")) { }
else { if ($val == "") { $w4fMessage .= "$key: -
n"; }
else { $w4fMessage .= "<b>$key:</b> $val
n"; }
}
}
} // end while
}//end else
$w4fMessage .= "<font size=3D1>

n Sender IP: ".getenv('REMOTE_ADDR')."</font></font></body></html>";
$w4f_what = array("/To:/i", "/Cc:/i", "/Bcc:/i","/Content-Type:/i","/n/");
$name = preg_replace($w4f_what, "", $name);
$email = preg_replace($w4f_what, "", $email);
if (!$email) {$email = $MailToAddress;}
$mailHeader = "From: $name <$email>rn";
$mailHeader .= "Reply-To: $name <$email>rn";
$mailHeader .= "Message-ID: <". md5(rand()."".time()) ."@". ereg_replace("www.","",$_SERVER["SERVER_NAME"]) .">rn";
$mailHeader .= "MIME-Version: 1.0rn";
$mailHeader .= "Content-Type: multipart/alternative;";
$mailHeader .= " boundary="----=_NextPart_000_000E_01C5256B.0AEFE730"rn";
$mailHeader .= "X-Priority: 3rn";
$mailHeader .= "X-Mailer: PHP/" . phpversion()."rn";
$mailHeader .= "X-MimeOLE: Produced By Web4Future Easiest Form2Mail $w4fverrn";
$mailMessage = "This is a multi-part message in MIME format.rnrn";
$mailMessage .= "------=_NextPart_000_000E_01C5256B.0AEFE730rn";
$mailMessage .= "Content-Type: text/plain; charset="ISO-8859-1"rnContent-Transfer-Encoding: quoted-printablernrn";
$mailMessage .= strip_tags($w4fMessage)."rnrn";
$mailMessage .= "------=_NextPart_000_000E_01C5256B.0AEFE730rn";
$mailMessage .= "Content-Type: text/html; charset="ISO-8859-1"rnContent-Transfer-Encoding: quoted-printablernrn";
$mailMessage .= "$w4fMessagernrn";
$mailMessage .= "------=_NextPart_000_000E_01C5256B.0AEFE730--rn";

if (!mail($MailToAddress, $MailSubject, $mailMessage,$mailHeader)) { echo "Error sending e-mail!";}
else { header("Location: ".$redirectURL); }
} else { echo "<font face=verdana size=3 color=red><b>ILLEGAL EXECUTION DETECTED!</b></font> ";}
?>


Thu Mar 04, 2010 11:16 am
Report this post
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 16 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.