Nov 21, 2009
Pages: 1, 2

What Is A T_string? - Please help! I'm new at PHP Programming

free web hosting

Read Latest Entries..: (Post #16) by donneo on Oct 20 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
Read the FIRST post of this Topic. - Express your Opinion! Contribute Knowledge :-).

Open Discussion > MODERATED AREA > Computers > Programming Languages > PHP Programming

What Is A T_string? - Please help! I'm new at PHP Programming

Hamtaro
I'm new at PHP, and I looked for a while on here, and found some stuff I was looking for about form processing, and sending E-Mail through PHP. However, the script I just created won't work. I get the following error: Parse error: parse error, unexpected T_STRING in /home/hamtaro/public_html/send_feedback.php on line 9
Exactly what is a T_STRING? If I need to post my code, I will.

Comment/Reply (w/o sign-up)

OpaQue
Can you paste that part of the code.

BTW. What I feel is, you have missed a semi-colon ( ; ) somewhere... check the lines.
Also, it can happen if you have closed } the curly braces incorrectly. Check the nesting of the brackets.

Comment/Reply (w/o sign-up)

LuciferStar
QUOTE(Hamtaro @ Jan 18 2005, 03:34 AM)
I'm new at PHP, and I looked for a while on here, and found some stuff I was looking for about form processing, and sending E-Mail through PHP.  However, the script I just created won't work.  I get the following error: Parse error: parse error, unexpected T_STRING in /home/hamtaro/public_html/send_feedback.php on line 9
Exactly what is a T_STRING? If I need to post my code, I will.
*



T_STRING is a string
if the string in your code has an error,then this error message may appear.
check your code on line 9,whether you missed a " or a ',or any others.

Comment/Reply (w/o sign-up)

Hamtaro
Ok, here's just the PHP code for the file. The rest is the page that displays the Thank-You page:

CODE
<?php
$message = "
User Name: ". $_POST['UserName'] . "\n
E-Mail Address: " .$_POST['EMail'] . "\n
IP Address: ". $REMOTE_ADDR . "\n
Comments: \n
" . $_POST['Comments'] . ";

mail("myemail@email.com", "Feedback",$message);
?>


The mail function is the part where I'm getting the error. If there's supposed to e a semicolon in there, where does it go?

Comment/Reply (w/o sign-up)

alapidus
QUOTE(Hamtaro @ Jan 18 2005, 06:09 PM)
Ok, here's just the PHP code for the file.  The rest is the page that displays the Thank-You page:

CODE
<?php
$message = "
User Name: ". $_POST['UserName'] . "\n
E-Mail Address: " .$_POST['EMail'] . "\n
IP Address: ". $REMOTE_ADDR . "\n
Comments: \n
" . $_POST['Comments'] . ";

mail("myemail@email.com", "Feedback",$message);
?>


The mail function is the part where I'm getting the error.  If there's supposed to e a semicolon in there, where does it go?
*


take out the . " from the end of the string.

example:

CODE
<?php
$message = "
User Name: ". $_POST['UserName'] . "\n
E-Mail Address: " .$_POST['EMail'] . "\n
IP Address: ". $REMOTE_ADDR . "\n
Comments: \n
" . $_POST['Comments'];

mail("myemail@email.com", "Feedback",$message);
?>

 

 

 


Comment/Reply (w/o sign-up)

Hamtaro
Oh...That was the problem! Thanks! I sure feel stupid now....Anyway, thanks a lot for your help! Maybe I should also try to find some PHP Tutorials online to help with this...

Comment/Reply (w/o sign-up)

alapidus
QUOTE(Hamtaro @ Jan 18 2005, 07:28 PM)
Oh...That was the problem!  Thanks! I sure feel stupid now....Anyway, thanks a lot for your help!  Maybe I should also try to find some PHP Tutorials online to help with this...
*


no problem, that took me some time to learn, too...

Comment/Reply (w/o sign-up)

FeedBacker
Im also stuck with T_Strings :(
What Is A T_string?

<?

//set local variables
$dbhost = "localhost"; //www.100ws.Com
$dbuser = "db_user"; //margee1
$dbpass = "db_pass"; //
$dbname = "db_name"; //margee1_fabhab

//connect
$db = mysqlpconnect;(100ws.Com,margee1,cheese123);
Mysql_select_db("markgee1fabhab",$db)

?>

Thats the code I'm using for my radio and I click test connection on the installation package I'm using and when I click it it says this:

Parse error: syntax error, unexpected T_STRING in /usr/data2/hosted/SkyandLuc/connect.Php on line 10

I would really appreciate it if you could help.
Thanks :)

-Mark

Comment/Reply (w/o sign-up)

alex7h3pr0gr4m3r
QUOTE(FeedBacker @ Dec 30 2007, 07:10 PM) *
Im also stuck with T_Strings sad.gif

What Is A T_string?
<?

//set local variables
$dbhost = "localhost"; //www.100ws.Com
$dbuser = "db_user"; //margee1
$dbpass = "db_pass"; //
$dbname = "db_name"; //margee1_fabhab

