Hi. I'd like to pass a variable with/through a hyperlink to another page that will execute a mysql query using the passed variable. The variable is a result from a query executed. Page 1 works well (enough for me at least). I get the following error when I click a hyperlink to go to Page 2:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in ...projectsearch_grid.php on line 200.
Page 1 executes a query and displays the results in a simple table. I want to make the results in the "Project" column hyperlinks that point toward Page 2. Page 2 would then execute a second query and display the results using the selected project. Page 1 displays results from a search to find a project(s) for whatever criteria. Page 2 will display more details about the specific project that the user clicked on.
Page 1 query: SELECT Name, Address, City FROM Projects WHERE City LIKE '%city%'
Page 1 results: Project 1
User clicks on "Project 3"
Page 2 query: SELECT * FROM `Projects` WHERE `Project_ID`='Project 3'
My best but still probably horrible attempt is below. Thanks in advance.
197 while($row = mysql_fetch_array($result))
199 echo '<tr><td valign="top" align="left">';
200 echo '<a href="project_detail.php" target="_blank">'.$row['Project_Name'].'</a> <form
action="project_detail.php" method="post"> <input type="hidden" name="projnumber" value="<?php
201 echo '</td><td valign="top" align="left">';
202 echo $row['Type_And_Team'];
203 echo '</td><td valign="top" align="left">';
204 echo $row['Address'];