GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 09-Mar-2006, 13:20
d3mps3y d3mps3y is offline
Awaiting Email Confirmation
 
Join Date: Mar 2006
Location: Arnhem, The Netherlands
Posts: 2
d3mps3y is on a distinguished road
Question

Parse Error $end ?? :S


Please help me with this. I'm making a profile page in PHP and keep getting this error:
Parse error: syntax error, unexpected $end in C:\Documents and Settings\Dempsey\Desktop\PcExperience\_debug_tmp.p hp on line 407

Here is the complete code:
PHP Code:

<?

include("global.php");
include("header.php");

if(ingelogd() == TRUE){

    if(isset($_GET['actie']) AND $_GET['actie'] == "controleren"){

        if(!empty($_POST['avatar'])){

        if(remote_file_exists($_POST['avatar'])){

            list($width, $height, $type, $attr) = getimagesize($_POST['avatar']);

            if($width > 100 OR $height > 100){

            begintabel("Foutmelding");

            echo "De door u gekozen avatar voldoet niet aan onze eisen: maximaal 100x100!<br>
            Uw avatar is ".$width."x".$height."!";

            eindetabel();

            } else {

        @mysql_query("UPDATE leden SET

        roepnaam='".addslashes($_POST['roepnaam'])."',
        hobbys='".addslashes($_POST['hobbys'])."',
            geslacht='".addslashes($_POST['geslacht'])."',
            woonplaats='".addslashes($_POST['woonplaats'])."',
        homepage='".addslashes($_POST['homepage'])."',
        land='".addslashes($_POST['land'])."',
            designen='".addslashes($_POST['designen'])."',
            scripten='".addslashes($_POST['scripten'])."',
        software='".addslashes($_POST['software'])."',
            tekentablet='".addslashes($_POST['tekentablet'])."',
            overige='".addslashes($_POST['overige'])."',
        kortverhaal='".addslashes($_POST['kortverhaal'])."',
        signature='".addslashes($_POST['signature'])."',
            avatar='".$_POST['avatar']."'

        WHERE id='".$_COOKIE['id']."'") or die(mysql_error());

        begintabel("Profiel bijgewerkt");

        echo "Uw profiel is succesvol bijgewerkt!";

        eindetabel();

            }

        } else {

        begintabel("Foutmelding");

        echo "De door u gekozen avatar bestaat niet!";

        eindetabel();

        }

        } else {

        @mysql_query("UPDATE leden SET

        roepnaam='".addslashes($_POST['roepnaam'])."',
        hobbys='".addslashes($_POST['hobbys'])."',
            geslacht='".addslashes($_POST['geslacht'])."',
            woonplaats='".addslashes($_POST['woonplaats'])."',
        homepage='".addslashes($_POST['homepage'])."',
        land='".addslashes($_POST['land'])."',
            designen='".addslashes($_POST['designen'])."',
            scripten='".addslashes($_POST['scripten'])."',
        software='".addslashes($_POST['software'])."',
            tekentablet='".addslashes($_POST['tekentablet'])."',
            overige='".addslashes($_POST['overige'])."',
        kortverhaal='".addslashes($_POST['kortverhaal'])."',
        signature='".addslashes($_POST['signature'])."',
            avatar='".$_POST['avatar']."'


        WHERE id='".$_COOKIE['id']."'") or die(mysql_error());

        begintabel("Profiel bijgewerkt");

        echo "Uw profiel is succesvol bijgewerkt!";

        eindetabel();

        }

    } else {

        echo "<form name='pw' action='".$_SERVER['PHP_SELF']."?actie=controleren' method='POST'>";

        begintabel("Persoonlijke gegevens");

        $query = @mysql_query("SELECT * FROM leden WHERE id='".$_COOKIE['id']."'");
        $row = @mysql_fetch_assoc($query);

        echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>
        <tr>
            <td width='50%' height='24'>Roepnaam</td>
            <td width='50%' height='24'><input type='text' name='roepnaam' value='".stripslashes($row['roepnaam'])."'></td>
        </tr>
        <tr>
            <td width='50%' height='24'>Hobbys</td>
            <td width='50%' height='24'><input type='text' name='hobbys' value='".stripslashes($row['hobbys'])."'></td>
        </tr>
        <tr>
            <td width='50%' height='24'>Geslacht</td>
            <td width='50%' height='24'>";

        if($row['geslacht'] == "Man"){

            echo "<select size='1' name='geslacht'>
            <option value='Man' selected>Man</option>
            <option value='Vrouw'>Vrouw</option>
            </select>";

        } else {

            echo "<select size='1' name='geslacht'>
            <option value='Man'>Man</option>
            <option value='Vrouw' selected>Vrouw</option>
            </select>";

        }

        echo "</td>
        </tr>
        <tr>
            <td width='50%' height='24'>Woonplaats</td>
            <td width='50%' height='24'><input type='text' name='woonplaats' value='".stripslashes($row['woonplaats'])."'></td>
        </tr>
        <tr>
            <td width='50%' height='24'>Land</td>
            <td width='50%' height='24'>";

        if($row['land'] == "Nederland"){

            echo "<select size='1' name='land'>
            <OPTION value=CO selected>Selecteer een land of gebied:</OPTION>
            <OPTION value=US>United States</OPTION>
            <OPTION value=AU>Australia</OPTION>
            <OPTION value=BE>Belgium</OPTION>
            <OPTION value=BR>Brasil</OPTION>
                  <OPTION value=CA>Canada</OPTION>
            <OPTION value=CN>China</OPTION>
                  <OPTION value=DK>Denmark</OPTION>
            <OPTION value=DE>Germany</OPTION>
            <OPTION value=FR>France</OPTION>
            <OPTION value=IT>Italy</OPTION>
            <OPTION value=JP>Japan</OPTION>
            <OPTION value=NL>The Netherlands</OPTION>
            <OPTION value=NO>Norway</OPTION>
            <OPTION value=AT>Austria</OPTION>
            <OPTION value=PT>Portugal</OPTION>
                <OPTION value=SG>Singapore</OPTION>
            <OPTION value=ES>Spain</OPTION>
            <OPTION value=TW>Taiwan</OPTION>
            <OPTION value=GB>United Kingdom</OPTION>
            <OPTION value=KR>South-Korea</OPTION>
            <OPTION value=SE>Sweden</OPTION>
            <OPTION value=Other>Other Country</OPTION>
            <OPTION value=AF>Afghanistan</OPTION>
                  <OPTION value=IE>Ireland</OPTION>
            </select>";

            if($row['land'] == "Belgie"){

            echo "<select size='1' name='land'>
            <OPTION value=CO selected>Selecteer een land of gebied:</OPTION>
            <OPTION value=US>United States</OPTION>
            <OPTION value=AU>Australia</OPTION>
            <OPTION value=BE>Belgium</OPTION>
            <OPTION value=BR>Brasil</OPTION>
                  <OPTION value=CA>Canada</OPTION>
            <OPTION value=CN>China</OPTION>
                  <OPTION value=DK>Denmark</OPTION>
            <OPTION value=DE>Germany</OPTION>
            <OPTION value=FR>France</OPTION>
            <OPTION value=IT>Italy</OPTION>
            <OPTION value=JP>Japan</OPTION>
            <OPTION value=NL>The Netherlands</OPTION>
            <OPTION value=NO>Norway</OPTION>
            <OPTION value=AT>Austria</OPTION>
            <OPTION value=PT>Portugal</OPTION>
                <OPTION value=SG>Singapore</OPTION>
            <OPTION value=ES>Spain</OPTION>
            <OPTION value=TW>Taiwan</OPTION>
            <OPTION value=GB>United Kingdom</OPTION>
            <OPTION value=KR>South-Korea</OPTION>
            <OPTION value=SE>Sweden</OPTION>
            <OPTION value=Other>Other Country</OPTION>
            <OPTION value=AF>Afghanistan</OPTION>
                  <OPTION value=IE>Ireland</OPTION>
            </select>";

        } else {

            echo "<select size='1' name='land'>
            <OPTION value=CO selected>Selecteer een land of gebied:</OPTION>
            <OPTION value=US>United States</OPTION>
            <OPTION value=AU>Australia</OPTION>
            <OPTION value=BE>Belgium</OPTION>
            <OPTION value=BR>Brasil</OPTION>
                  <OPTION value=CA>Canada</OPTION>
            <OPTION value=CN>China</OPTION>
                  <OPTION value=DK>Denmark</OPTION>
            <OPTION value=DE>Germany</OPTION>
            <OPTION value=FR>France</OPTION>
            <OPTION value=IT>Italy</OPTION>
            <OPTION value=JP>Japan</OPTION>
            <OPTION value=NL>The Netherlands</OPTION>
            <OPTION value=NO>Norway</OPTION>
            <OPTION value=AT>Austria</OPTION>
            <OPTION value=PT>Portugal</OPTION>
                <OPTION value=SG>Singapore</OPTION>
            <OPTION value=ES>Spain</OPTION>
            <OPTION value=TW>Taiwan</OPTION>
            <OPTION value=GB>United Kingdom</OPTION>
            <OPTION value=KR>South-Korea</OPTION>
            <OPTION value=SE>Sweden</OPTION>
            <OPTION value=Other>Other Country</OPTION>
            <OPTION value=AF>Afghanistan</OPTION>
                  <OPTION value=IE>Ireland</OPTION>
            </select>";


        }

        echo "</td>
        </tr>
        <tr>
            <td width='50%' height='24'>Homepage(s)</td>
            <td width='50%' height='24'><input type='text' name='homepage' value='".stripslashes($row['homepage'])."'></td>
        </tr>
        </table>";

        eindetabel();

        echo "<br>";

        begintabel("Signature");

        echo icon("pw", "signature");

        echo "<textarea style='width: 100%;' name='signature' rows='6'>".htmlspecialchars(stripslashes($row['signature']))."</textarea>";

        eindetabel();

        echo "<br>";

        begintabel("Avatar");

        echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>
        <tr>
            <td width='50%' height='24'>Huidige avatar<br>&nbsp;</td>
            <td width='50%' height='24' valign='top'>";

        if(!empty($row['avatar'])){

            echo "<img src='".$row['avatar']."'>";

        } else {

            echo "<i>Geen avatar ingesteld</i>";

        }

        echo "<br>&nbsp;</td>
        </tr>
        <tr>
            <td width='50%' height='24'>Avatar URL</td>
            <td width='50%' height='24'><input type='text' name='avatar' value='".stripslashes($row['avatar'])."'></td>
        </tr>
        </table>";

        eindetabel();

        echo "<br>";

        begintabel("Vaardigheden");

        $designen[1] = "";
        $designen[2] = "";
        $designen[3] = "";
        $designen[4] = "";
        $designen[5] = "";
        $designen[$row['designen']] = " selected";

        $scripten[1] = "";
        $scripten[2] = "";
        $scripten[3] = "";
        $scripten[4] = "";
        $scripten[5] = "";
        $scripten[$row['scripten']] = " selected";

        $software[1] = "";
        $software[2] = "";
        $software[3] = "";
        $software[4] = "";
        $software[5] = "";
        $software[$row['software']] = " selected";

        $hardware[1] = "";
        $hardware[2] = "";
        $hardware[3] = "";
        $hardware[4] = "";
        $hardware[5] = "";
        $hardware[$row['hardware']] = " selected";

        $gaming[1] = "";
        $gaming[2] = "";
        $gaming[3] = "";
        $gaming[4] = "";
        $gaming[5] = "";
        $gaming[$row['gaming']] = " selected";

        echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>
        <tr>
            <td width='50%' height='24'>Designen</td>
            <td width='50%' height='24'><select size='1' name='designen'>
            <option value='1'".$designen[1].">1</option>
            <option value='2'".$designen[2].">2</option>
            <option value='3'".$designen[3].">3</option>
            <option value='4'".$designen[4].">4</option>
            <option value='5'".$designen[5].">5</option>
            </select></td>
        </tr>
        <tr>
            <td width='50%' height='24'>Scripten</td>
            <td width='50%' height='24'><select size='1' name='scripten'>
            <option value='1'".$scripten[1].">1</option>
            <option value='2'".$scripten[2].">2</option>
            <option value='3'".$scripten[3].">3</option>
            <option value='4'".$scripten[4].">4</option>
            <option value='5'".$scripten[5].">5</option>
            </select></td>
        </tr>
        <tr>
            <td width='50%' height='24'>Software</td>
            <td width='50%' height='24'><select size='1' name='software'>
            <option value='1'".$software[1].">1</option>
            <option value='2'".$software[2].">2</option>
            <option value='3'".$software[3].">3</option>
            <option value='4'".$software[4].">4</option>
            <option value='5'".$software[5].">5</option>
            </select></td>
        </tr>
        </table>";

        eindetabel();

        echo "<br>";

        begintabel("Systemspecs");

        echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>
        <tr>
            <td width='50%' height='24'>Teken tablet</td>
            <td width='50%' height='24'><input type='text' name='tekentablet' value='".stripslashes($row['tekentablet'])."'></td>
        </tr>
        <tr>
            <td width='50%' height='24'>Overige</td>
            <td width='50%' height='24'><input type='text' name='overige' value='".stripslashes($row['overige'])."'></td>
        </tr>
        </table>";

        eindetabel();

        echo "<br>";

        begintabel("Kort verhaal dat ik kwijt wil...");

        echo "<textarea name='kortverhaal' style='width: 100%;' rows='6'>".htmlspecialchars(stripslashes($row['kortverhaal']))."</textarea>";

        eindetabel();

        echo "<br>";

        begintabel("Bevestigen");

        echo "<input type='submit' value='Profiel Wijzigen'>";

        eindetabel();

        echo "</form>";

    }

 else {

    begintabel("Foutmelding");

    echo "U dient ingelogd te zijn om deze pagina te kunnen bekijken!";

    eindetabel();

}

include("footer.php");
?>


The strange thing is: I have only 406 lines, and the error is on line 407
  #2  
Old 09-Mar-2006, 18:46
TurboPT's Avatar
TurboPT TurboPT is offline
Regular Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 924
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: Parse Error $end ?? :S


With an editor that can do bracket matching {}, your very first if statement's opening '{' has no match.

So I'll let you determine where the other '}' needs to go.
  #3  
Old 10-Mar-2006, 12:04
d3mps3y d3mps3y is offline
Awaiting Email Confirmation
 
Join Date: Mar 2006
Location: Arnhem, The Netherlands
Posts: 2
d3mps3y is on a distinguished road
Thumbs up

Re: Parse Error $end ?? :S


Thank you very much! I fixed the code, and I can use the page now...
I use PHP Designer 2005 for this, it's a freeware program and easy to use with many features. I didn't need that bracket anymore as I removed some unnessecary scripting, so I just removed it.
 
 

Recent GIDBlogToyota - 2008 July Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in ukrspp21 MySQL / PHP Forum 31 04-Jul-2006 21:41
Parse Error vigilantweather MySQL / PHP Forum 3 21-Feb-2006 12:24
Parse Error vigilantweather MySQL / PHP Forum 6 04-Feb-2006 13:15
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' quiescent MySQL / PHP Forum 7 13-Nov-2005 15:43
using Floats and Parse' CeSu-Pro .NET Forum 4 18-Feb-2005 17:58

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 19:05.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.