Syntax error unexpected t_string expecting t_variable

syntax error unexpected t_string expecting t_variable

Ошибка syntax error, unexpected 'none' (T_STRING), expecting ')' PHP Решение и ответ на вопрос How to fix Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$ · Recommended Answers · All 9 Replies. Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE name = $name; } }?> Any ideas? Answer 51e70a6caef 6 votes. Permalink.

That can: Syntax error unexpected t_string expecting t_variable

Syntax error unexpected t_string expecting t_variable
Canon mp140 error code e16
Parse error + in
Syntax error unexpected t_string expecting t_variable
Fatal error suhosin use of preg_replace with

Syntax error unexpected t_string expecting t_variable - happens

Error unexpected T STRING expecting T CONSTANT ENCAPSED STRING

Your comment on this question:

1 answer to this question.

Your comment on this answer:

Join the world's most active Tech Community!

Welcome back to the World's most active Tech Community!

Subscribe to our Newsletter, and get personalized recommendations.

Already have an account? Sign in.

webinarREGISTER FOR FREE WEBINARX
webinar_successThank you for registeringJoin Edureka Meetup community for + Free Webinars each monthJOIN MEETUP GROUP

PHP - Unexpected T_encapsed_and_whitespace, Expecting T_string Or T_variable Or T_num

Full Excel VBA Course - Beginner to Expert

Unexpected T_encapsed_and_whitespace, Expecting T_string Or T_variable Or T_num

View Content

Hi Guys

I have got a page generating the following error

Error:Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/sites/sprers.eu on line 3

