Forum Moderators: coopster

Message Too Old, No Replies

parse error on line 17

What should I look for around line 17

         

icare

4:53 pm on Aug 30, 2005 (gmt 0)

10+ Year Member



Parse error: parse error in d:\program files\easyphp1-8\www\test1\test-mysql.php on line 17 at the elseif

if($result==0){
echo($result+2);
echo("<p> helloWorld!");
//echo("<b>Erreur" .mysql_errno().":".mysql_error()."</b>");
elseif (mysql_num_rows($result) ==0)
echo("<b>Requête exécutée avec succès</b>");
else
{
?>
<!-- Tableau affichant les résultats -->
<table border="1">
<tr><td><b>Nom de la variable </b></td><td><b>Valeur</b></td></tr>
<?php

ChadSEO

5:04 pm on Aug 30, 2005 (gmt 0)

10+ Year Member



icare,

Welcome to WebmasterWorld!

It looks like you are missing a curly brace } before the elseif statement. Other than that, it looks good.

Chad

dreamcatcher

5:27 pm on Aug 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Looks like there might be 2 or 3 braces missing.

dc

ChadSEO

5:29 pm on Aug 30, 2005 (gmt 0)

10+ Year Member



Indeed, although the brace after the "else" is rather obvious, so I'm assuming (hoping?) it's matched down below.

Chad

icare

9:30 pm on Aug 30, 2005 (gmt 0)

10+ Year Member



Thank you very much for your help!
It was just my beginning with PHP-MySQL
I'm used to ASP

[edited by: coopster at 3:22 pm (utc) on Aug. 31, 2005]
[edit reason] removed url per TOS [webmasterworld.com] [/edit]