title: I am trying to upload my data to php my admin using a modal but unable to do. I don`t know which error I am getting . Help me this
body: <p>I am trying to submit data but data is not updated in php my admin. Can anyone help e with this where I am getting Error.</p>
  
  <p>I have tried many ways but unable to locate my error.</p>
  
  <p>Below is my function I want to submit a form :</p>
  
  <pre><code>    function add_ip() {
  
  
  if(isset($_POST['add_ip'])) {
  
  
  $name           = escape_string($_POST['name']);
  $gender         = escape_string($_POST['gender']);
  $age            = escape_string($_POST['age']);
  $diagnosis      = escape_string($_POST['diagnosis']);
  $date           = escape_string($_POST['date']);
  $room           = escape_string($_POST['room']);
  $doctor         = escape_string($_POST['doctor']);
  $nurse          = escape_string($_POST['nurse']);  
  
  $query = query("INSERT INTO ipd(name,gender,age,diagnosis,date,room,doctor,nurse) VALUES('{$name}','{$gender}','{$age}'),'{$diagnosis}','{$date}','{$room}','{$doctor}','{$nurse}'");
  confirm($query);
  
  set_message("Patient Added");
  
  redirect("ipd.php");
  
  
  
  }
  
  
  
  }
  </code></pre>
  
  <p>FORM:</p>
  
  <p></p>
  
  <pre><code>                        &lt;?php add_ip(); ?&gt;
  
                          &lt;div class="form-group form-float"&gt;
  
                              &lt;div class="form-line"&gt;
  
                                  &lt;input type="text" class="form-control" name="name" placeholder="Patient Name" required autofocus&gt;
  
  
  
                              &lt;/div&gt;
  
                          &lt;/div&gt;
  
  
  
                          &lt;div class="form-group"&gt;
  
                              &lt;input type="radio" name="gender" id="male" class="with-gap"&gt;
  
                              &lt;label for="male"&gt;Male&lt;/label&gt;
  
  
  
                              &lt;input type="radio" name="gender" id="female" class="with-gap"&gt;
  
                              &lt;label for="female" class="m-l-20"&gt;Female&lt;/label&gt;
  
                          &lt;/div&gt;
  
                          &lt;div class="form-group form-float"&gt;
  
                              &lt;div class="form-line"&gt;
  
                                  &lt;input type="text" class="form-control" name="age" required&gt;
  
                                  &lt;label class="form-label"&gt;Age&lt;/label&gt;
  
                              &lt;/div&gt;
  
                          &lt;/div&gt;
  
                          &lt;div class="form-group form-float"&gt;
  
                              &lt;div class="form-line"&gt;
  
                                  &lt;input type="text" class="form-control" name="diagnosis" required&gt;
  
                                  &lt;label class="form-label"&gt;Probable Diagnosis&lt;/label&gt;
  
                              &lt;/div&gt;
  
                          &lt;/div&gt;
  
                          &lt;div class="form-group form-float"&gt;
  
                              &lt;div class="form-line"&gt;
  
                                  &lt;input type="text" class="form-control" name="date" required&gt;
  
                                  &lt;label class="form-label"&gt;Date of Admission&lt;/label&gt;
  
                              &lt;/div&gt;
  
                              &lt;div class="help-info"&gt;YYYY-MM-DD format&lt;/div&gt;
  
                          &lt;/div&gt;
  
  
  
                          &lt;div class="form-group form-float"&gt;
  
                              &lt;div class="form-line"&gt;
  
                                  &lt;input type="text" class="form-control" name="room" required&gt;
  
                                  &lt;label class="form-label"&gt;Room Number&lt;/label&gt;
  
                              &lt;/div&gt;
  
                          &lt;/div&gt;
  
  
  
  
  
                          &lt;div class="form-group form-float"&gt;
  
                              &lt;div class="form-line"&gt;
  
                                  &lt;input type="text" class="form-control" name="doctor" required&gt;
  
                                  &lt;label class="form-label"&gt;Reporting Doctor&lt;/label&gt;
  
                              &lt;/div&gt;
  
                          &lt;/div&gt;
  
                          &lt;div class="form-group form-float"&gt;
  
                              &lt;div class="form-line"&gt;
  
                                  &lt;input type="text" class="form-control" name="nurse" required&gt;
  
                                  &lt;label class="form-label"&gt;Assigned Nurses&lt;/label&gt;
  
                              &lt;/div&gt;
  
                          &lt;/div&gt;
  
  
  
                          &lt;input type="submit" name="submit" class="btn btn-primary" &gt;
  
                      &lt;/form&gt;
  </code></pre>
  
  <p>I am trying to submit data but data is not updated in php my admin. Can anyone help e with this where I am getting Error.</p>
  
  <p>I have tried many ways but unable to locate my error.</p>