<div class="breadcrumb-area mb-20">
        <div class="container">
            <div class="row">
                <div class="col">
                    <div class="breadcrumb-container">
                        <ul>
                            <li><a href="<?php echo base_url();?>"><i class="fa fa-home"></i> Home</a></li>
                            <li class="active">Vendor Registration</li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>	
<div class="page-content mb-50">
<div class="container">
<div class="row">
<div class="col-md-5" style="background:url(<?php echo base_url();?>assets/images/vbanner.jpg); background-repeat:no-repeat; padding:20px;">
                    <h2 style="color:#FFF;">Earn With Us</h2>          
                    </div>
                    <div class="col-md-7">
                	<?php if($this->session->flashdata("msg")){echo $this->session->flashdata("msg"); }?>
					<form action="<?php echo base_url();?>home/vendor_reg_submit" method="post" enctype="multipart/form-data">
						<div class="login-form" style="padding: 20px;">
							<h5 class="login-title text-success">Vendor Register</h5>
							<div class="row">
								<div class="col-md-8 col-12 mb-10">
									<label>Business Name</label>
									<input class="mb-0" type="text" name="vb_name" placeholder="Business Name" required>
								</div>
                                <div class="col-md-4 col-12 mb-10">
									<label>Logo If/Any</label>
									<input class="mb-0" type="file" name="img">
								</div>
                                <div class="col-md-8 col-12 mb-10">
									<label>Contact Person Name</label>
									<input class="mb-0" type="text" required name="v_name" placeholder="Contact Person Name">
								</div>
                                <div class="col-md-4 mb-10">
									<label>Mobile/Phone*</label>
									<input class="mb-0" type="text" name="v_phone" required placeholder="Mobile/Phone">
								</div>
								<div class="col-md-12 mb-10">
									<label>Email Address*</label>
									<input class="mb-0" type="email" name="v_email" required placeholder="Email Address">
								</div>
								<div class="col-md-6 mb-10">
									<label>Create Password</label>
									<input class="mb-0" type="password" name="v_password" required placeholder="Password">
								</div>
								<div class="col-md-6 mb-10">
									<label>Confirm Password</label>
									<input class="mb-0" type="password" name="cv_password" required placeholder="Confirm Password">
								</div>
                                <div class="col-md-12 mb-10">
									<label>Address*</label>
									<textarea class="form-control" name="v_address" style="border-radius:0px;" rows="2" required placeholder="Address"></textarea>
								</div>
								<div class="col-md-4 mb-10">
									<label>State</label>
                                    <select class="form-control" name="vstate" id="state">
                                    	<option value="">Select State</option>
                                        <?php $st=$this->db->get_where("states",array("country_id"=>101))->result();
										foreach($st as $st){?>
                                        <option value="<?php echo $st->state_id;?>"><?php echo $st->state_name;?></option>
                                        <?php }?>
                                    </select>
								</div>
                                <div class="col-md-5 mb-10">
									<label>City</label>
                                    <select class="form-control" name="vcity" id="city">
                                    	<option value="">Select City</option>
                                    </select>
								</div>
								
                                <div class="col-md-3 mb-10">
									<label>PinCode</label>
									<input class="mb-0" type="text" name="vpincode" required placeholder="PinCode">
								</div>
								<div class="col-12">
									<button class="btn btn-success">Register as Vendor</button>
									<a class="btn btn-warning" href="<?php echo base_url();?>home/vlogin">Login</a>
								</div>
							</div>
						</div>

					</form>
				</div>
			</div>
		</div>
	</div>
    <script>
	$(document).ready(function(){
		$("#state").change(function(){
			var state=$(this).val();
			$.ajax({
				 type: "POST",
				 url: '<?php echo base_url();?>home/ajax_city',
				 data: {state:state},
				 success: function(response){
					 //alert(response);
					 $("#city").html(response);
				 }
				 });
		});
	});
	</script>