Go to Post They're pigs, Barry, pigs. And they can fly... - JaneYoung [more]
Home
Go Back   Chief Delphi > Technical > IT / Communications > Website Design/Showcase
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 25-02-2006, 19:28
aubinhick990 aubinhick990 is offline
Programmer
FRC #0238 (Cruisin' Crusaders)
Team Role: Programmer
 
Join Date: Feb 2006
Rookie Year: 2005
Location: New Hampshire
Posts: 11
aubinhick990 is an unknown quantity at this point
Send a message via AIM to aubinhick990
Really Creepy PHP Parse Error

Does anyone know why this code does not work?

My debug log says
[26-Feb-2006 00:28:14] PHP Parse error: parse error, unexpected $ in /cmt/posting/submit.php on line 115

(I know it's crap code but I just need to get it working ASAP)
PHP Code:
<?
            $writetofileA 
"$gsname";
            
$writetofileB "$codeA - $codeB - $codeC";
            
$writetofileC "$timeonline";
            
$writetofileD "$timezone";
            
$writetofileE "$info";
            
$writetofileF "$townname";
            
$writetofileG "$wfcname";
            
$writetofileK "$email";
    
            
$openedA fopen("$gsname.name.txt","a");
            
fwrite($openedA$writetofileA);
            
fclose("$gsname.name.txt");

            
$openedB fopen("$gsname.$game.code.txt","a");
            
fwrite($openedB$writetofileB);
            
fclose("$gsname.$game.code.txt");

            
$openedC fopen("$gsname.$game.timeonline.txt","a");
            
fwrite($openedC$writetofileC);
            
fclose("$gsname.$game.timeonline.txt");

            
$openedD fopen("$gsname.timezone.txt","a");
            
fwrite($openedD$writetofileD);
            
fclose("$gsname.timezone.txt");
    
            
$openedE fopen("$gsname.$game.info.txt","a");
            
fwrite($openedE$writetofileE);
            
fclose("$gsname.$game.info.txt");

            if(
$game == acww) {
                
$openedF fopen("$gsname.acww.townname.txt","a");
                
fwrite($openedF$writetofileF);
                
fclose("$gsname.acww.townname.txt");
            }

            
$openedG fopen("$gsname.$game.name.txt","a");
            
fwrite($openedG$writetofileG);
            
fclose("$gsname.$game.name.txt");

            
$checkfile "$gsname.dateregistered.txt";
            if(!
file_exists($checkfile)) {
                
$wday date("l");
                
$month date("F");
                
$day date("j");
                
$year date("Y");

                
$writetofileH "$wday$month $day$year GMT";
                
$openedH fopen("$gsname.dateregistered.txt","a");
                
fwrite($openedH$writetofileH);
                
fclose("$gsname.dateregistered.txt");

            
$writetogamefile "
            <?
            \$lookforme = \"
$gsname.$game.code.txt\";
            if(file_exists(\$lookforme)) { ?>
            <div align=center><center>

            <table border=0 width=<? echo \"\$table_w\"; ?> bgcolor=\"#000000\">
                <tr>
                    <td width=<? echo \"\$col1_w\"; ?>><font color=#FFFFFF size=2
                    face=Arial><strong>GameSpot Name:</strong></font></td>
                    <td width=<? echo \"\$col2_w\"; ?>><font color=#FFFFFF size=2
                    face=Arial><a href=profile.php?user=
$gsname>$gsname</a></font></td>
            <td rowspan=2 width=<? echo \"\$col3_w\"; ?>>

            <?
            \$checkavatar = \"
$gsname.avatar.url.txt\";
            if(file_exists(\$checkavatar)) { ?>
            <a href=profile.php?user=
$gsname><img src=<? include \"$gsname.avatar.url.txt\"; ?> width=<? include \"$gsname.avatar.width.txt\"; ?>             height=<? include \"$gsname.avatar.height.txt\"; ?> border=0></a>
            <? } ?>
            </td>
                </tr>
                <tr>
                    <td width=<? echo \"\$col1_w\"; ?>><font color=#FFFFFF size=2
                    face=Arial><strong>Code:</strong></font></td>
                    <td width=<? echo \"\$col2_w\"; ?>><font color=#FFFFFF size=2
                    face=Arial><? include \"
$gsname.$game.code.txt\"; ?></font></td>
                </tr>
            </table>
            </center></div>
            <? } ?><br>\n\n\n\n\n"
;

            
$openedI fopen("$game.txt","a");
            
fwrite($openedI$writetogamefile);
            
fclose("$game.txt");


            
$list "users_list";
            
$writetolist "
            <b>-</b> <a href=profile.php?user=
$gsname>$gsname</a><br><br>
            \n\n\n\n
            "
;

            
$openedJ fopen("$list.txt","a");
            
fwrite($openedJ$writetolist);
            
fclose("$list.txt");

            
$openedK fopen("$gsname.email.txt","a");
            
fwrite($openedK$writetofileK);
            
fclose("$gsname.email.txt");

            if(
$notify == on) {
                
$openedL fopen("$gsname.showemail.txt","a");
                
fwrite($openedL$writetofileL);
                
fclose("$gsname.showemail.txt");
            }


            
$writetofileM crypt($password01);
            
$openedM fopen("appts/login_data/$gsname.password.txt","w");
            
fwrite($openedM$writetofileM);
            
fclose("$openedM");
            echo 
"Sucess! The data has been written to the database.";
?>
  #2   Spotlight this post!  
Unread 25-02-2006, 19:36
steven114 steven114 is offline
Programming Wizard and Team Captain
AKA: Steven Schlansker
FRC #0114 (Eaglestrike)
Team Role: Programmer
 
Join Date: Feb 2004
Location: Los Altos, CA
Posts: 335
steven114 is a jewel in the roughsteven114 is a jewel in the roughsteven114 is a jewel in the rough
Send a message via AIM to steven114
Re: Really Creepy PHP Parse Error

You left off a closing brace on line 52ish (right before you set $writetogamefile).
__________________
Shift to the left, shift to the right!
Pop up, push down, byte, byte, byte!
  #3   Spotlight this post!  
Unread 25-02-2006, 19:39
aubinhick990 aubinhick990 is offline
Programmer
FRC #0238 (Cruisin' Crusaders)
Team Role: Programmer
 
Join Date: Feb 2006
Rookie Year: 2005
Location: New Hampshire
Posts: 11
aubinhick990 is an unknown quantity at this point
Send a message via AIM to aubinhick990
Re: Really Creepy PHP Parse Error

Quote:
Originally Posted by steven114
You left off a closing brace on line 52ish (right before you set $writetogamefile).
Thank you so much!!!
I can't tell you how many times I read through the code!
  #4   Spotlight this post!  
Unread 25-02-2006, 20:13
steven114 steven114 is offline
Programming Wizard and Team Captain
AKA: Steven Schlansker
FRC #0114 (Eaglestrike)
Team Role: Programmer
 
Join Date: Feb 2004
Location: Los Altos, CA
Posts: 335
steven114 is a jewel in the roughsteven114 is a jewel in the roughsteven114 is a jewel in the rough
Send a message via AIM to steven114
Re: Really Creepy PHP Parse Error

Happens
__________________
Shift to the left, shift to the right!
Pop up, push down, byte, byte, byte!
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MPLink Error cloudago Programming 2 01-02-2005 23:00
openFIRST PHP 5 Compatibility Timothy D. Ginn FIRST-related Organizations 0 30-07-2004 13:45
PHP and Wiki Error Venkatesh Website Design/Showcase 2 24-07-2004 15:51
Php error on the portal Adam Y. CD Forum Support 1 06-07-2004 11:32
What's better, PERL/cgi or PHP/my_sql? mikefrei Programming 10 27-05-2002 22:50


All times are GMT -5. The time now is 01:55.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi