Forum Moderators: coopster

Message Too Old, No Replies

Parse Error. Unexpected T STRING in .

         

astro1981

8:36 pm on Aug 21, 2007 (gmt 0)

10+ Year Member



Hi guys. Complete newbie in PHP. I get following error message when I try to open the file admincp.php.
I am using a wamp system, to test my scripts before I upload them to the server, but now I get following error message:

Unexpected T_STRING on line 23. The code is as following:

if(isset($_POST['posted']) && $_POST['posted'] == 1)
{
if (file_exists($filename)) {

$fhandle = fopen($filename,"wb");

$str ="<?php
".chr(36)."gamename = \"".trim(stripslashes($_POST['gamename']))."\";\n
".chr(36)."loginname = \"".trim(stripslashes($_POST['loginname']))."\";\n
".chr(36)."dbname = \"".trim(stripslashes($_POST['dbname']))."\";\n
".chr(36)."dbpassword = \"".trim(stripslashes($_POST['dbpassword']))."\";\n

I didn't find any error

Please help me. Thanks in advance

Habtom

4:59 am on Aug 22, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You wouldn't the opening tag in there:

change this:

$str ="<?php

to this:
$str ="

Habtom

astro1981

8:36 am on Aug 22, 2007 (gmt 0)

10+ Year Member



Thanks very much. That was it.