for($i = 0; $i < $num_rows; $i++)
{
$row = mysql_fetch_row($result);
if($i % 2)
{
echo "<table border=\"1\" width=\"700px\">";
}
else
{
echo "<table border=\"1\" width=\"700px\">";
}
echo "<tr>";
echo "<td>";
for($k = 0; $k < 1; $k++)
{
$title = stripslashes($row[$k]);
echo " * <b><a href=\"update_module.php?title=$title&id=$i\">$title</a></b></u> * ";
echo "<br>";
echo "<b>Project Number: </b> ".$row[1];
echo "<br>";
echo "<b>Primary POC: </b>  ";
echo "<b>".$row[2]."<br>";
echo "<b>Alternate POC: </b> ";
echo "<b>".$row[3]."<br>";
echo "<br>";
echo "Project Description: ";
echo $desc[$i][0];
}
echo "</td>";
echo "</tr>";
echo "</table>";
}
This works great while the value of $i is 1 - 3. When it hits 4, it still displays everything ok, but when you click the link and try to pass the $id var, it says on the next page (where you make a reference to $id) that $id is an undefined variable, like it has no value. What's really weird is if you'll notice the $desc[][] echo. It comes AFTER the $id var is defined for passing through the link. And guess what...the desc[][] echo's index 4 great. Someone please tell me what I'm missing.
Now you talk about weird!! I'm totally stumpted
Moderator: General Moderators
Ok. Sounds like you should
1. read some php tut
2. understand it
3. write code
But anyway put your code between code tags so we can read it better, also when you refer to the variable in the next page it is named $_GET['variable_name']... (PHP parses all variables in that array that are passed via url.) Explain more what is not working and someone might help...
1. read some php tut
2. understand it
3. write code
But anyway put your code between code tags so we can read it better, also when you refer to the variable in the next page it is named $_GET['variable_name']... (PHP parses all variables in that array that are passed via url.) Explain more what is not working and someone might help...