jeudi 28 mars 2019

How to get the values from the form to my php segment? My code does not get the submit button

I have a form which takes the data from users and send it to php but the issue is when submit button is clicked, the php segment does not recognizes it. What is the mistake I am doing? Any help would be appreciated.

I have written this code just check it..

    <ul id="progressbar">
      <li class="active">About</li>
      <li>Details</li>
      <li>Submission</li>
    </ul>

    <fieldset class="first">
      <!-- <h2 class="fs-title">SignIn</h2> -->
      <h3 class="fsf-subtitle">About Blood-Camp</h3><br>
      <input type="text" name="email" placeholder="Contact Email" required/>
      <input type="text" name="number" placeholder="Contact Number" required/>
      <input type="text" name="name" placeholder="Contact Person Name" required/>
      <input type="button" name="next" class="next firstbutton action-button" value="Next" />
    </fieldset>
    <fieldset class="second">
      <!-- <h2 class="fs-title">Topic</h2> -->
      <h3 class="fsf-subtitle">Details about Blood-Camp</h3><br>
      <input type="text" name="city" placeholder="City" required/>
      <input type="text" name="address" placeholder="Address" required/>
      <input type="text" name="date" placeholder="Date" required/>
      <input type="text" name="time" placeholder="Timing" required/>

      <input type="button" name="previous" class="previous action-button" value="Previous" />
      <input type="submit" name="submit" class="next secondbutton action-button" value="Submit" />
    </fieldset>

    <fieldset class="third">
      <!-- <h2 class="fs-title">Topic</h2> -->
      <h3 class="fsf-subtitle">Thank You:)</h3><br><hr><br>
      <h4> Organization Name:-</h4><br>
      <h4> Contact No:-</h4><br>
      <h4> Email:-</h4><br>
      <h4> Address:-</h4><br>
      <h4> City:-</h4><br><hr><br>
        <h4>Your Blood Camp Details Will Be Updated And Everyone Will Get Notified Within 24 Hours Of Time.</h4><br><hr><br>
      <h4> Your Organization Is Creating a Deep Impact On Society :) </h4>


    </fieldset>


  </form>

</section>

</div>

<script>

var parent, next_fs, previous_fs;



$(".next").click(function(){
  parent = $(this).parent();
  next_fs = $(this).parent().next();
  prev_fs = $(this).parent().prev();
  $(parent).hide();
  $(next_fs).show();
  $("#progressbar li").eq($("fieldset").index(parent)).addClass("active");
   // $("#progressbar li").eq($("fieldset").index(parent)).removeClass("active");

 });

 $(".previous").click(function(){
   parent = $(this).parent();
   prev_fs = $(this).parent().prev();
   $(parent).hide();
   $(prev_fs).show();
   // $("#progressbar li").eq($("fieldset").index(prev_fs)).addClass("active");
   $("#progressbar li").eq($("fieldset").index(prev_fs)).removeClass("active");

 });
 </script>
</body>

include('../dbcon.php');

if(isset($_POST['submit'])){

echo('divesh');

I expect that atleast when submit is clicked, the php segment recognizes it




Aucun commentaire:

Enregistrer un commentaire