magicandmight
IS-IT--Management
I have successfully integrated a query string into my code. I almost have my page done except for make a code to pull in another page that is dependant on the string. Here is my code:
<? $server_side_mycoolvariable = ''; if (isset($_GET['category'])) $server_side_mycoolvariable = $_GET['category'];
include("mbconnect1.php");
$query = "SELECT * FROM category WHERE category LIKE '%$server_side_mycoolvariable%'";
include("catadsearch.php"); ?>
-- code on catadsearch --
<?php
$result = MYSQL_QUERY($query);
if (!$result) print ("There are no members in this category.<br>");
/* Determine the number of records returned */
$result = mysql_query($query) or exit('Please make another selection.');
$number = mysql_num_rows($result);
$i=0;
while($rows=mysql_fetch_array($result,MYSQL_ASSOC))
{
if (!empty($rows['link']))
echo '<?php require($DOCUMENT_ROOT . "/catext/',$rows['link'],'");?>';
//same for all the field...
$i++;
}
/* Close the database connection */
MYSQL_CLOSE();
?>
This does not show up on the page echo does not show up on the display page, but it does show up in pink on the page source that I get from mozilla, with the link being correct. Any idea on why its not going?
<? $server_side_mycoolvariable = ''; if (isset($_GET['category'])) $server_side_mycoolvariable = $_GET['category'];
include("mbconnect1.php");
$query = "SELECT * FROM category WHERE category LIKE '%$server_side_mycoolvariable%'";
include("catadsearch.php"); ?>
-- code on catadsearch --
<?php
$result = MYSQL_QUERY($query);
if (!$result) print ("There are no members in this category.<br>");
/* Determine the number of records returned */
$result = mysql_query($query) or exit('Please make another selection.');
$number = mysql_num_rows($result);
$i=0;
while($rows=mysql_fetch_array($result,MYSQL_ASSOC))
{
if (!empty($rows['link']))
echo '<?php require($DOCUMENT_ROOT . "/catext/',$rows['link'],'");?>';
//same for all the field...
$i++;
}
/* Close the database connection */
MYSQL_CLOSE();
?>
This does not show up on the page echo does not show up on the display page, but it does show up in pink on the page source that I get from mozilla, with the link being correct. Any idea on why its not going?