Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP page not loading with SQL statement included
    primarykey
    data
    text
    <p>For some reason my page won't load when I have the following php code in it... but when I validate the SQL stmt in my editor, it returns results (1 row) fine. I've tried debugging with the F12 Chrome thing, but the console doesnt show any errors outside of some CSS stuff. I don't really know how to use it to a further extent.</p> <p>Any initial thoughts? </p> <p>page: <a href="http://www.runic-paradise.com/editinfo.php" rel="nofollow">http://www.runic-paradise.com/editinfo.php</a></p> <p>Code that kills the page when it's present:</p> <pre><code>// GET NEWS FROM DB $result = $mysqli-&gt;query("SELECT Content, Reference FROM site WHERE Reference='Rules'"); </code></pre> <p>Surrounding Code:</p> <pre><code> &lt;form id="newsform" name="newsform" action="editinfo.php?step=2" method="post" enctype="multipart/form-data"&gt; &lt;h4&gt;Server Rules&lt;/h4&gt; &lt;textarea class="editor" rows="4" style="width:50%;" name="Content" id="postbody"&gt; &lt;?php //UPDATE DB IF NECESSARY if($_GET['step'] == 2) { $mysqli-&gt;query("UPDATE site SET Content='$_POST[Content]' WHERE Reference='Rules'"); } // GET NEWS FROM DB $result = $mysqli-&gt;query("SELECT Content, Reference FROM site WHERE Reference='Rules'"); var_dump($mysqli-&gt;error); echo $result['Content']; $mysqli-&gt;close(); ?&gt; &lt;/textarea&gt; &lt;!-- hidden inputs --&gt; &lt;input type="hidden" id="x" name="x" /&gt; &lt;input type="hidden" id="y" name="y" /&gt; &lt;input type="hidden" id="w" name="w" /&gt; &lt;input type="hidden" id="h" name="h" /&gt; &lt;input type="hidden" name="step" value="2"&gt; &lt;br&gt;&lt;br&gt; &lt;input type="submit"&gt; &lt;/form&gt; </code></pre>
    singulars
    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