Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

What Is A T_string?


19 replies to this topic

#11 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 19 May 2008 - 01:42 AM

I cant get this to work...(PHP problem)
What Is A T_string?

I have similar problems..

Parse error: syntax error, unexpected $end in /home/a8308175/public_html/LocalSettings.Php on line 125


$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) ) ;

Any ideas?

-question by Chris

#12 brad82

    Newbie

  • Kontributors
  • Pip
  • 1 posts

Posted 28 May 2008 - 01:07 PM

I am also Having problems with this T_string thing
$query = " SELECT val FROM tutorials " .
		 " LIMIT $offset, $rowsPerPage";
$result = mysql_query($query) or die('Error, query failed on line 24 Error'mysql_error());


#13 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 29 May 2008 - 03:52 AM

Same Experience
What Is A T_string?

Got an error:

Parse error: syntax error, unexpected T_STRING in /home/archeron/public_html/evewarrior.Com/wp-content/themes/EVE Theme/index.Php on line 41

It's in this line:

<?php _e('Filed under:'); ?> <?php the_category(', ') ?> <?php _e('by'); ?> <?php the_author(); ?><br />

I don't know what I shouldn't or should have added.

-question by Tonglil

#14 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 02 June 2008 - 09:14 AM

T_STRING
What Is A T_string?

I also have the same error on the T_STRING:

Parse error: parse error, unexpected T_STRING in C:Program Filesxampphtdocsnew_website2upload_resume_application.Php on line 9

I am a newbie. Please help. Here's the code:
<?php
Session_start();
Include_once("database.Php");
$uploadDir = 'C:/upload/';

If(isset($_POST['upload']) and ($_FILES['resume']['size'] > 0)){
$fileName = $_FILES['resume']['name'];
$tmpName = $_FILES['resume']['tmp_name'];
$fileSize = $_FILES['resume']['size'];
$fileType = $_FILES['resume']['type'];
$filePath = $uploadDir . $fileName;

$fp = fopen($tmpName, 'are');
$content = fread($fp, filesize($tmpName));
$content = addslashes($content);
fclose($fp);
}



-question by abel

#15 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 10 October 2009 - 04:21 PM

I also have a problem with t-strings

 I have looked at the lines lots of times, but can get a clue what could be wrong...

here is the text:

 ?phpIf(isset($_POST['enviar'])) {$to = 'reservas@hotelatlantico-ita.Com.Br'; // reservas@hotelatlantico-ita.Com.Br$charset = $_POST['charset'];$nome = $_POST['nome'];$cidade = $_POST['cidade'];$estado = $_POST['estado'];$email = $_POST['email'];$telefone residencial = $_POST['Telefone residencial'];$telefone comercial = $_POST['Telefone comercial'];$celular = $_POST['celular'];$data de entrada = $_POST['data de entrada'];$data de saida = $_POST['data de saida'];$assunto = '=?' . $charset . '?B?' . Base64_encode($_POST['assunto']) . '?=';$mensagem = $_POST['mensagem'];$corpo = "Nome: $nomeCidade: $cidadeEstado: $estadoE-mail: $emailTelefone residencial: $telefone residencialTelefone comercial: $telefone comercialCelular: $celularData de entrada: $data de entradaData de Saida: $data de saítheMensagem: $mensagem ";$headers = 'Return-Path: ' . $email . "

 

I got the message:

 

PHP Parse error:  syntax error, unexpected T_STRING in E:homehotelatlantiWebenviar.Php on line 16

 

but I am not able to see the mistake. Thanks for any help.



#16 TheDarkHacker

    Super Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 251 posts
  • Gender:Male
  • Location:somewhere where arent others
  • myCENT:1.16

Posted 20 October 2009 - 03:28 PM

View PostFeedBacker, on Mar 21 2008, 06:58 PM, said:

Parse error: syntax error, unexpected T_STRING in /home/fouwellb/ ... on line 20

What Is A T_string?



This is the contents of the referenced file. Line 20 is the one that begins with $noquery=" (the first one). Where do I err? (the variables, except "localhost", are substituted and exist)

<?
$hostname = "localhost";
$username = "username";
$passwordsc = "password";
$dbName = "database";

MYSQL_CONNECT($hostname, $username, $passwordsc) OR DIE("Unable to connect to database");

/* Select the database name to be used or else print error message if unsuccessful*/

@mysql_select_db( "$dbName") or die( "Unable to select database");

$noquery=" or die("SQL Error Occurred : ".Mysql_error().':'.$query)";
$noquery1=" or die("SQL Error Occurred : ".Mysql_error().':'.$query1)";
$noquery2=" or die("SQL Error Occurred : ".Mysql_error().':'.$query2)";

$ipaddress=getenv("remote_addr");
?>

-question by starcity
What about to remove all that $noqueries because you don't need them,MYSQL is very simple.I haven't time now to look good at the line,i have work,try to remove the @ and all that noqueries.Hope that will fix your code.

#17 donneo

    Advanced Member

  • Kontributors
  • PipPipPipPipPipPipPip
  • 119 posts
  • Gender:Male
  • myCENT:12.16

Posted 20 October 2009 - 06:48 PM

dude,i am using visual basic.net string is a integer whitch can tupe only words and this is very useful

#18 Guest_Austin_*

  • Guests

Posted 05 October 2011 - 03:14 AM

I have this error: Parse error: syntax error, unexpected T_STRING in /home/a1943654/public_html/login.php on line 19

And this is the code:

<?php

//Database Information

$dbhost = "mysql8.000webhost.com";
$dbname = "a1943654_test";
$dbuser = "a1943654_test";
$dbpass = "hounds123";

//Connect to database

mysql_connect ( $dbhost, $dbuser, $dbpass)or die("Could not connect: ".mysql_error());
mysql_select_db($dbname) or die(mysql_error());

session_start();
$username = $_POST[‘username’];
$password = md5($_POST[‘password’]);

$query = “select * from users where username=’$username’ and password=’$password’”);

