0

I'm pretty new to timepicker and CodeIgniter but I'm attempting to use a value selected from timepicker's dropdown box to update a database entry, and I'm pretty stumped.

my view:

<div class="input-field col s3">
<input id="ThrStart" type="text" class="time input-field ui-timepicker-input" autocomplete="off">
            <label for="ThrStart">Start Time</label>
        </div>

<div class="input-field col s3">
            <button class="btn waves-effect waves-light red darken-4" type="submit" name="Wed_button" id="webadd">Add</button>
        </div>

I would like to send the currently selected value from the timepicker selection to the database when the "Wed_button" is clicked, but I'm not sure how to select these values in order to use a _POST. Any advise would be appreciated.

1 Answer 1

1

Add a form tag and give a name to input box

<form action="ACTION_URL" method="post">
<div class="input-field col s3">
<input id="ThrStart" type="text" name="ThrStart" class="time input-field ui-timepicker-input" autocomplete="off">
        <label for="ThrStart">Start Time</label>
    </div>

<div class="input-field col s3">
        <button class="btn waves-effect waves-light red darken-4" type="submit" name="Wed_button" id="webadd">Add</button>
    </div>
</form>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.