Store data from laravel form to database

Posted 2 years ago by Christianus

guys, please help me solve this cause im newbie on web build. this is my form and i want to get entry from every textfield and also dropdown list and store it into database

                    <div>
                        <label for="username" class="col-md-4 control-label" name="username">Nama Pelanggan</label>

                        <div class="col-md-6">
                            <input id="username" type="text" class="form-control" name="username">
                        </div>
                    </div>

                    <div>
                        <label for="company" class="col-md-4 control-label" name="company">Nama Instansi</label>

                        <div class="col-md-6">
                            <input id="company" type="text" class="form-control" name="company">
                    </div>

                    <div>
                        <label for="email" class="col-md-4 control-label">Alamat E-Mail</label>

                        <div class="col-md-6">
                            <input id="mail" type="email" class="form-control" name="mail" value="{{ old('email') }}">
                        </div>
                    </div>

                    <div>
                        <label for="contactnumber" class="col-md-4 control-label">Nomor Kontak</label>

                        <div class="col-md-6">
                            <input id="contactnumber" type="text" class="form-control" name="contactnumber"
                            value="{{ old('contactnumber') }}">
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label for="jenislayanan" class="col-md-4 control-label">Jenis Layanan</label>
                        <div class="col-md-6">
                            <select name="jenislayanan">
                                <option value="pertanyaan">Pertanyaan</option>
                                <option value="keluhan">Keluhan Produk</option>
                                <option value="kritiksaran">Kritik & Saran</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-md-6 col-md-offset-4">
                            <button type="submit" class="btn btn-primary">
                                <i class="fa fa-btn fa-sign-in"></i> Lanjut
                            </button>                            
                        </div> 
                    </div>
                </form>
            </div>
        </div>

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.