Note that there are some explanatory texts on larger screens.

plurals
  1. POHidden field in table
    primarykey
    data
    text
    <p>I have a strange issue, where I have a table being populated by info from a database.</p> <p>When I select from the database, the information comes back exactly as I would expect.</p> <p>For some reason in my HTML table I have an odd field I can't see the source off.</p> <p>My table header row:</p> <pre><code>echo "&lt;tr&gt;\n"; echo "&lt;th&gt;&lt;h3&gt;ID&lt;/h3&gt;&lt;/th&gt;\n"; echo "&lt;th&gt;&lt;h3&gt;First Name&lt;/h3&gt;&lt;/th&gt;\n"; echo "&lt;th&gt;&lt;h3&gt;Last Name&lt;/h3&gt;&lt;/th&gt;\n"; echo "&lt;th&gt;&lt;h3&gt;Odd additional field&lt;/h3&gt;&lt;/th&gt;\n"; echo "&lt;th&gt;&lt;h3&gt;Country&lt;/h3&gt;&lt;/th&gt;\n"; echo "&lt;th&gt;&lt;h3&gt;Room type&lt;/h3&gt;&lt;/th&gt;\n"; echo "&lt;th&gt;&lt;h3&gt;Number&lt;/h3&gt;&lt;/th&gt;\n"; echo "&lt;th&gt;&lt;h3&gt;Checkin Date&lt;/h3&gt;&lt;/th&gt;\n"; echo "&lt;th&gt;&lt;h3&gt;Nights&lt;/h3&gt;&lt;/th&gt;\n"; echo "&lt;/tr&gt;\n"; </code></pre> <p>The field I have called 'Odd additional field appears even if I take it out, it just isn't named.</p> <p>My code to populate the table:</p> <pre><code>while($row = $sth-&gt;fetch()){ echo "&lt;tr url=\"edit.php?id=" . $row['id'] . "\"&gt;\n"; echo "&lt;td&gt;" . $row['id'] . "&lt;/td&gt;\n"; echo "&lt;td&gt;" . $row['firstName'] . "&lt;/td&gt;\n"; echo "&lt;td&gt;" . $row['lastName'] . "&lt;/h3&gt;&lt;td&gt;\n"; echo "&lt;td&gt;" . $row['country'] . "&lt;/td&gt;\n"; echo "&lt;td&gt;" . $row['roomtype'] . "&lt;/td&gt;\n"; echo "&lt;td&gt;" . $row['roomnumber'] . "&lt;/td&gt;\n"; echo "&lt;td&gt;" . $row['checkin'] . "&lt;/td&gt;\n"; echo "&lt;td&gt;" . $row['nights'] . "&lt;/td&gt;\n"; echo "&lt;/tr&gt;\n"; } </code></pre> <p>The resultant HTML that goes to the browser:</p> <pre><code>&lt;table width = "80%" align="center" id="example"&gt; &lt;tr&gt; &lt;th&gt;&lt;h3&gt;ID&lt;/h3&gt;&lt;/th&gt; &lt;th&gt;&lt;h3&gt;First Name&lt;/h3&gt;&lt;/th&gt; &lt;th&gt;&lt;h3&gt;Last Name&lt;/h3&gt;&lt;/th&gt; &lt;th&gt;&lt;h3&gt;Country&lt;/h3&gt;&lt;/th&gt; &lt;th&gt;&lt;h3&gt;Room type&lt;/h3&gt;&lt;/th&gt; &lt;th&gt;&lt;h3&gt;Number&lt;/h3&gt;&lt;/th&gt; &lt;th&gt;&lt;h3&gt;Checkin Date&lt;/h3&gt;&lt;/th&gt; &lt;th&gt;&lt;h3&gt;Nights&lt;/h3&gt;&lt;/th&gt; &lt;/tr&gt; &lt;tr url="edit.php?id=1"&gt; &lt;td&gt;1&lt;/td&gt; &lt;td&gt;Joe&lt;/td&gt; &lt;td&gt;Schmoe&lt;/h3&gt;&lt;td&gt; &lt;td&gt;canada&lt;/td&gt; &lt;td&gt;mdorm&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;2012-11-16&lt;/td&gt; &lt;td&gt;5&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p>Which all seems fine, and yet when viewing in a browser, this is what I see.</p> <p><img src="https://i.stack.imgur.com/vT1A6.png" alt="enter image description here"></p> <p>How can I trace this mysterious field?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload