I'm running a query via php on a mysql database. With my result set I'm am iterating the following table:
$resultString = '<table>';
$resultString .= '<tr>';
$resultString .= '<th>Index</th>';
$resultString .= '<th>Title</th>';
$resultString .= '<th>File</th>';
$resultString .= '<th>Template File</th>';
$resultString .= '<th>Pretty URL</th>';
$resultString .= '<th>Parent</th>';
$resultString .= '<th></th>';
$resultString .= '</tr>';
while($data = mysql_fetch_assoc($results)){
$resultString .= '<form class="myForm">' ."\n";
$resultString .= '<tr>' ."\n";
$resultString .= '<input type="hidden" name="index" value="' . $data['index'] . '">' ."\n";
$resultString .= '<input type="hidden" name="title" value="' . $data['title'] . '">' ."\n";
$resultString .= '<input type="hidden" name="file_name" value="' . $data['file_name'] . '">' ."\n";
$resultString .= '<input type="hidden" name="template_file" value="' . $data['template_file'] . '">' ."\n";
$resultString .= '<input type="hidden" name="child_of" value="' . $data['child_of'] . '">' ."\n";
$resultString .= '<input type="hidden" name="pretty_url" value="' . $data['pretty_url'] . '">' ."\n";
$resultString .= '<td class="indexTd">' . $data['index'] . '</td>' ."\n";
$resultString .= '<td>' . $data['title'] . '</td>' ."\n";
$resultString .= '<td>' . $data['file_name'] . '</td>' ."\n";
$resultString .= '<td>' . $data['template_file'] . '</td>' ."\n";
$resultString .= '<td>' . $data['pretty_url'] . '</td>' ."\n";
$resultString .= '<td>' . $this->get_parent_select_list($data['child_of'],$data['index']) . '</td>' ."\n";
$resultString .= '<td class="buttonTd"><input type="button" class="deletePageButton" value="X" onclick="submit_form(this,\'deletePage\')"></td>' ."\n";
$resultString .= '</tr>' ."\n";
$resultString .= '</form>' ."\n";
}
$resultString .= '</table>';
The table comes out great, the only problem is my form isn't working at all... viewing it in FireBug I see this:
The form is closing itself becore all of my input tags can populate it. I HAVE tried putting the tags inside a "<td>" instead of a "<tr>" to no avail....
thoughts?