Ajax is not updating data <p>I've got a forum in which user is allowed to edit and delete only his comments, I've defined an "edit" button, that by a click of mouse brings down a modal, and in that modal user is allowed to get access to the data's he/she has been sent before, I've written an ajax to target these field and update them whenever the users clicks on "edit" button, code totally makes sense, but so far the functionality doesn't, to make it more clear, user clicks, modal comes down, whatever he/she has been posted will appear in fields, and there is an "edit" button at the bottom of modal, which is responsible for changing and updating data. here is the modal code : </p> <pre><code> &lt;button id="btn-btnedit" class="btn btn-primary " data-toggle="modal" data-target="#myModal&lt;?php echo $list['id']; ?&gt;"&gt; Edit &lt;i class="fa fa-pencil-square-o"&gt;&lt;/i&gt; &lt;/button&gt; &lt;!-- Modal --&gt; &lt;div class="modal fade" id="myModal&lt;?php echo $list['id']; ?&gt;" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;span class="sr-only"&gt;Close&lt;/span&gt;&lt;/button&gt; &lt;h4 class="modal-title" id="myModalLabel"&gt;Modal title&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;div class="container"&gt; &lt;form style="width: 550px;" action="" method="post" id="signin-form&lt;?php echo $list['id']; ?&gt;" role="form"&gt; &lt;input type="hidden" name="commentID" value="&lt;?php echo $list['id']; ?&gt;"&gt; &lt;div class="from-group"&gt; &lt;label for="title"&gt;Title: &lt;/label&gt; &lt;input class="form-control" type="text" name="title" id="txttitle" value="&lt;?php echo $list['title']; ?&gt;" placeholder="Page Title"&gt; &lt;/div&gt; &lt;div class="from-group"&gt; &lt;label for="label"&gt;Label: &lt;/label&gt; &lt;input class="form-control" type="text" name="label" id="txtlabel" value="&lt;?php echo $list['label']; ?&gt;" placeholder="Page Label"&gt; &lt;/div&gt; &lt;br&gt; &lt;div class="from-group"&gt; &lt;label for="body"&gt;Body: &lt;/label&gt; &lt;textarea class="form-control editor" name="body" id="txtbody" row="8" placeholder="Page Body"&gt;&lt;?php echo $list['body']; ?&gt;&lt;/textarea&gt; &lt;/div&gt; &lt;br&gt; &lt;input type="hidden" name="editted" value="1"&gt; &lt;br&gt; &lt;br&gt; &lt;input type="submit" id="btnupdate" value="Edit"&gt; &lt;/form&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>as you can see I've assigned "editted" to my "name" attribute, which is later on used to call the query in the database, sql code is as below : </p> <pre><code> case 'postupdate'; if(isset($_GET['editted'])){ $title = $_GET['title']; $label = $_GET['label']; $body = $_GET['body']; $action = 'Updated'; $q = "UPDATE posts SET title ='".$title."', label = '".$label."', body = '".$body."' WHERE id = ".$_GET['commentID']; $r = mysqli_query($dbc, $q); $message = '&lt;p class="alert alert-success"&gt; Your Post Is Succesfully '.$action.'&lt;/p&gt;' ; } </code></pre> <p>and here is the ajax code snippet; </p> <pre><code> $('#btnupdate').click(function() { var tempTitle = $('#txttitle').val(); var tempLabel = $('#txtlabel').val(); var tempBody = $('#txtbody').val(); var tempUrl = "index.php?page=postupdate"+"&amp;title="+tempTitle+"&amp;label="+tempLabel+"&amp;body="+tempBody+"&amp;commentID=30&amp;editted=1"; $.get(tempUrl); }); </code></pre> <p>I assume there is nothing advance about this segment of code, and i'm missing something very simple, any consideration is highly appreciated :)</p>