The offending code is below (I have removed some of the URL due to security.

Code: [Select]
<?php
function getVehData(){
$file="sprers.eu?username=***********&mode=test&key=*********&vrm=$_POST[&#;veh_reg&#;]";
$dom=new DOMdocument();
$dom->load($file);
$xml=simplexml_import_dom($dom);
echo(&#;<tr><td>Make<td></td></tr>
<tr><td>Model<td></td></tr>
<tr><td>Make<td></td></tr>
<tr><td>Date of Manufacture<td></td></tr>
<tr><td>First Registered<td></td></tr>
<tr><td>Colour<td></td></tr>
<tr><td>Body<td></td></tr>
<tr><td>No. of Doors<td></td></tr>
<tr><td>Engine Size (cc)<td></td></tr>
<tr><td>Fuel Type<td></td></tr>
<tr><td>Gearbox Type<td></td></tr>
<tr><td>Previous Owners<td></td></tr>
<tr><td>BHP<td></td></tr>
<tr><td>Emissions<td></td></tr>
</table>
&#;);
}
?>




Similar Tutorials

Unexpected T_encapsed_and_whitespace, Expecting T_string Or T_variable Or T_num

Parse Error: Syntax Error, Unexpected T_encapsed_and_whitespace, Expecting T_string Or T_variable Or T_num_string

Error In My Php. (unexpected T_string, Expecting T_variable Or '$' )

Unexpected T_string, Expecting ',' Or ';'

Parse Error: Syntax Error, Unexpected T_encapsed_and_whitespace, Expecting T_str

Parse Error: Syntax Error, Unexpected T_variable, Expecting T_function

Parse Error: Syntax Error, Unexpected '(', Expecting T_variable Or '$' In

Parse Error: Syntax Error, Unexpected T_variable, Expecting ',' Or ';' In C:\wam

Parse Error: Syntax Error, Unexpected T_variable, Expecting ',' Or ';' In C:\xam

Parse Error: Syntax Error, Unexpected ')', Expecting '&' Or T_variable In

Parse Error: Syntax Error, Unexpected T_string, Expecting ',' Or ';' In /export/

Newbie: Parse Error: Syntax Error, Unexpected T_string, Expecting ',' Or ';'

Parse Error: Parse Error, Expecting `t_string' Or `t_variable' Or `t_num_string

Parse Error: Parse Error, Expecting `t_string' Or `t_variable' Or `t_num_string'

Parse Error: Syntax Error, Unexpected T_string, Expecting ',' Or ';' In

Parse Error: Syntax Error, Unexpected T_string, Expecting ',' Or ';'

Parse Error: Syntax Error, Unexpected T_string, Expecting ',' Or ';'

Unexpected T_encapsed_and_whitespace

Parsing A Url And Unexpected T_encapsed_and_whitespace

Syntax Error, Unexpected T_encapsed_and_whitespace




Learn VBA & Macros for Excel in 1 Week!




I can&#;t seem to figure this error out Any help would be appreciated!!


echo stripslashes($post[&#;message&#;]) . "  stripslashes($post[&#;username&#;])<br>\n" . " on stripslashes($post[&#;time&#;]) ."\n<hr width=90%>\n";


Basically, what I want it to say is:

&#;message&#; &#;username&#; on &#;time&#;

With, of course, &#;message&#;, &#;username&#;, and &#;time&#; filled in with the info from the database.


I Can't find the problem. The code: mysql_query("insert into games(week, fight, league_id)values($_REQUEST['week'],'$_REQUEST[home_team]-$_REQUEST[guest_team]',$_REQUEST['home_league'])", $Link); The error message:   Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING    

This is the error..
Code: [Select]
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or &#;$&#; in /htdocs/testing//sprers.eu on line 35
sprers.eu this is line 35 in sprers.eu
mysql[&#;username&#;],$mysql[&#;password&#;]);()

could you point me in the right direction?. Thanks.

edit - oh, and the context of the code is
Code: [Select]
mysql_connect($mysql[&#;host&#;],$
mysql[&#;username&#;],$mysql[&#;password&#;]);
mysql_select_db($mysql[&#;db&#;]);



Got an unexpected T_STRING on line

<?


// Si estan definidas las variables de las cookies se procede a mostrar el menu pero no sin antes comprobar que los
// datos de las cookies verdaderamete son del usuario en cuestion.

if(isset($_COOKIE["usNick"]) && isset($_COOKIE["usPass"]))
{

// Se incluyen los archivos necesarios

require(&#;sprers.eu&#;);
require(&#;sprers.eu&#;);

// Se sanitizan los datos de las cokies

$user=uc($_COOKIE["usNick"]);

// Se selecciona la tabla tb_users donde el usuario es el que se provee en la cookie

$sql = "SELECT * FROM tb_users WHERE username=&#;$user&#;";
$result = mysql_query($sql);        
$row = mysql_fetch_array($result);

// Se sanitiza de nuevo la cookie

$wask = uc($_COOKIE["usNick"]);

// Se define $wesk como el nombre de usuario de la tabla tb_users

$wesk = $row[&#;username&#;];

// Se comprueba que el dato de la cookie sea el mismo que el de la tabla, de lo contrario se muestra error, se termina
// el script y se borra la cookie.

if("$wesk" != "$wask") {
echo "Login incorrect.";
?>
<input type="button" value="Reload Page" onClick="sprers.eu()">
<?
exit();
}

// Se sanitiza la cookie usPass

$wazk = uc($_COOKIE["usPass"]);

// Se define $wezk como el nombre de usuario de la tabla tb_users

$wezk = $row[&#;password&#;];

// Se comprueba que el dato de la cookie sea el mismo que el de la tabla, de lo contrario se muestra error, se termina
// el script y se borra la cookie.

if("$wezk" != "$wazk") {
echo "Login incorrect.";
?>
<input type="button" value="Reload Page" onClick="sprers.eu()">
<?
exit();
}

echo"
<ul>
<li class="m1"><a href="../sprers.eu" class="active">Home</a></li>                HERE!!!!!!!!!
<li class="m2"><a href="../sprers.eu">About</a></li>
<li class="m3"><a href="../sprers.eu">Services</a></li>
<li class="m4"><a href="../sprers.eu">Support</a></li>
<li class="m5"><a href="../sprers.eu">contacts</a></li>
<li class="m6"><a href="../sprers.eu">Sitemap</a></li>
</ul>
";

}
else
{

// funcion para sanitizar variables
function limpiare($mensaje)
{
$mensaje = htmlentities(stripslashes(trim($mensaje)));
$mensaje = str_replace("&#;"," ",$mensaje);
$mensaje = str_replace(";"," ",$mensaje);
$mensaje = str_replace("$"," ",$mensaje);
return $mensaje;
}

$elref=limpiare($_GET["r"]);

echo "
<ul>
<li class="m1"><a href="../sprers.eu" class="active">Home</a></li>
<li class="m2"><a href="../sprers.eu">About</a></li>
<li class="m3"><a href="../sprers.eu">Services</a></li>
<li class="m4"><a href="../sprers.eu">Support</a></li>
<li class="m5"><a href="../sprers.eu">contacts</a></li>
<li class="m6"><a href="../sprers.eu">Sitemap</a></li>
</ul>

";
}











?>


Hi all,
Does anybody can help me with this error?

I am trying create a simple form which insert data into mysql table called &#;sample&#;

Here is my code

Code: [Select]

<?php

$connection = mysql_connect("localhost","root", "");

if(!$connection)
{
die("db connection error" .mysql_error());
}

$db_select = mysql_select_db("project", $connection);

if(!$db_select)
{
die("db select error" .mysql_error());
}

$sql = "INSERT INTO sample (id,firstname,lastname,bio,gender)
    VALUES (&#;$_POST[&#;ID_&#;]&#;,&#;$_POST[&#;firstname&#;]&#;,&#;$_POST[&#;lastname&#;]&#;,&#;$_POST[&#;bio&#;]&#;,&#;$_POST[&#;gender&#;]&#;)";

if(!$sql)
{
die(&#;Error: &#; . mysql_error());
}


echo "1 record added";

?>




And every time I am getting this annoying error

Quote

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\wamp\www\project\sprers.eu on line 19


and Line 19 is Code: [Select]
(&#;$_POST[&#;ID_&#;]&#;,&#;$_POST[&#;firstname&#;]&#;,&#;$_POST[&#;lastname&#;]&#;,&#;$_POST[&#;bio&#;]&#;,&#;$_POST[&#;gender&#;]&#;)";
Thanks in advance..! :-)


i keep getting Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION 

Help me plaese - i am getting error in the line

$query = "SELECT * \r\n FROM `ad` ";


Having a problem with a php code.
Im new to php and have only been learning for one day but have had previous experiances with php in which i have copied and pasted and edited to suit my needs .

This is my code
Code: [Select]
<?php

   $username = $_POST["user"];
   $password = $_POST["pass"];
   $login = $_GET["login"];
   
   setcookie("username","$username",time()+);
   
   if($login=="yes") {
      
      $con = mysql_connect("localhost","root","arceye");
      
      mysql_select_db("login");
      
      $get = mysql_query("SELECT count(id) FROM login WHERE user=&#;$username&#; and pass=&#;$password&#;");
      
      $result = mysql_result($get, 0);
      
      if($result!=1) {
         echo "Invalid Username Or Password";
      } else {
         echo "Login Successful"
         $_SESSION["username"] = $username;
      }
   }

i named that sprers.eu

im running a wamp server thinge on localhost.

when i try to run it on http://localhost/sprers.eu i get the error
Parse error: syntax error, unexpected T_VARIABLE, expecting &#;,&#; or &#;;&#; in C:\wamp\www\sprers.eu on line 23

can anyone help
i had 5 other error but managed to use common sense to fix them this one i cant seem to work out.

Thanks in advance

MOD EDIT: code tags added.


Hi. I am having a problem with a php while loop.I am trying to draw a polygon using coordinates from a online data table called sprers.eu loop is supposed to loop through each row drawing a polygon with each set of coordinates :

<?php
// Include file to Connnect to online database
include_once "mysql_sprers.eu";

// Collects data from  table
 $data = mysql_query("SELECT * FROM buildinglist")
 or die(mysql_error());
// puts the "buildinglist" info into the $info array
// $info = mysql_fetch_array( $data );

?>
<!DOCTYPE HTML>
<html>
 
  <head>
 
        <style type="text/css">
        #theMap {background-image:url(&#;sprers.eu&#;); }      
        polygon:hover{fill:gold;}
        </style>
 
    <script type="text/javascript">
          // This function is called when the lake is clicked.
      function buildingClick(<?php $id ?>) {

        // Display a fact.
        alert("<?php print $id; ?>");      
             
      }
    
    </script>
       
  </head>
 
  <body>   
      <svg id="theMap" x="0" y="0" width="" height="">       

     <?php
             while($info = mysql_fetch_array( $data )){
//THE PROBLEM IS WITH THIS LINE//
                 echo "<polygon fill="$info[&#;fill_colour&#;]" stroke="black" id="$info[&#;id&#;]" points="$info[&#;coordinates&#;]" />";
         }
     ?>
       
     </svg>
  </body>

</html>

Can anybody help?it would be highly appreciated
Eoin.


I am getting this error and cant figure it out:
Parse error: syntax error, unexpected &#;)&#;, expecting &#;&&#; or T_VARIABLE in /path/to/app/sprers.eu on line

this is line
function GetParentIDS(){

this is the rest of the function:

   global $wpdb;

   $CATS = "";
   $Maincategories = get_categories(&#;use_desc_for_title=1&hide_empty=0&hierarchical=0&#;);      
   $Maincatcount = count($Maincategories);   
   foreach ($Maincategories as $Maincat) {
      if($Maincat->parent ==0){
      $CATS .= $Maincat->cat_ID.",";
      }
   }

   return $CATS;      

}

this is the function above it:
function sidebarArticles(){
   
   global $wpdb; global $PPT; $string="";
 
   
   $posts = query_posts(&#;meta_key=type&meta_value=article&posts_per_page=5&#;);       
   foreach($posts as $article){

   $Artimage = get_post_meta($article->ID, &#;image&#;, true);

    $string .= "<li>";

      if(strlen($Artimage) > 1){
         $string .= &#;<a href="&#;.get_permalink($article->ID).&#;" title="&#;.$article->post_title.&#;"><img src="&#;.$PPT->ImageCheck($Artimage).&#;" style="float:right; max-widthpx; max-heightpx;" /></a>&#;;
      }

    $string .= "<h4><a href=&#;".get_permalink($article)."&#;>".$article->post_title."</a></h4>
    <cite>Posted <em>".$PPT->TimeDiff($article->post_date)."</em></cite>
    <p>".$article->post_excerpt."</p>
    </li>";   
   
   }
   
   return $string;
   
   
   }

Any ideas?


can&#;t seem to find the error. helppp


Parse error: syntax error, unexpected T_STRING, expecting &#;,&#; or &#;;&#; in /export/SOI/students/m/abhr/web/WebIbs/view_sprers.eu on line 20

<?php

require_once( "sprers.eu");
require_once( "sprers.eu" );
require_once( "sprers.eu" );
require_once( "sprers.eu" );


$userid = isset( $_GET["userid"] ) ? (int)$_GET["userid"] : 0;


   if ( !$user = user::getuser( $userid) ) {
   displayPageHeader( "Error" );
   echo "<div>User not found.</div>;
   displayPageFooter();
   exit;
}

$logEntries = LogEntry::getLogEntries( $userid );
displayPageHeader( "View user: ". $user->getValueEncoded( "usr_name")
." ". $user->getValueEncoded( "usr_surname") );

?>

   <dl style="width: 30em;">
   <dt>Username</dt>
   <dd><?php echo $user->getValueEncoded( "usr_username" ) ?></dd>
   <dt>First name</dt>
   <dd><?php echo $user->getValueEncoded( "usr_name" ) ?></dd>
   <dt> Last name</dt>
   <dd><?php echo $user->getValueEncoded( "usr_surename" ) ?></dd>
   <dt>Joined on</dt>
   <dd><?php echo $user->getValueEncoded( "usr_recordtime") ?></dd>
   <dt>Last time active</dt>
   <dd><?php echo $user->getValueEncoded( "usr_lastlogintime" ) ?></dd>
   
   </dl>
   
   <h2> Access Log </h2>
   
   
   <table cellspacing="0" style="width"em; border: 1px solid #;">
   <tr>
      <th>Web Page</th>
      <th>Number of visits</th>
      <th> Last visit</th>
   </tr>
   
   <?php
      
      $rowCount = 0;
      foreach ~( $logEntries as $logEntry ) {
      $rowCount++;
   ?>
   
   
       <tr<?php if ( $rowCount % 2 == 0 ) echo &#; class="alt"&#; ?>>
        <td><?php echo $logEntry->getValueEncoded( "pageUrl" ) ?></td>
        <td><?php echo $logEntry->getValueEncoded( "numVisits") ?></td>
        <td><?php echo $logEntry->getValueEncoded( "lastAccess") ?> </td>
       
        </tr>
       
      <?php
    
    
     </table>
    
     <div style="width: 30em; margin-top: 20px; text-align: center;">
        <a href="javascript:sprers.eu(-1)">back</a> 
    </div>
   
    <?php
    displayPageFooter();
    ?>
   
     




Hello I have one problem with fwrite() I have one script to get width and height from javascript and echo it with PHP.
echo "Screen width is: ". $_GET[&#;width&#;] ."<br />\n";
echo "Screen height is: ". $_GET[&#;height&#;] ."<br />\n";
It works but i want to store the result in a file
fwrite($info,"Height: $_GET[&#;height&#;] <br />");
But then I get error Parse error: parse error, expecting `T_STRING&#; or `T_VARIABLE&#; or `T_NUM_STRING
////////////////////////
it would be even better if I don&#;t have to print the values but directly store them in $iinfo
sorry if something similar was soved but those examples were different or i was unable to transform it to solve my problem



hi all
am new to this forum
 help me to overcome from this error
Parse error: parse error, expecting `T_STRING&#; or `T_VARIABLE&#; or `T_NUM_STRING&#; in D:\wamp\www\quiz1\sprers.eu on line 12

Code: [Select]
<?php

include("sprers.eu");

$display = mysql_query("SELECT * FROM $table ORDER BY id",$db);

if (!$submit) {


echo "<form method=post action=$_SERVER[&#;PHP_SELF&#;]>";
echo "<table border=0>";

while ($row = mysql_fetch_array($display)) {

$id = $row["id"];
$question = $row["question"];
$opt1 = $row["opt1"];
$opt2 = $row["opt2"];
$opt3 = $row["opt3"];
$answer = $row["answer"];

echo "<tr><td colspan=3><br><b>$question</b></td></tr>";
echo "<tr><td>$opt1 <input type=radio name=q$id value=\"$opt1\"></td><td>$opt2 <input type=radio name=q$id value=\"$opt2\"></td><td>$opt3 <input type=radio name=q$id value=\"$opt3\"></td></tr>";

}

echo "</table>";
echo "<input type=&#;submit&#; value=&#;See how you did&#; name=&#;submit&#;>";
echo "</form>";

}

elseif ($submit) 

{

$score = 0;
$total = mysql_num_rows($display);
while ($result = mysql_fetch_array($display)) 


{

$answer = $result["answer"];
$q = $result["q"];

if ($$q == $answer) 
{
$score++; 
}

}

echo "<p align=center><b>You scored $score out of $total</b></p>";
echo "<p>";

if   ($score == $total) {
echo "Congratulations! You got every question right!";
}
elseif ($score/$total < ) {
echo "Oh dear. Not the best score, but don&#;t worry, it&#;s only a quiz.";
}
elseif ($score/$total > ) {
echo "Well done! You certainly know your stuff.";
}
else {
echo "Not bad - but there were a few that caught you out!";
}

echo "</p>";

echo "<p>Here are the answers:";

echo "<table border=0>";
$display = mysql_query("SELECT * FROM $table ORDER BY id",$db);
while ($row = mysql_fetch_array($display)) {

$question = $row["question"];
$answer = $row["answer"];
$q = $row["q"];

echo "<tr><td><br>$question</td></tr>";

if ($$q == $answer) 
{
echo "<tr><td>&raquo;you answered ${$q}, which is correct</td></tr>";
}
elseif ($$q == "") {
echo "<tr><td>&raquo;you didn&#;t select an answer. The answer is $answer</td></tr>";
}
else {
echo "<tr><td>&raquo;you answered ${$q}. The answer is $answer</td></tr>";
}

}
echo "</table></p>";



}

?>

thanks in adavance


Hey there,

I was having that error message (Parse error: syntax error, unexpected T_STRING, expecting &#;,&#; or &#;;&#; in) in this line:
 echo "<td>" . $row[&#;name&#;] . "</td>";

And fixed it with:
 echo "<td>" . $row[".name."] . "</td>";


It seems to work fine, but this is the right way?
Thank you in advance.


EDIT: Nop, it didnt do the job xD


Hey guys,

I am getting the same error and I can&#;t figure out why, I&#;ve double checked all my brackets and everything. It&#;s probably just something simple but once you&#;ve been staring at it for ages you can&#;t see very much.

My code is:
Code: [Select]
if (isset($_POST[&#;Submit&#;])) {
    if (isset($_POST[&#;username&#;] == &#;***&#;) && ($_POST[&#;password&#;] == &#;***&#;)) { //THIS IS THE LINE
$_SESSION[&#;username&#;] = &#;login&#;;
    }
else {
echo "<b>Your login details are not correct. Please login again</b>";
    }
}

I&#;ve highlighted the line that the error appears on , can anybody help me? 


Hi,

I was wondering if somebody can help me with an error I am getting.

Here is my code:

Code: [Select]
if ($_SESSION[&#;username&#;]==&#;login&#;) {
   if (isset($_REQUEST[&#;file&#;])) {
       $fc = file_get_contents($_REQUEST[&#;file&#;]);
       $text = explode("<!-- EDITABLE -->",$fc);
       echo "<form method=&#;post&#; action=&#;&#;><textarea name=&#;content&#;>$text[1]</textarea>";
       echo "<p><input type=&#;hidden&#; name=&#;file&#; value=&#;".$_REQUEST[&#;file&#;]."&#; /><input name=&#;submitUpdate&#; type=&#;submit&#; value=&#;Update Page&#;></form>";
   }
   else {
      echo "<p align=&#;center&#;>
       <a href="sprers.eu">Home Page</a><br/> //THIS IS THE LINE THAT IS GIVING THE ERROR
       <a href="contact_sprers.eu">Contact Us</a><br/>
       <br/>
       <em>Click on the links above to edit the files.</em><br/>
      <a href="?logout">logout</a></p>";
   }
}

This code is within php tags is that correct? As I am coding in notepad ++ and it doesn&#;t have any colour which makes me think something is wrong.

If someone could help that would be brilliant! Thanks in advance


I haven&#;t used PHP in a while. I&#;m getting "unexpected T_ENCAPSED_AND_WHITESPACE" on the second line of this:

Code: [Select]
if(isset($_GET[&#;name&#;], $_GET[&#;organization&#;], $_GET[&#;email&#;], $_GET[&#;message&#;])){
mail(&#;[email protected]&#;, &#;maybearobot: &#;.$_GET[&#;organization&#;], "Name: $_GET[&#;name&#;] /n/n Return Email: $_GET[&#;email&#;] /n/n $_GET[&#;message&#;]");
}


Can anybody help me to echo a url?

Id like to have

Code: [Select]
sprers.eu?zoom=15&size=x&markers=color:blue .str_replace(&#; &#;,&#;+&#;,$row[&#;postcode&#;])&sensor=false&#;>";
}

?>
</div>
</body>
</html>
The above returns an error;

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING


Easy one i hope

Heres my array:

echo "<TABLE CELLPADDING=0 CELLSPACING=0 WIDTH=% BORDER=0>";
echo "<TR />";
echo "<TD WIDTH=30% VALIGN=TOP />";
echo " <IMG SRC=$row[&#;CarPrice]/> ";  < THIS IS LINE 66 THAT THE ERROR APPEARS ON!!
echo "<br />";
echo "</TD>";
echo "<TD WIDTH=10 VALIGN=TOP />";
echo " ";
echo "</TD>";
echo "<TD />";

echo "<font size=3 face=arial /><B >";
echo $row[&#;CarPrice&#;];
echo "</B><font size=2 face=arial />";
echo "<br />";
echo $row[&#;CarTitle&#;];
echo "<br />";

Have i encased the $row[&#;photo&#;] properly?




label:EXAMPLE SG1+4PP&sensor=false
but to have the postcode as a variable which has been fetched from mysql

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Transitional//EN" "sprers.eu">
<html xmlns="sprers.eu">
<head>
<?php 
  include($_SERVER[&#;DOCUMENT_ROOT&#;].&#;/include/sprers.eu&#;);
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
-->
</style>
<link href="sprers.eu" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="banner">
<div id="bannerleft"></div>
<div id="logo"></div>
<div id="bannerright"><div id="navbar" title="">
<div id="b1"><p class="centre"><a href="sprers.eu">Directory</a></p></div>
    <div id="b2"><p class="centre"><a href="sprers.eu">Add Your Business</a></p></div>
                        <div id="b3"><p class="centre"><a href="sprers.eu">Contact Us</a></p></div>
                        </div><!-- end of navbar-->
</div><!--end of bannerright-->
</div><!-- end of banner-->
<div id="listhold">
<?php 
$subtype = $_GET[&#;subtype&#;];

echo "<h1>$subtype</h1>";
$result  = mysql_query("SELECT name, phone, email, WebAddress, postcode FROM business WHERE subtype =&#;$subtype&#; AND confirmed =&#;Yes&#; ORDER BY name");
echo mysql_error();
while($row = mysql_fetch_array($result))
{
echo $row[&#;name&#;] . "<br>";
echo $row [&#;phone&#;] . "<br>";
echo $row[&#;email&#;] . "<br>";
echo $row[&#;WebAddress&#;] . "<br>";
echo $row[&#;postcode&#;] . "<br>" . "<br>";
echo "<a href=&#;sprers.eu?zoom=15&size=x&markers=color:blue syntax error unexpected t_string expecting t_variable

Thematic video

Parse error: syntax error, unexpected (T_VARIABLE)

0 Comments

Leave a Comment