homepage Welcome to WebmasterWorld Guest from 54.167.11.16
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
T_constant_encapsed_string
Rico_Suave




msg:1295526
 3:35 pm on May 20, 2005 (gmt 0)

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /usr/home/commu/public_html/vmv-inscription/process2.php on line 10

This is the code. Line 10 is the first $msg.= line

<?php
if ($_SERVER['REQUEST_METHOD']=="POST"){
// In testing, if you get an Bad referer error
// comment out or remove the next three lines
if (strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'])>7 ¦¦
!strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST']))
die("Bad referer");
// Start message
$msg="L'usager suivant a soumis une requête pour faire installer le programme: \n";
$msg.="Clinique: \n".$_POST['Clinic_name'] "\n";
$msg.=.$_POST['Clinic_address'] "\n";
$msg.=.$_POST['Clinic_city'] "\n";
$msg.=.$_POST['Clinic_province'] "\n";
$msg.=.$_POST['Clinic_postalcode'] "\n";
$msg.="Tel: ".$_POST['Tel_areacode'] "&nbsp;".$_POST['Tel'] "\n";
$msg.="Fax: ".$_POST['Fax_areacode'] "&nbsp;".$_POST['Fax'] "\n" "\n";

Sorta newbie here :-)

 

StuffOfInterest




msg:1295527
 3:40 pm on May 20, 2005 (gmt 0)

Actually, it's the next line down:

$msg.="Clinique: \n".$_POST['Clinic_name'] "\n";

Note the missing "." between your POST var and the EOL.

dreamcatcher




msg:1295528
 3:43 pm on May 20, 2005 (gmt 0)

Welcome to Webmaster World Rico_Suave,

Looks like a few missing concatenation operators.

Try this:

$msg="L'usager suivant a soumis une requête pour faire installer le programme: \n";
$msg.="Clinique: ".$_POST['Clinic_name']. "\n";
$msg.= $_POST['Clinic_address']. "\n";
$msg.= $_POST['Clinic_city']. "\n";
$msg.= $_POST['Clinic_province']. "\n";
$msg.= $_POST['Clinic_postalcode']. "\n";
$msg.= "Tel: ".$_POST['Tel_areacode']. "&nbsp;".$_POST['Tel']. "\n";
$msg.= "Fax: ".$_POST['Fax_areacode']. "&nbsp;".$_POST['Fax']. "\n";

Not tested, but should be ok.

dc

Rico_Suave




msg:1295529
 4:00 pm on May 20, 2005 (gmt 0)

D'oh

My whole script was riddled with them.
Thanks guys.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved