Server IP : 162.214.80.37 / Your IP : 216.73.216.83 Web Server : Apache System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : imyrqtmy ( 2189) PHP Version : 8.2.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home2/imyrqtmy/public_html/sunriseventures/Ajax/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php // $response = array(); // $detail = array(); // $response['data'] = array(); include '../admin/includes/config.php'; // session_start(); extract($_POST); $SQL1 = "INSERT INTO tbl_inq set name='$name',email='$email',phno='$mobno',type='$type'"; $sql_res1 = mysqli_query($conn, $SQL1) or die(mysqli_error($con)); $last_id = $conn->insert_id; $result = $conn->query("select * from tbl_states"); if($type == 'Buy') { $html = ' <div class="row"> <div class="col-md-6"> <div class="form-group"> <label for="name" accesskey="U">State</label> <select name="state" id="state" class="form-control">'; while ($row = $result->fetch_assoc()) { $sname = $row['name']; $html .= ' <option value=" '.$sname.'" >'.$sname.'</option>'; } $html .= ' </select> </div> </div> <div class="col-md-6"> <div class="form-group"> <label for="name" accesskey="U">City </label> <input name="city" type="text" id="city" class="form-control" value="" required="" > <input name="eid" type="hidden" id="eid" class="form-control" value="'.$last_id.'" > <input name="etype" type="hidden" id="etype" class="form-control" value="'.$type.'" > </div> </div> <div class="col-md-6"> <div class="form-group"> <label for="name" accesskey="U">Type</label> <select class="form-control ptype" name="ptype" id="ptype" required=""> <option value="">Choose</option> <option value="Plot">Plot</option> <option value="flat">flat</option> <option value="Agriculture land">Agriculture land</option> </select> </div> </div> <div class="col-md-6 budget"> <div class="form-group"> <label for="name" accesskey="U"> Budget</label> <input name="budget" type="text" id="budget" class="form-control" value="" required="" > </div> </div> </div>'; } else if($type =='Sell') { $html .= '<div class="row"> <div class="col-md-6"> <div class="form-group"> <label for="name" accesskey="U">State</label> <select name="state" id="state" class="form-control">'; while ($row = $result->fetch_assoc()) { $sname = $row['name']; $html .= ' <option value=" '.$sname.'" >'.$sname.'</option>'; } $html .= ' </select> </div> </div> <div class="col-md-6"> <div class="form-group"> <label for="name" accesskey="U">City </label> <input name="city" type="text" id="city" class="form-control" value="" required="" > <input name="eid" type="hidden" id="eid" class="form-control" value="'.$last_id.'" > <input name="etype" type="hidden" id="etype" class="form-control" value="'.$type.'" > </div> </div> <div class="col-md-6"> <div class="form-group"> <label for="name" accesskey="U">Type</label> <select class="form-control ptype" name="ptype" id="ptype" required=""> <option value=""> Choose </option> <option value="Plot">Plot</option> <option value="flat">flat</option> <option value="Agriculture land">Agriculture land</option> </select> </div> </div> <div class="col-md-6 demand"> <div class="form-group"> <label for="name" accesskey="U"> Demand </label> <input name="text" type="text" id="demand" class="form-control" value="" required="" > </div> </div> </div>'; } echo $html; ?>