Note that there are some explanatory texts on larger screens.

plurals
  1. POI can't seem to retrieve values from POST variables ($_POST['variable']) isn't working
    primarykey
    data
    text
    <p>I can't seem to retrieve the values of the post variables from the HTML form .. for some reason .. This is usually straightforward , but when I go to the score PHP file .. none of the form values are retrieved :(</p> <pre><code>&lt;?php $id = $_GET['id']; ?&gt; &lt;form action="score.php" method ="post"&gt; &lt;table border="0"&gt; &lt;tr&gt; &lt;td&gt; &lt;input type="radio" name="score" id="&lt;?php echo $id ?&gt;" value="2" /&gt; &lt;img style ="position:relative; left:-90;top:-20" src="./images/+2.png" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;input type="radio" name="score" id="&lt;?php echo $id ?&gt;" value="3"/&gt; &lt;img style ="position:relative; left:-90;top:-20" src="./images/+3.png" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;input type="radio" name="score" id="&lt;?php echo $id ?&gt;" value="-1" /&gt; &lt;img style ="position:relative; left:-90;top:-20" src="./images/-1.png" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;input type="radio" name="score" id="&lt;?php echo $id ?&gt;" value="-2"/&gt; &lt;img style ="position:relative; left:-90;top:-20" src="./images/-2.png" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;input type="submit" id="mysubmit" value="Submit score" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt; </code></pre> <p>Below is the score.php file ..</p> <pre><code>&lt;?php require('../madscore/database/connect.php'); ?&gt; &lt;?php database_connect(); $id = $_POST['id']; $value = $_POST['value']; $query = "UPDATE people SET Score= Score +".$value."WHERE ID ='".$id."'"; var_dump($query);exit; $result = $connection-&gt;query($query); $row_count = $result-&gt;num_rows; var_dump($row_count); ?&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.
 

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