$result = mysql_query($query);

if (mysql_num_rows($result) != 1) {
$error = “Bad Login”;
    include “login.html”;

} else {
    $_SESSION[‘username’] = “$username”;
    include “memberspage.php”;
}

?>

Can you please help?

#19 Guest_rascan_*

  • Guests

Posted 29 November 2011 - 06:30 PM

Getting the same problem.

Parse error: Syntax error, unexpected T_STRING in /home/homeb780/public_html/adminpanel/sql.php on line 11.


)
$result = mysql_query("CREATE TABLE ".TABLE_PREFIX."area_mst (
area_id int(11) NOT NULL auto_increment,
area_name varchar(100) NOT NULL default '',
PRIMARY KEY (area_id)
) TYPE=MyISAM;")or die("<b><span style=\"red\">DB TABLE ERROR:</span></b><br /><b>Problem:</b><br />".mysql_error()."<br />");

#20 Guest_Christian Souvenir_*

  • Guests

Posted 20 January 2012 - 01:54 AM

Same here.
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/a2171553/public_html/PHP Lessons/8_Souvenir_Christian_Chapter 1_PHP/Lab1-2/Lab1-2.php on line 12

<?php
echo "<table class=\"table\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\" width=\"500\">";
echo "<tr><td class=\"headingCell\" colspan=\"2\" valign=\"top\">Outputting Dynamic Content</td></tr>";
echo "<tr><td class=\"leftCell\" valign=\"top\">Date</td><td class=\"contentCell\" valign=\"top\">gmdate("F d y")</td></tr>";
echo "<tr><td class=\"leftCell\" valign=\"top\">Time Zone</td><td class=\"contentCell\" valign=\"top\">gmdate("T")</td></tr>";
echo "<tr><td class=\"leftCell\" valign=\"top\">Day of Year</td><td class=\"contentCell\" valign=\"top\">gmdate("z")</td></tr>";
echo "<tr><td class=\"leftCell\" valign=\"top\">Full Year</td><td class=\"contentCell\" valign=\"top\">gmdate("Y")</td></tr>";
echo "<tr><td class=\"leftCell\" valign=\"top\">Seconds since<br>midnight January 1, 1970 (epoch)</td><td class=\"contentCell\" valign=\"top\">gmdate("U")</td></tr>";
echo "<tr><td class=\"leftCell\" valign=\"top\">Time</td><td class=\"contentCell\" valign=\"top\">gmdate("h i")</td></tr>";
echo "</table>";
?>

Please help me.
Christian




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users