Jump to content

Recommended Posts

if (mysql_num_rows($year_result) > 0 or mysql_num_rows($industry_result)){
     // yes
     // print them one after another
if (!isset($_POST['wercbench1'])) {
 echo"<form method=\"POST\" action=\"<?php$_SERVER['PHP_SELF']; ?>\" name=\"wercbench1\">";
     echo"<table style=\"width: 100%;\" border=\"1\" cellpadding=\"2\" cellspacing=\"2\">";
     echo"<tbody>";
     echo" <tr>";
     echo"   <td>Select the comparison year and group then click next";
     echo"   </td>";
     echo"   <td></td>";
     echo" </tr>";
     echo" <tr>";
     echo"  <td>";
     echo"   <select name=\"year\">";
     while($row = mysql_fetch_row($year_result)) {
     echo"<option value=\"" .$row[0]. "\">".$row[0]."</option>";
 }
     echo"   </select>";
     echo"   </td>";
     echo"   <td></td>";
     echo" </tr>";


     echo" <tr>";
     echo"   <td>";
 echo"   <select name=\"industry\">";
  while($row = mysql_fetch_row($industry_result)) {
     echo"<option value=\"" .$row[0]. "\">".$row[0]."</option>";
}
     echo"   </select>";
 echo"</td>";
     echo"   <td></td>";
     echo" </tr>";
     echo" <tr>";
     echo"   <td><input type=\"Submit\" value=\"Next\" name=\"wercbench1_next\"></button></td>";
     echo"   <td></td>";
     echo" </tr>";

    echo"</tbody>";
  echo"</table>";
echo"</form>";
}
}

Link to comment
https://forums.phpfreaks.com/topic/65077-parse-error-help/#findComment-324790
Share on other sites

if (mysql_num_rows($year_result) > 0 or mysql_num_rows($industry_result)){

 

thats wrong if you want a OR statement you use ||

 

so here you go:

 

if (mysql_num_rows($year_result) > 0 || mysql_num_rows($industry_result)){

 

there is alos semi colon here:

echo"<table style=\"width: 100%;\" border=\"1\" cellpadding=\"2\" cellspacing=\"2\">";

 

change to:

 

echo"<table style=\"width: 100%\" border=\"1\" cellpadding=\"2\" cellspacing=\"2\">";

Link to comment
https://forums.phpfreaks.com/topic/65077-parse-error-help/#findComment-324795
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.