vendredi 2 juillet 2021

Form submit didnot working properly and return data

I have a form and here is the code

<form method="post" id="dvs-upload-booking">
<input type="hidden" name="tcs_bulk_booking" value="true">
    <input disabled="" style="text-align: center;" type="text" id="1" name="1" value="1" required="">
    <input type="text" id="name_1" name="order[1][name]" value="Peter " required="">
    <input type="submit" value="Submit" class="dvs-btn-upload"> 
</form>

This is my php code which I try to run when someone click submit

<?php
    if (!empty($_POST["tcs_bulk_booking"])) {
        echo "Yes, Data is set";    
    } else {  
        echo "No, Data is not set";
    }
?>

But when I click Submit button it still show "No, Data is not set" despite it need to show "Yes, Data is set". Please tell me what I did wrong

Aucun commentaire:

Enregistrer un commentaire