List:General Discussion« Previous MessageNext Message »
From:Jason Teagle Date:April 12 2006 4:21pm
Subject:RE: Error on T_echo ?? what is this ?
View as plain text  
I believe you are missing the trailing semicolon from the previous line of
code, before the "//confirm" comment. It's a rather cryptic way of saying it
found "echo" when it expected something else first. Gotta love those PHP
error messages.

--
Jason Teagle
jason@stripped


> -----Original Message-----
> From: Brian E Boothe [mailto:subrian@stripped]
> Sent: 13 April 2006 05:13
> To: mysql@stripped
> Subject: Error on T_echo ?? what is this ?
>
>
> i,m getting the following error on my MySQL Code inserting data into a
> database, .?
>
>    *Parse error*: parse error, unexpected T_ECHO in
> c:\inetpub\wwwroot\projects\testsum\adddata.php on line 30
>
>                                                 LINE 30 is       echo
> "Query Finished";
>
> <<<<----------here is ALL my code ---------->>>>>
>   <?
> //--php/Mysql Code by Brian E Boothe  //
> //throw data from form into MySQL database routine //
> //initilize Adddatta to mysql database, //
>
> //if($_POST['submit']) //If submit is hit
> //{
>    //then connect as user
>    //change user and password to your mySQL name and password
>    mysql_connect("localhost","root","goobers");
>
>    //select which database you want to edit
>    mysql_select_db("test");
>
>    //convert all the posts to variables:
>   $value1 = $_POST['value1'];
>   $value2 = $_POST['value2'];
>   $sumfield = $_POST['sumfield'];
>
>        //Insert the values into the correct database with the right fields
>    //mysql table = news
>    //table columns = id, title, message, who, date, time
>    //post variables = $title, $message, '$who, $date, $time
>   // $result=MYSQL_QUERY("INSERT INTO orders
> (id,title,message,who,date,time)".
>   $result=MYSQL_QUERY("INSERT INTO addvalue (`value1`, `value2`,
> `sumfeild`)".
>       "VALUES ('$value1', '$value2', '$sumfield')"
>      //INSERT INTO `orders` (`OrderNo`, `CompanyName`, `BillingAddress`,
> `City`, `StateOrProvince`, `PostalCode`, `PhoneNumber`, `FaxNumber`,
> `WebPage`, `ContactFirstName`, `ContactLastName`, `EmailAddress`,
> `Notes`, `Customer`, `Startdate`, `Completedate`, `Biddate`,
> `Bidamount`, `ProjectInfo`, `ElecProjCost`, `ElecProjBill`, `ElecRem`,
> `CtrlProjCost`, `CtrlProjBill`, `CtrlRem`, `OthrProjCost`,
> `OthrProjBill`, `OthrRem`, `BondAm`, `BondBill`, `BondRem`)
>     //confirm
>
>  echo "Query Finished";
>
> ?>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>
>

Thread
Error on T_echo ?? what is this ?Brian E Boothe12 Apr
  • RE: Error on T_echo ?? what is this ?Jason Teagle12 Apr
  • Re: Error on T_echo ?? what is this ?Eric Braswell12 Apr
  • Re: Error on T_echo ?? what is this ?Peter Brawley12 Apr
  • RE: Error on T_echo ?? what is this ?Chrome12 Apr
RE: Error on T_echo ?? what is this ?Jay Blanchard12 Apr
RE: Error on T_echo ?? what is this ?George Law12 Apr
  • RE: Error on T_echo ?? what is this ?Chrome12 Apr