Hay guys
Quick question
function am_query_display_quick($page,$order ='DATE DESC'){
global $email;
$conn = db_connect_2();
$max_per_page = 50;
$color1 = "tableRowOdd";
$color2 = "tableRowEven";
$RowCount = 0;
$start_row = $page*$max_per_page;
$result = $conn->query("SELECT pro,pro_update,ana,ana_update,cell,cell_update,cellother,cellother_update,gen,gen_update,genother,genother_update,author,author_update,other,other_update
FROM mailing_list
WHERE email = '$email'
ORDER BY $order LIMIT $start_row, $max_per_page;");
echo "<table class=\"sortable\" id=\"query_quick2\" width=\"100%\" >\r\n";
echo "\t<tr><th>Edit Queries</th><th>Promoter
Locus</th><th>Update?</th><th>Anatomical Area</th><th>Update?</th><th>Cell
Type</th><th>Update?</th><th>Other Cell Type</th><th>Update?</th><th>Genetic
Background</th><th>Update?</th><th>Other Gen.
Back.</th><th>Update?</th><th>Author</th><th>Update?</th><th>Other</th><th>Update?</th>\r\n";
if($result->num_rows){
while ($row = $result->fetch_array()){
$RowCount ++;
$row_color = ($RowCount % 2) ? $color1 : $color2;
echo "<form method = \"post\" action=\"<? echo $_SERVER['PHP_SELF'] ?>\">";
echo "\t<tr class=\"$row_color\"><td><input type=\"submit\" name=\"edit_mail\" value = \"Edit Queries\"></td>
<td>{$row['pro']}</td><td>{$row['pro_update']}</td><td>{$row['ana']}</td>
<td>{$row['ana_update']}</td><td>{$row['cell']}</td><td>{$row['cell_update']}</td><td>{$row['cellother']}</td>
<td>{$row['cellother_update']}</td><td>{$row['gen']}</td><td>{$row['gen_update']}</td><td>{$row['genother']}</td>
<td>{$row['genother_update']}</td><td>{$row['author']}</td><td>{$row['author_update']}</td><td>{$row['other']}</td><td>{$row['other_update']}</td>
</tr>";
echo "</form>";
}
}
echo "</table>";
permalink
Hi ScallioXTX
Quote:
Although, which such humangous blocks of HTML I'd personally use heredoc:
could you elaborate on heredoc?
By the way, one more question related to parse error arises
PHP Code:
if($result->num_rows){
while ($row = $result->fetch_array()){
$RowCount ++;
$row_color = ($RowCount % 2) ? $color1 : $color2;
echo "<form method = \"post\" action=\"<? echo $_SERVER['PHP_SELF'] ?>\">";
echo "\t<tr class=\"$row_color\"><td><input type=\"submit\" name=\"edit_mail\" value = \"Edit Queries\"></td>
<td>{$row['pro']}</td><td>{$row['pro_update']}</td><td>{$row['ana']}</td>
<td>{$row['ana_update']}</td><td>{$row['cell']}</td><td>{$row['cell_update']}</td><td>{$row['cellother']}</td>
<td>{$row['cellother_update']}</td><td>{$row['gen']}</td><td>{$row['gen_update']}</td><td>{$row['genother']}</td>
<td>{$row['genother_update']}</td><td>{$row['author']}</td><td>{$row['author_update']}</td><td>{$row['other']}</td><td>{$row['other_update']}</td>
</tr>";
echo "</form>";
}
}
echo "</table>";
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING
it's pointing to this line:
echo "<form method = \"post\" action=\"<? echo $_SERVER['PHP_SELF'] ?>\">";
I tried to escape the double quotes, but i am suspecting the problem mainly comes from the echo statement... How should i format this?
Also, am i placing <form></form> at the right place?
Thanks guys