| |
|
Welcome to KnowledgeSutra - Dear Guest | |
What Is A T_string?
Started by Hamtaro, Jan 18 2005 03:34 AM
19 replies to this topic
#1
Posted 18 January 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.
Exactly what is a T_STRING? If I need to post my code, I will.
#3
Posted 18 January 2005 - 10:14 AM
Hamtaro, on Jan 18 2005, 03:34 AM, said:
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.
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.
#4
Posted 18 January 2005 - 11:09 PM
Ok, here's just the PHP code for the file. The rest is the page that displays the Thank-You page:
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?
<?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?
#5
Posted 18 January 2005 - 11:26 PM
Hamtaro, on Jan 18 2005, 06:09 PM, said:
Ok, here's just the PHP code for the file. The rest is the page that displays the Thank-You page:
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?
<?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?
example:
<?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);
?>
#7
Posted 19 January 2005 - 12:40 AM
Hamtaro, on Jan 18 2005, 07:28 PM, said:
no problem, that took me some time to learn, too...
#8
Posted 31 December 2007 - 03:10 AM
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
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
#9
Posted 10 January 2008 - 03:51 AM
FeedBacker, on Dec 30 2007, 07:10 PM, said:
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
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
the error would be the semicolon between the function name and the parenthesis. Try this:
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.
#10
Posted 21 March 2008 - 05: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 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
Reply to this topic

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users














