rleahong Posted June 25, 2013 Share Posted June 25, 2013 the code in the inner loop are causing the mouse to scroll. <?php PRINT_ROYALTY_ORDERS(); function PRINT_ROYALTY_ORDERS(){ $hostname ="localhost"; $password =""; $username ="root"; $CON =mysql_connect ($hostname, $username, $password) ; mysql_select_db("reggaedbf", $CON); $SQLALBUM = " SELECT * FROM ALBUM "; $FALBUM = mysql_query( $SQLALBUM, $CON ); while ( $ALBUM = mysql_fetch_object( $FALBUM )){ $ALBUMCOD = $ALBUM->ALBUMCOD; $ALBUMNAM = $ALBUM->ALBUMNAM; ?> <TABLE WIDTH="700"> <TR> <TH BGCOLOR="#0000FF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php echo( " ORDER NO. " ) ?></FONT></B></TH> <TH BGCOLOR="#00FFFF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#0000FF" SIZE="5"><?php echo( " ORDER DATE " ) ?></FONT></B></TH> <TH BGCOLOR="#0000FF" WIDTH="20%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php echo( " ACCOUNT NAME " ) ?></FONT></B></TH> <TH BGCOLOR="#00FFFF" WIDTH="20%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#0000FF" SIZE="5"><?php echo( " STREET " ) ?></FONT></B></TH> <TH BGCOLOR="#0000FF" WIDTH="20%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php echo( " COUNTRY " ) ?></FONT></B></TH> <TH BGCOLOR="#00FFFF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#0000FF" SIZE="5"><?php echo( " STATE " ) ?></FONT></B></TH> <TH BGCOLOR="#0000FF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php echo( " CITY " ) ?></FONT></B></TH> </TR> <?php $SQLORDERS = " SELECT * FROM ORDERS "; $SQLORDERS.= " WHERE ITEMNO=" . $ALBUMCOD; $FORDERS = mysql_query( $SQLORDERS, $CON ); $MATCHES = mysql_num_rows( $FORDERS ); if ( $MATCHES == 0 ){ } else { while ( $ORDER = mysql_fetch_object( $FORDERS )){ $ACCOUNT_NAME=$ORDER->ACCOUNT_NAME; $ORDDAT = $ORDER->ORDDAT; $COUNTRYCOD = $ORDER->COUNTRYCOD; $STATECOD = $ORDER->STATECOD; $CITYCOD = $ORDER->CITYCOD; $STREET = $ORDER->STREET; $AMOUNT = $ORDER->AMOUNT; $ORDERNO = $ORDER->ORDERNO; $SQLCOUNTRY = " SELECT * FROM COUNTRY "; $SQLCOUNTRY.= " WHERE COUNTRYCOD=" . $COUNTRYCOD; $FCOUNTRY = mysql_query( $SQLCOUNTRY, $CON ); $MATCHES = mysql_num_rows( $FCOUNTRY ); if ( $MATCHES == 0 ){ } else { $ROW = mysql_fetch_array($FCOUNTRY ); $COUNTRYNAM = $ROW["COUNTRYNAM"]; } $SQLSTATES = " SELECT * FROM STATEFIL "; $SQLSTATES.= " WHERE COUNTRYCOD=" . $COUNTRYCOD ; $SQLSTATES.= " AND STATECOD=" . $STATECOD; $FSTATES = mysql_query( $SQLSTATES, $CON ); $ROW = mysql_fetch_array($FSTATES ); $STATENAM = $ROW["STATENAM"]; $SQLCITIES = " SELECT * FROM CITYFIL "; $SQLCITIES.= " WHERE COUNTRYCOD=" . $COUNTRYCOD ; $SQLCITIES.= " AND STATECOD=" . $STATECOD; $SQLCITIES.= " AND CITYCOD=" . $CITYCOD; $FCITY = mysql_query( $SQLCITIES, $CON ); $ROW = mysql_fetch_array($FCITY ); $CITYNAM = $ROW["CITYNAM"]; ?> <TR> <TD BGCOLOR="#0000FF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php echo( $ORDERNO ) ?></FONT></B></TD> <TD BGCOLOR="#00FFFF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#0000FF" SIZE="5"><?php echo( $ORDERDATE ) ?></FONT></B></TD> <TD BGCOLOR="#0000FF" WIDTH="20%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php echo( $ACCOUNT_NAME ) ?></FONT></B></TD> <TD BGCOLOR="#00FFFF" WIDTH="20%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#0000FF" SIZE="5"><?php echo( $STREET ) ?></FONT></B></TD> <TD BGCOLOR="#0000FF" WIDTH="20%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php echo( $COUNTRYNAM ) ?></FONT></B></TD> <TD BGCOLOR="#00FFFF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#0000FF" SIZE="5"><?php echo( $STATENAM ) ?></FONT></B></TD> <TD BGCOLOR="#0000FF" WIDTH="10%" ALIGN="CENTER"><B><FONT FACE="COURIER" COLOR="#00FFFF" SIZE="5"><?php echo( $CITYNAM ) ?></FONT></B></TD> </TR> <?php } ?> </TABLE> <?php } } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/279567-php-code-causing-mouse-scrolling/ Share on other sites More sharing options...
ginerjm Posted June 25, 2013 Share Posted June 25, 2013 What inner loop? If you are positive that is the area with a problem, why give us so much to search thru? PS - your html could seriously use some CSS to clean it up! Do you really think you have to write all those style attributes into every <td> tag?? Quote Link to comment https://forums.phpfreaks.com/topic/279567-php-code-causing-mouse-scrolling/#findComment-1437851 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.