Note that there are some explanatory texts on larger screens.

plurals
  1. POUnable to submit form
    primarykey
    data
    text
    <p>I'm creating a website using php and html with a few few functions. At the moment I am using a .change and .load event to do various fetching and displaying. I've used</p> <p><code>$("#jobtable").load("editjob.php?jobchose=" + $("#jobnoselect").val());</code></p> <p>to submit and display the php result, which is a form. However when I hit submit in the form it does nothing (That I can see!).</p> <p>The result of the form submission should display "Done!" </p> <p>Code executed on Job Select is</p> <pre><code>$dbhandle = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL"); $selected = mysql_select_db("a9629416_btstats", $dbhandle) or die("Could not select examples"); $jobchose = mysql_real_escape_string($_GET['jobchose']); $query = "SELECT * FROM MasterJobTable WHERE JobNo='$jobchose'"; $result = mysql_query($query); $result2 = mysql_query($query); $current = mysql_fetch_array($result2); echo "&lt;table&gt;"; echo "&lt;tr&gt;"; echo "&lt;td colspan=\"13\"&gt;Current: &lt;h7&gt;" . $current['JobNo'] . "&lt;/h7&gt;&lt;/td&gt;"; echo "&lt;/tr&gt;"; echo "&lt;tr&gt;"; echo "&lt;td&gt;NI7S&lt;/td&gt; &lt;td&gt;NI7W&lt;/td&gt; &lt;td&gt;NI7F&lt;/td&gt; &lt;td&gt;NI1V&lt;/td&gt; &lt;td&gt;NI7T&lt;/td&gt; &lt;td&gt;NI7J&lt;/td&gt; &lt;td&gt;NI7K&lt;/td&gt; &lt;td&gt;NI7L&lt;/td&gt; &lt;td&gt;NI7Y&lt;/td&gt; &lt;td&gt;NI1P&lt;/td&gt; &lt;td&gt;NI8T&lt;/td&gt; &lt;td&gt;NI9K&lt;/td&gt; &lt;td&gt;NI6M&lt;/td&gt;"; echo "&lt;/tr&gt;"; while ($row = mysql_fetch_array($result)) { echo "&lt;tr&gt;"; echo "&lt;td&gt;" . $row['NI7S'] . "&lt;/td&gt; &lt;td&gt;" . $row['NI7W'] . "&lt;/td&gt; &lt;td&gt;" . $row['NI7F'] . "&lt;/td&gt; &lt;td&gt;" . $row['NI1V'] . "&lt;/td&gt; &lt;td&gt;" . $row['NI7T'] . "&lt;/td&gt; &lt;td&gt;" . $row['NI7J'] . "&lt;/td&gt; &lt;td&gt;" . $row['NI7K'] . "&lt;/td&gt; &lt;td&gt;" . $row['NI7L'] . "&lt;/td&gt; &lt;td&gt;" . $row['NI7Y'] . "&lt;/td&gt; &lt;td&gt;" . $row['NI1P'] . "&lt;/td&gt; &lt;td&gt;" . $row['NI8T'] . "&lt;/td&gt; &lt;td&gt;" . $row['NI9K'] . "&lt;/td&gt; &lt;td&gt;" . $row['NI6M'] . "&lt;/td&gt;"; echo "&lt;/tr&gt;"; echo "&lt;br /&gt;"; } echo "&lt;table&gt;"; echo "&lt;tr&gt;"; echo "&lt;td colspan=\"5\"&gt;New Standard Units on Job number: &lt;h7&gt;" . $current['JobNo'] . "&lt;/h7&gt;&lt;/td&gt;"; echo "&lt;/tr&gt;"; echo "&lt;tr&gt;"; echo "&lt;td&gt;NI7S&lt;/td&gt; &lt;td&gt;NI7W&lt;/td&gt; &lt;td&gt;NI7F&lt;/td&gt; &lt;td&gt;NI1V&lt;/td&gt; &lt;td&gt;NI7T&lt;/td&gt;"; echo "&lt;/tr&gt;"; echo "&lt;form action=\"doeditjob.php\" method=\"post\"&gt;"; echo "&lt;input type=\"hidden\" name=\"jobtoedit\" value=\"" . $current['JobNo'] . "\"&gt;"; echo "&lt;tr&gt;"; echo "&lt;td&gt;&lt;input type=\"text\" name=\"NI7S\" maxlength=\"4\" size=\"4\" value=\"" . $current['NI7S'] . "\"&gt;&lt;/td&gt; &lt;td&gt;&lt;input type=\"text\" name=\"NI7W\" maxlength=\"4\" size=\"4\" value=\"" . $current['NI7W'] . "\"&gt;&lt;/td&gt; &lt;td&gt;&lt;input type=\"text\" name=\"NI7F\" maxlength=\"4\" size=\"4\" value=\"" . $current['NI7F'] . "\"&gt;&lt;/td&gt; &lt;td&gt;&lt;input type=\"text\" name=\"NI1V\" maxlength=\"4\" size=\"4\" value=\"" . $current['NI1V'] . "\"&gt;&lt;/td&gt; &lt;td&gt;&lt;input type=\"text\" name=\"NI7T\" maxlength=\"4\" size=\"4\" value=\"" . $current['NI7T'] . "\"&gt;&lt;/td&gt;"; echo "&lt;/tr&gt;"; echo "&lt;/table&gt;"; echo "&lt;table&gt;"; echo "&lt;tr&gt;"; echo "&lt;td colspan=\"8\"&gt;New DFE Units on Job number: &lt;h7&gt;" . $current['JobNo'] . "&lt;/h7&gt;&lt;/td&gt;"; echo "&lt;/tr&gt;"; echo "&lt;tr&gt;"; echo "&lt;td&gt;NI7J&lt;/td&gt; &lt;td&gt;NI7K&lt;/td&gt; &lt;td&gt;NI7L&lt;/td&gt; &lt;td&gt;NI7Y&lt;/td&gt; &lt;td&gt;NI1P&lt;/td&gt; &lt;td&gt;NI8T&lt;/td&gt; &lt;td&gt;NI9K&lt;/td&gt; &lt;td&gt;NI6M&lt;/td&gt;"; echo "&lt;/tr&gt;"; echo "&lt;tr&gt;"; echo "&lt;td&gt;&lt;input type=\"text\" name=\"NI7J\" maxlength=\"4\" size=\"4\" value=\"" . $current['NI7J'] . "\"&gt;&lt;/td&gt; &lt;td&gt;&lt;input type=\"text\" name=\"NI7K\" maxlength=\"4\" size=\"4\" value=\"" . $current['NI7K'] . "\"&gt;&lt;/td&gt; &lt;td&gt;&lt;input type=\"text\" name=\"NI7L\" maxlength=\"4\" size=\"4\" value=\"" . $current['NI7L'] . "\"&gt;&lt;/td&gt; &lt;td&gt;&lt;input type=\"text\" name=\"NI7Y\" maxlength=\"4\" size=\"4\" value=\"" . $current['NI7Y'] . "\"&gt;&lt;/td&gt; &lt;td&gt;&lt;input type=\"text\" name=\"NI1P\" maxlength=\"4\" size=\"4\" value=\"" . $current['NI1P'] . "\"&gt;&lt;/td&gt; &lt;td&gt;&lt;input type=\"text\" name=\"NI8T\" maxlength=\"4\" size=\"4\" value=\"" . $current['NI8T'] . "\"&gt;&lt;/td&gt; &lt;td&gt;&lt;input type=\"text\" name=\"NI9K\" maxlength=\"4\" size=\"4\" value=\"" . $current['NI9K'] . "\"&gt;&lt;/td&gt; &lt;td&gt;&lt;input type=\"text\" name=\"NI6M\" maxlength=\"4\" size=\"4\" value=\"" . $current['NI6M'] . "\"&gt;&lt;/td&gt;"; echo "&lt;/tr&gt;"; echo "&lt;/table&gt;"; echo "&lt;input type=\"submit\" value=\"Update Job\"&gt;"; echo "&lt;/form&gt;"; </code></pre> <p>And the code to the doeditjob.php is just <code>echo "Done!";</code></p>
    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.
 

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