//connect
$db = mysqlpconnect;(100ws.Com,margee1,cheese123);
Mysql_select_db("markgee1fabhab",$db)

?>

Thats the code I'm using for my radio and I click test connection on the installation package I'm using and when I click it it says this:

Parse error: syntax error, unexpected T_STRING in /usr/data2/hosted/SkyandLuc/connect.Php on line 10

I would really appreciate it if you could help.
Thanks smile.gif

-Mark


the error would be the semicolon between the function name and the parenthesis. Try this:
CODE
mysqlpconnect(100ws.Com,margee1,cheese123);

Also, it appears that you are missing a semicolon on the very last line. You might want to fix that unless you want more errors.

Comment/Reply (w/o sign-up)

FeedBacker
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

Comment/Reply (w/o sign-up)

Latest Entries

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

Comment/Reply (w/o sign-up)

TheDarkHacker
QUOTE (FeedBacker @ Mar 21 2008, 06:58 PM) *
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.


Comment/Reply (w/o sign-up)

iGuest

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:

 ?php
If(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: $nome
Cidade: $cidade
Estado: $estado
E-mail: $email
Telefone residencial: $telefone residencial
Telefone comercial: $telefone comercial
Celular: $celular
Data de entrada: $data de entrada
Data de Saida: $data de saíthe
Mensagem: $mensagem ";

$headers = 'Return-Path: ' . $email . "

 

I got the message:

 

PHP Parse error:  syntax error, unexpected T_STRING in E:\home\hotelatlanti\Web\enviar.Php on line 16

 

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


Comment/Reply (w/o sign-up)

iGuest
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 Files\xampp\htdocs\new_website2\upload_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

Comment/Reply (w/o sign-up)

iGuest
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

Comment/Reply (w/o sign-up)



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Pages: 1, 2
Similar Topics

Keywords : t, string, im, php, programming

  1. Php And Mysql Programming
    anyone knows a code for mysql and php (2)
  2. Programming Competition Work.
    Final stage. (2)
    Well for the past month or so I have been working on a Programming Competition project in AP
    Computer Science. Some may know I am quite fancy with graphics and HTML but yes, I do program too.
    But man, even though I am decent at it, it bores the crap out of me. Well being the project leader I
    do most all of the work and I just use the two other members for support and error testing. We
    receive a packet with our project problem in it. Make a fully functional support site for a company.
    Of course with some other more little details but honestly since we are in the advance....
  3. The Artists Tutorials :mysql Basic Commands
    The Artists is an online programming unit and gfx designing clan. (0)
    Let's Talk about basic mysql commands used in php. I will now show you a list of the most common
    MySQL FUNCTIONS : QUOTE mysql_connect(MySQL server name,username,password) - opens a connection
    to a MySQL server. mysql_select_db(database name,connection id) - selects a database residing on
    the MySQL server. The database name parameter referes to an active database on the MySQL server that
    was opened with the mysql_connect function. The connection identifier is a reference to the current
    MySQL connection. mysql_query(sql query) - sends a query to the currently ac....
  4. Ipetsite Related Programming Help Needed
    iPetSite screwed me over (0)
    Ok so i you are anyone here who would like to hlp me with these files, please pm me your email. Here
    is what i need help with: Replacement of lost files Repair of corrupt files Configuring said files
    Help with setting up the site If you can help me, please let me know. If you would like to be an
    admin on my site, also let me know. Just I request that you don't post here unless you plan or
    intend to help some how.....
  5. Bcc Exploit In My Programming?
    (3)
    Just a couple minutes ago i got an e-mail from a web developer in San Diego and apparently he
    received a large amount of spam e-mail from my websites contact forum because spammers found
    something called a BCC Exploit in my programing and are using my script to re-direct mail messages
    through my server to peoples e-mails. now i have no idea what this means, but i suppose i need to
    stop it. How so? Can you suggest a more secure contact form script?....
  6. Need Help
    need help in programming... (1)
    i don´t know why the debugger says, that this script has an error: function menuelink($link,
    $liname, $liname2, $tdcolor) { echo " \n"; echo " \n"; echo "   $liname2 \n"; echo " \n";
    } function menueub($ubname, $tdcolor2) { echo " \n"; echo " \n"; echo " > $ubname \n";
    echo " \n"; } echo " \n"; echo " \n"; echo " \n"; menueub("Main", "#407CBF");
    menuelink("index.php", "Home", "Home", "#54A3E2"); menuelink("index.php", "Home", "Home",
    "#54A3E2"); menuelink("index.php", "Home", "Home", "#54A3E2"); menuelink("index.php", "Home",
    "Home", "#54A3E2"); ....
  7. I don't use notepad for my php programming anymore
    I use Crimson Editor (27)
    I got it free on a MicroMart CD, but i'm sure you could find it on download.com It's a
    great alternative.....

    1. Looking for t, string, im, php, programming

Searching Video's for t, string, im, php, programming
See Also,
advertisement


What Is A T_string? - Please help! I'm new at PHP Programming

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com