Hi

I am getting a blank web page when I try to access the web page on the browser. I ma new to the PHP environment and I have been trying to debug but fruitless.. I know it is some html tag ot some minor problem in the cde. It would be great if somebody could help me in debugging the problem.

<?

    // resview.php

    headerinfo1();


    @ $db = mysql_pconnect("sddbs02", "actuate", "actuate");

    if(!$db)
    {
        print "Error: Cound not connect to Mysql database. Please try again later.";
        exit;
    }
    $buildDB = "protodb";
    //***change to protodb
    mysql_select_db($buildDB);


    echo "<table>";
    echo "<tr>";
    echo "<td width='50%' >";
    echo "<b>Comprehensive format</b></td></tr>";
    echo "<BR>";
    $tempscript = "testgraph.php?act=resview2";
    print "<table class='tditem'>";
    print "<FORM ACTION='$tempscript' METHOD='POST' NAME='myForm'>";
    ?>
    <tr>
    <td>Week Start</td>
    <td>Week End</td>
    <td>Year</td>
    </tr>

    <?

    print "<tr><td><INPUT TYPE='text' MAXLENGTH='2' NAME='whichweekstart' SIZE='2'>";
    print "</td>";
    print "<td><INPUT TYPE='text' MAXLENGTH='2' NAME='whichweekend' SIZE='2'>";
    print "</td>";
    print "<td><INPUT TYPE='text' MAXLENGTH='4' NAME='whichyear' SIZE='4'>";
    print "</td>";
    print "</tr>";


    echo "<input type='submit' value='Make Page'>";


    echo "<P>";
     print "</FORM>";
    print "</table>";

    //////////////////////////////////////////////////////////////////////////////////////////
    echo "<b>Weekly task reports format</b>";
    3/17/2008echo "<BR>";
    $tempscript = "testgraph.php?act=resview_weekly";
    print "<table class='tditem'>";
    print "<FORM ACTION='$tempscript' METHOD='POST' NAME='myForm'>";
    ?>
    <tr>
    <td>Week Start</td>
    <td>Week End</td>
    <td>Year</td>
    </tr>
    <tr>
    <?
    print "<td><INPUT TYPE='text' MAXLENGTH='2' NAME='whichweekstart' SIZE='2'>";
    print "</td>";
    print "<td><INPUT TYPE='text' MAXLENGTH='2' NAME='whichweekend' SIZE='2'>";
    print "</td>";
    print "<td><INPUT TYPE='text' MAXLENGTH='4' NAME='whichyear' SIZE='4'>";
    print "</td>";
    print "</tr>";
    echo "</table>";
    echo "<input type='submit' value='Make Page'>";
    echo "</form>";

    echo "<b>Weekly task reports sorted by Team</b>";
    echo "<BR>";



    $tempscript = "testgraph.php?act=resview_weekly_byteam";

    print "<table class='tditem'>";
    print "<FORM ACTION='$tempscript' METHOD='POST' NAME='myForm'>";
    ?>
    <tr>
    <td>Week Start</td>
    <td>Week End</td>
    <td>Year</td>
    </tr>
    <tr>
    <?
    print "<td><INPUT TYPE='text' MAXLENGTH='2' NAME='whichweekstart' SIZE='2'>";
    print "</td>";
    print "<td><INPUT TYPE='text' MAXLENGTH='2' NAME='whichweekend' SIZE='2'>";
    print "</td>";
    print "<td><INPUT TYPE='text' MAXLENGTH='4' NAME='whichyear' SIZE='4'>";
    print "</td>";
    print "</tr>";
    echo "</table>";
    echo "<input type='submit' value='Make Page'>";
    echo "</form>";



    echo "</td>";

    echo "<td>";

    //////////////////////////////////////////////////////////////////////////////////////////

    echo "<P>";
    echo "<b>Individual Resource format</b>";
    echo "<BR>";


    $tempscript ="testgraph.php?act=resview_resource";
    print "<table class='tditem'>";
    print "<FORM ACTION='$tempscript' METHOD='POST' NAME='myForm'>";
    ?>
    <tr>
    <td>Week Start</td>
    <td>Week End</td>
    <td>Year</td>
    <td>Resource</td>
    </tr>
    <tr>
    <?
    print "<td><INPUT TYPE='text' MAXLENGTH='2' NAME='whichweekstart' SIZE='2'>";
    print "</td>";
    print "<td><INPUT TYPE='text' MAXLENGTH='2' NAME='whichweekend' SIZE='2'>";
    print "</td>";
    print "<td><INPUT TYPE='text' MAXLENGTH='4' NAME='whichyear' SIZE='4'>";
    print "</td>";

    ?>
    <td>

    <select name="resource_selected" size=1> <!--  changed from size = 8 to 1 -->
    <?
    $result27 = mysql_query(" select * from Builds_Resources where rootgrp='Field_Test' and facility='San_Diego' and name<>'' and  gpname <> 'LO, Taiwan' OR gpname <>'Others' OR gpname <> 'LO, China'  order by name ");
    if (!$result27) print "errorBRS27c";
    $numrows27 = mysql_num_rows($result27);
    $objects27 = mysql_fetch_object($result27);

    for ($i27 = 0; $i27 < =$numrows27; $i27++ )
    {
        print "<option value=".$objects27->empid.">".$objects27->name."</option>";
        $objects27 = mysql_fetch_object($result27);
    }
    ?>
    </select>
    </td>
    <?

    print "</tr>";
    echo "</table>";
    echo "<input type='submit' value='Make Page'>";
    echo "</form>";
    echo "<BR>";
    echo "<BR>";
    echo "<b>Regional Tasks Report</b>";


    $tempscript ="testgraph.php?act=resview_region";

    print "<table class='tditem'>";

    print "<FORM ACTION='$tempscript' METHOD='POST' NAME='myForm'>";

    ?>

    <tr>
    <td>Week Start</td>
    <td>Week End</td>
    <td>Year</td>
    <td>Regions</td>
    </tr>
    <tr>
    <?
    print "<td><INPUT TYPE='text' MAXLENGTH='2' NAME='whichweekstart' SIZE='2'>";
    print "</td>";
    print "<td><INPUT TYPE='text' MAXLENGTH='2' NAME='whichweekend' SIZE='2'>";
    print "</td>";
    print "<td><INPUT TYPE='text' MAXLENGTH='4' NAME='whichyear' SIZE='4'>";
    print "</td>";

    ?>
    <td>
    <select name="regions_selected">
    <?
    $result27 = mysql_query(" select  DISTINCT line from builds where groupname='Field_Test' and (line='Australia ' or line ='China' or line ='San Diego' or line ='Brazil' or line='India')");
    if (!$result27) print "errorBRS27c";
    $numrows27 = mysql_num_rows($result27);
    $objects27 = mysql_fetch_object($result27);

    for ($i27 = 0; $i27 < $numrows27; $i27++ )
    {
        print "<option value=\"".$objects27->line."\">".$objects27->line."</option>";
        $objects27 = mysql_fetch_object($result27);
    }
    ?>
    </select>
    </td>
    <?
    print "</tr>";
    echo "</table>";
    echo "<input type='submit' value='Make Page'>";
    echo "</form>";
    //End of the code for Regional Tasks Report


    echo "</td>";

    echo "</tr>";

    echo "</table>";




?>

Thanks and regards

Archie

Recommended Answers

All 4 Replies

ur mistake:

1. line 55
echo "<b>Weekly task reports format</b>";
3/17/2008echo "<BR>";
true: echo "<b>Weekly task reports format</b>
3/17/2008 <BR>";

2. headerinfo1();
what for u you use headerinfo1 function?
can show me the code?

3. for ($i27 = 0; $i27 < =$numrows27; $i27++ )
must be for ($i27 = 0; $i27 <=$numrows27; $i27++ )

: true= '<=' not '< ='

Thanks.. the space between the '<=' was causing the problem...
Thanks for the insight

Regards

Archie

Btw, turn on error reporting in php.ini file or put

ini_set("display_errors","on"); 
error_reporting(E_ALL);

in your script. This will display any errors in your script.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.