cjosephson Posted July 24, 2007 Share Posted July 24, 2007 First off, does the use of $GLOBALS['var1'] mean that register_globals needs to be set to on? I'm not sure if $GLOBALS is part of register_globals, or if it is an alternative to it. The problem that sparks this question is this code: <?php // Build SQL Query $query = "select * from allsw where name like \"%$GLOBALS[trimmed]%\" order by name"; // EDIT HERE and specify your table and field names for the SQL query $numresults=mysql_query($query); $numrows=mysql_num_rows($numresults); echo "$numrows"; ?> <?php echo($GLOBALS['numrows']); ?> The first echo works perfectly, and spits out the correct number of results from the query. The second one, however, does not print anything out for some reason. The $GLOBALS[trimmed] works perfectly and returns valid results, but it is not working for $GLOBALS[numrows]. Thank you for any help. Quote Link to comment Share on other sites More sharing options...
Germaris Posted July 24, 2007 Share Posted July 24, 2007 Sorry ! Wrong posting ! I deeply apologize. Quote Link to comment 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.