Re: Parse error: syntax error, unexpected '>'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reading again, it's not just one miss. You have to close some strings, escape some quotes, etc

I think this can be right:

$sql = "SELECT * FROM melstatus WHERE custID=$custID ORDER BY
aircraftRegistration";

        $q = mysql_query($q)
        or die ("could not execute query.");

    echo " <fieldset>
            <ul style='list-style: none'>\n";

    while($row = mysql_fetch_array($q))
        {
        echo " <li>".$row['melID']."<input type=\"checkbox\"
name=\"".$row['melID']."\"/> ";

        echo "</li>\n";
        }
    echo "</ul></fieldset>";


I'd recomend you to get a good text editor with sintax highlighting if you haven't one. It would warn you from most of these mistakes.

And an xhtml issue: to use an empty tag, you use <tag/> and not <tag/tag>





________________________________
De: Fernando Castillo Aparicio <f_c_a_1980@xxxxxxxx>
Para: Haig Davis <level510@xxxxxxxxx>; php-general@xxxxxxxxxxxxx
Enviado: miércoles, 23 de septiembre, 2009 16:23:07
Asunto: Re:  Parse error: syntax error, unexpected '>'

You missed a double quote here:

    echo " <fieldset>
            <ul style='list-style: none'>\n";




________________________________
De: Haig Davis <level510@xxxxxxxxx>
Para: php-general@xxxxxxxxxxxxx
Enviado: miércoles, 23 de septiembre, 2009 16:18:17
Asunto:  Parse error: syntax error, unexpected '>'

Good morning Everyone,

I'm have trouble with a simple HTML Checkbox list. I keep getting *Parse
error*: syntax error, unexpected '>'. I'm sure I'm doing something really
simple and basic wrong I just cannot seem to see what it is, any assistance
is appreciated.

Script:

<form method="post" action="http://bw.org/misc/cgi-test/test.cgi";>

<?php
$sql = "SELECT * FROM melstatus WHERE custID=$custID ORDER BY
aircraftRegistration";

        $q = mysql_query($q)
        or die ("could not execute query.");

    echo " <fieldset>
            <ul style='list-style: none'>\n;

    while($row = mysql_fetch_array($q))
        {
        echo " <li>".$row['melID']."<input type="checkbox"
name="\".$row['melID].\""/input> ";

        </li>\n";
        }
    echo "</ul></fieldset>

?>
</form>

Many Thanks

Haig


      

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux