hi guys pls help me with this i dont know how to start to send this function to the php database. pls help me i need to send the right box to the database tnx the function of the jquery is working but i cannot think of how do i insert this to the database pls help me with this:) tnx all move options(text) two the next box and insert to the php database.
select.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Jquery move listbox items from left to right example</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
<script language="javascript" type="text/javascript">
function move_list_items(sourceid, destinationid)
{
$("#"+sourceid+" option:selected").appendTo("#"+destinationid);
}
//this will move all selected items from source list to destination list
function move_list_items_all(sourceid, destinationid)
{
$("#"+sourceid+" option").appendTo("#"+destinationid);
}
</script>
<style type="text/css">
select {
width:200px;
height:100px;
}
</style>
</head>
<body>
<form action="submit.php" method="post">
<table cellpadding="5" cellspacing="5">
<tbody>
<tr>
<td colspan="2">
<select id="from_select_list" multiple="multiple" name="from_select_list">
<option value="apple">Apple</option><option value="mango">Mango</option> <option value="bannana">Bannana</option> <option value="grapes">Grapes</option>
</select>
</td>
<td colspan="2">
<select id="to_select_list" multiple="multiple" name="to_select_list">
<option value="winder">Winter</option> <option value="summer">Summer</option> <option value="rainy">Rainy</option> <option value="Spring">Spring</option>
</select>
</td>
</tr>
<tr>
<td><input id="moveright" type="button" value="Move Right" onclick="move_list_items('from_select_list','to_select_list');" /></td>
<td><input id="moverightall" type="button" value="Move Right All" onclick="move_list_items_all('from_select_list','to_select_list');" /></td>
<td><input id="moveleft" type="button" value="Move Left" onclick="move_list_items('to_select_list','from_select_list');" /></td>
<td><input id="moveleftall" type="button" value="Move Left All" onclick="move_list_items_all('to_select_list','from_select_list');" /></td>
<input type="submit" name="submit" />
</tr>
</tbody>
</table>
</body>
</html>
connection.php
<?php
$dbhost = "localhost";
$dbuser = "root";
$dbpass = "";
$db = "copy";
$conn = mysqli_connect($dbhost,$dbuser,$dbpass,$db);
?>
submit.php
<?php
include 'connection.php'
?>
change the select option name into array then only u can get all the selected items
<td colspan="2">
<select id="to_select_list" multiple="multiple" name="to_select_list[]">
<option value="winder">Winter</option> <option value="summer">Summer</option> <option value="rainy">Rainy</option> <option value="Spring">Spring</option>
</select>
</td>
in submit.php you can check like this
echo '<pre>';
print_r($_POST);
Related
I have a form where I need to input data to store. I used a while loop because I need to use same code over 4/5 times. The problem is the submit button is coming before the form. It's working. I checked that. But, I need to place the submit button below the form.
I tried to change it up a few times. It still give me the same output.
How to solve this?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="../sns/bootstrap.min.css">
<script type="text/javascript" src="../sns/jquery.min.js"></script>
<script type="text/javascript" src="../sns/bootstrap.min.js"></script>
</head>
<body>
<table>
<tr>
<th>Department:</th>
<th>Year:</th>
<th>Course:</th>
<th>Date(dd/mm/yyyy):</th>
<th>Time:</th>
<th>Roll:</th>
</tr>
<form method="post" style="width: auto;">
<?php
$i=0;
while ($i<5) {
echo '<tr id="c1">
<td>
<select name="dept'.$i.'" size="1">
<option value="EEE ">EEE</option>
<option value="CSE ">CSE</option>
<option value="CE ">CE</option>
<option value="ME ">ME</option>
<option value="IPE ">IPE</option>
<option value="GCE ">GCE</option>
<option value="ECE ">ECE</option>
<option value="ETE ">ETE</option>
<option value="MTE ">MTE</option>
<option value="URP ">URP</option>
<option value="Arch ">Architecture</option>
</select>
</td>
<td>
<select name="year'.$i.'" size="1">
<option value="1">1st</option>
<option value="2">2nd</option>
<option value="3">3rd</option>
<option value="4">4th</option>
</select>
</td>
<td>
<input type="text" name="course'.$i.'" size="10">
</td>
<td>
<input type="text" name="date'.$i.'" style="width: auto">
</td>
<td>
<select name="time'.$i.'" size="1">
<option>9:00</option>
<option>10:00</option>
<option>2:00</option>
</select>
</td>
<td>
<input type="text" name="Roll'.$i.'">
</td>
</tr>';
$i++;
}
?>
<input class="btn btn-default" type="Submit" value="Submit">
</form>
</table>
</body>
</html>
You need to put the submit button inside a td as well, I also recommend moving the form fully outside of the table as some browser (webkit/chrome mostly) will add or rearrange elements they think are incomplete:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="../sns/bootstrap.min.css">
<script type="text/javascript" src="../sns/jquery.min.js"></script>
<script type="text/javascript" src="../sns/bootstrap.min.js"></script>
</head>
<body>
<form method="post" style="width: auto;">
<table>
<tr>
<th>Department:</th>
<th>Year:</th>
<th>Course:</th>
<th>Date(dd/mm/yyyy):</th>
<th>Time:</th>
<th>Roll:</th>
</tr>
<?php
$i=0;
while ($i<5) {
echo '<tr id="c1">
<td>
<select name="dept'.$i.'" size="1">
<option value="EEE ">EEE</option>
<option value="CSE ">CSE</option>
<option value="CE ">CE</option>
<option value="ME ">ME</option>
<option value="IPE ">IPE</option>
<option value="GCE ">GCE</option>
<option value="ECE ">ECE</option>
<option value="ETE ">ETE</option>
<option value="MTE ">MTE</option>
<option value="URP ">URP</option>
<option value="Arch ">Architecture</option>
</select>
</td>
<td>
<select name="year'.$i.'" size="1">
<option value="1">1st</option>
<option value="2">2nd</option>
<option value="3">3rd</option>
<option value="4">4th</option>
</select>
</td>
<td>
<input type="text" name="course'.$i.'" size="10">
</td>
<td>
<input type="text" name="date'.$i.'" style="width: auto">
</td>
<td>
<select name="time'.$i.'" size="1">
<option>9:00</option>
<option>10:00</option>
<option>2:00</option>
</select>
</td>
<td>
<input type="text" name="Roll'.$i.'">
</td>
</tr>';
$i++;
}
?>
<tr>
<td colspan="6" align="right">
<input class="btn btn-default" type="Submit" value="Submit">
</td>
</tr>
</table>
</form>
</body>
</html>
Renders:
<form method="post" style="width: auto;" action="">
<table>
<?php
$i = 0;
while ($i <= 5) {
#my form
if($i == 5)
echo '<button class="btn btn-default" type="Submit" style="margin-left: 18%; width: 14%">Submit0</button>';
$i++;
}
?>
<input class="btn btn-default" type="Submit" value="Submit1">
</table>
</form>
manage_bank
Hi everyone,
Can someone help me, How to display the bank name based on selected drop down, when we choose
for example:- 50 records
then it will display 50 records of the bank name from database.
When we logout the value still remain the same 50 records.
<?php
// Includes the required files
include ("../ecompany/terms_includes.php");
?>
<?php
// Check user authority for this page
$ModuleName = "Manage Banks";
$ModuleAction = "view";
base_checkAuthority($ModuleName,$ModuleAction)
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
include PATH_INC_HEAD;
?>
<?php
//get page number
$page = $_GET["page"];
$record = $_GET["record"];
//get Miscellaneous detail
$MiscellaneousDetail = base_getMiscellaneousDetail();
?>
<?php
if(!isset($page))
{
$page = 1;
}
if(!isset($record))
{
$record = $MiscellaneousDetail['base_mis_default'];
}
//go to reload page
if(isset($_POST['load']))
{
$page = 1;
$record = $_POST['records_per_page'];
}
//go to add profile page
if(isset($_POST['add']))
{
echo '<script type="text/javascript">' . "\n";
echo 'window.location="../ecompany/add_bank.php";';
echo '</script>';
}
//go to home page
if(isset($_POST['cancel']))
{
echo '<script type="text/javascript">' . "\n";
echo 'window.location="../terms_base/home.php";';
echo '</script>';
}
?>
</head>
<body>
<div class="container">
<?php
include PATH_INC_HEADER;
?>
<div class="main_body1">
<div id="update_category"></div>
<div style="width:800px; margin:auto">
<?php
include PATH_INC_DESC;
?>
<div style="clear:both"></div>
<form name="bank_list_form" id="bank_list_form" method="post" action="">
<div style="width:800px; margin:auto; text-align:left">
<select name="records_per_page" id="records_per_page" >
<option value="<?php echo $record; ?>">Default Records/Page :</option>
<option value="1" title="1" >1</option>
<option value="3" title="3" >3</option>
<option value="5" title="5" >5</option>
<option value="10" title="10" >10</option>
<option value="20" title="20" >20</option>
<option value="30" title="30" >30</option>
<option value="50" title="50" >50</option>
<option value="100" title="100" >100</option>
<option value="200" title="200" >200</option>
<option value="500" title="500" >500</option>
<option value="1000" title="1000" >1000</option>
</select>
<input type="" size="4" style="width:25px" name="record"
id="record"value="<?php echo $record; ?>" readonly="readonly" />
<div id="searchbutton">
<input type="submit" id="load" name="load" value="Refresh">
</div>
</div>
<table cellspacing="1" class="tablesorter">
<thead>
<tr>
<th></th>
<th>Code</th>
<th>Name</th>
<th>Description</th>
<th>Remark</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<?php ecoy_listBank($page, $record) ?>
</tbody>
<tr>
<td align="center" colspan="8"><input type="submit" id="add"
name="add" value="Add Bank" /><input type="submit" id="cancel"
name="cancel" value="Cancel" /></td>
</tr>
</tfoot>
</table>
</form>
<br />
</div>
<div class="clearboth"></div>
</div>
<?php
include PATH_INC_FOOTER;
?>
</div>
</body>
</html>
Much appreciate, Thanks.
The title of your question is misleading. But if I got it right you actually succeed in querying your data correctly and refreshing the number of records with your refresh button.
You real question is how to persist the default value of the dropdown after a logout.
By mentioning your logout feature I assume you have users and a user table in your database.
From here you have two solutions I can think of:
1. Save the users preferences like the default value of your dropdown within your users table or create a separated table dedicated for this purpose.
2. Store users preferences in cookies
Hello I have an issue with updating MySQL using PHP form in Netbeans the issue that occurs is:
"Notice: Undefined variable: fetched_row in C:\Xampp\htdocs\Resume_DB\PHP\Edication_Edit.php on line 75"
In all 4 of my text boxes. The code I have is :
<?php
mysql_connect("localhost", "root", "");
mysql_select_db("cs266db_db1");
if(isset($_GET['edit_id']))
{
$sql_query="SELECT * FROM education Where Edit_Education=".$_GET['edit_id'];
$result_set= mysql_query($sql_query);
$fetched_row= mysql_fetch_array($result_set);
}
if(isset($_POST['btn_update']))
{
//variables for input data
$Class = $_POST['Class'];
$Discipline = $_POST['Discipline'];
$Description = $_POST['Description'];
$Term = $_POST['Term'];
//sql query for update data
$sql_query = "UPDATE Education SET Class='$Class', Discipline='$Discipline', Description='$Description', Term='$Term' WHERE Education_Edit=".$_GET['edit_id'];
//sql query execution function
if(mysql_query($sql_query))
{
?>
<script type='text/javascript'>
alert('Data Has Been Updated');
window.location.href='Eduaction.php';
</script>
<?php
}
else
{
?>
<script type='text/javascript'>
alert('Error Occured while Updating Data');
</script>
<?php
}
//sql query execution function
}
if(isset($_POST['btn-cancel']))
{
header("Location: Education.php");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Edit Education</title>
</head>
<body>
<center>
<div id="header">
<div id="content">
<label>Edit Education</label>
</div>
</div>
<div id="body">
<div id="content">
<form method="post">
<table align="center">
<tr>
**<td><input type="text" name="Class" placeholder="Class" value="<?php echo $fetched_row['Class']; ?>" required /></td>
</tr>
<tr>
<td><input type="text" name="Discipline" placeholder="Discipline" value="<?php echo $fetched_row['Discipline']; ?>" required /></td>
</tr>
<tr>
<td><input type="text" name="Description" placeholder="Description" value="<?php echo $fetched_row['Description']; ?>" required /></td>
</tr>
<tr>
<td><input type="Text" name="Term" placeholder="Term" value="<?php echo $fetched_row['Term']; ?>" required</td>**
</tr>
<tr>
<td>
<button type="submit" name="btn-update"><strong>UPDATE</strong></button>
<button type="submit" name="btn-cancel"><strong>Cancel</strong></button>
</td>
</tr>
</table>
</form>
</div>
<div id="footer">
<div id="content">
</div>
</div>
</center>
</body>
</html>
Any thoughts? Thanks for your help guys
The problem is that fetched_row is only assigned when $_GET['edit_id'] is set. Otherwise it does not exist, but you're still trying to use it, even if $_GET['edit_id'] is not set.
Change
<td><input type="Text" name="Term" placeholder="Term" value="<?php echo $fetched_row['Term']; ?>" required</td>**
To:
<td><input type="Text" name="Term" placeholder="Term" value="<?php echo (isset($fetched_row['Term']))? $fetched_row['Term'] : ''; ?>" required</td>**
It seems instead of "Edit_Education" you are using "Education_Edit" in update query or instead of "Education_Edit" you are using "Edit_Education" in select query.
$sql_query="SELECT * FROM education Where Edit_Education=".$_GET['edit_id'];
$sql_query = "UPDATE Education SET Class='$Class', Discipline='$Discipline', Description='$Description', Term='$Term' WHERE Education_Edit=".$_GET['edit_id'];
change if(isset($_POST['btn_update'])) to if(isset($_POST['btn-update'])) because in html button tag you named button as btn-update .
In update query change column name Education_Edit change to Edit_Education
I am new to coding so be gentle. I am building a new user interface in PHP for a database of marriage listings for use at our county library. I am using this javascript code that was part of a solution I found here that I though I could use and modify the corresponding HTML to meet my needs:
<--Javascript code-->
function showDiv(idInfo) {
var sel = document.getElementById('divLinks').getElementsByTagName('div');
for (var i=0; i<sel.length; i++) {
sel[i].style.display = 'none';
}
document.getElementById('container'+idInfo).style.display = 'block';
}
I have modified the body of the html inside the php page to attempt to provide a listing of records on the left hand side and when they select a record from the list, it displays it in the right hand side div/table that allows them to edit it in the form, then to submit after making changes. It works well for the first couple of records you view, but on the third click it no longer hides the old records, it starts displaying additional ones in the right div. For some reason after two successful displays, the third and any further clicks on records in the left list will just start displaying more and more records in the right side div. Any help with this would be greatly appreciated. Here is the PHP/HTML:
<--PHP Code-->
<?php
include 'config-admin-marriages.php';
if (isset($_POST['lastname'])) { $one=$_POST['lastname']; }
if (isset($_POST['firstname'])) { $two=$_POST['firstname']; }
$sql = 'SELECT * FROM names WHERE ';
if (!empty($one) && !empty($two)) {
$sql.="glast like :lastname and gfirst like :firstname or blast like :lastname and bfirst like :firstname";
} elseif (!empty($one)) {
$sql.="glast like :lastname or blast like :lastname";
} else {
$sql.="gfirst like :firstname or bfirst like :firstname";
}
$stmt = $conn->prepare($sql);
foreach ($_POST as $key => $value)
{
if (!empty($value)) {
$mod="$value%";
$stmt->bindValue(':'.$key, $mod);
}
}
$stmt->execute();
$row = $stmt->fetchAll(PDO::FETCH_ASSOC);
$numrows = $stmt->rowCount();
if ($numrows == 0) {
?>
<html>
<head>
<link href="style_results.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="contact">
<h1>No results were returned from your search.</h1>
</div>
</body>
</html>
<?php
} else {
?>
<!DOCTYPE HTML>
<html>
<head>
<title> Marriage Database Modification </title>
<link href="style_mod.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="/js/modpage.js"></script>
</head>
<body>
<div id="contact">
<table border="2" width="100%">
<tr><td colspan="7"><h1>Marriage Record Modifications</h2></td></tr>
<tr>
<td>
<table border="2" width="100%">
<div id="linkDiv">
<tr><th>Last Name</th><th>First Name</th><th>Last Name</th><th>First Name</th><th>Month</th><th>Day</th><th>Year</th><th>Page</th><th>Source</th><th>Select</th></tr>
<?php for ($x=0;$x < $numrows;$x++) { ?>
<tr><td><?php echo $row[$x]['glast']?></td><td><?php echo $row[$x]['gfirst']?></td><td><?php echo $row[$x]['blast']?></td><td><?php echo $row[$x]['bfirst']?></td><td><?php echo $row[$x]['month']?></td><td><?php echo $row[$x]['day']?></td><td><?php echo $row[$x]['year']?></td><td><?php echo $row[$x]['page']?></td><td><?php echo $row[$x]['id']?></td><td><input type="button" value="select" onclick="showDiv('<?php echo $row[$x]['id']?>');return false"></td></tr> <?php }?>
</div>
</table>
</td>
<td rowspan="6" height="800px" width="1000px">
<?php for ($x=0;$x < $numrows;$x++) { ?>
<div id="divLinks">
<div id="container<?php echo $row[$x]['id']?>" style="display:none">
<table border="2">
<tr>
<td>
<!-- The 4 container content divs. -->
<label><?php echo $row[$x]['id']?></label>
<form method="POST" action="showoutput.php">
<table height="790px" width="990px">
<tr>
<td valign="top"><label>Groom's Last name:</label></td>
<td><input name="glname" type="text" value="<?php echo $row[$x]['glast']?>" placeholder="Last Name of Groom [Required]"/></td>
<td valign="top"><label>Groom's First name:</label></td>
<td><input name="gfname" type="text" value="<?php echo $row[$x]['gfirst']?>" placeholder="First Name of Groom [Required]"/></td>
</tr>
<tr>
<td valign="top"><label>Bride's Last Name:</label></td>
<td><input name="blname" type="text" value="<?php echo $row[$x]['blast']?>" placeholder="Last Name of Bride [Required]"/></td>
<td valign="top"><label>Bride's First Name:</label></td>
<td><input name="bfname" type="text" value="<?php echo $row[$x]['bfirst']?>" placeholder="First Name of Bride [Required]"/></td>
</tr>
<tr>
<td valign="top"><label>Month:</label></td>
<td>
<select name="mon">
<option selected="selected" value="<?php echo $row[$x]['month']?>"><?php echo $row[$x]['month']?></option>
<option value="Jan">January</option>
<option value="Feb">February</option>
<option value="Mar">March</option>
<option value="Apr">April</option>
<option value="May">May</option>
<option value="Jun">June</option>
<option value="Jul">July</option>
<option value="Aug">August</option>
<option value="Sep">September</option>
<option value="Oct">October</option>
<option value="Nov">November</option>
<option value="Dec">December</option>
</select>
</td>
<td valign="top"><label>Day:</label></td>
<td><input name="da" type="text" value="<?php echo $row[$x]['day']?>"placeholder="Day number here [Required]"/></td>
</tr>
<tr>
<td valign="top"><label>Year:</label></td>
<td><input name="yr" type="text" value="<?php echo $row[$x]['year']?>"placeholder="4 digit year i.e. 1990 [Required]"/></td>
<td valign="top"><label>Page Number:</label></td>
<td><input name="page" type="text" value="<?php echo $row[$x]['page']?>"placeholder="Page Number i.e. 4D [Required]"/></td>
</tr>
<tr>
<td valign="top"><label>Source:</label></td>
<td>
<select name="src">
<option selected="selected" value="<?php echo $row[$x]['source']?>"><?php echo $row[$x]['source']?></option>
<option value="Greenville News">Greenville News</option>
<option value="Greenville News">Greenville News</option>
<option value="Greenville News">Greenville News</option>
<option value="Greenville News">Greenville News</option>
<option value="Greenville News">Greenville News</option>
<option value="Greenville News">Greenville News</option>
<option value="Greenville News">Greenville News</option>
<option value="Greenville News">Greenville News</option>
<option value="Greenville News">Greenville News</option>
</select>
</td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="mod" value="Modify Record"></td>
<td colspan="2"><input type="submit" name="del" value="Delete Record"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</div>
</div>
<?php } ?>
</td>
</tr>
</table>
</div>
</body>
</html>
<?php } ?>
If there is a better way, I am all ears as well. Thanks again. I am sorry if the code didn't format well as this is my first time using these forums. I tried to space modify it and it didn't change in the code block.
Here is a revised vision of your code I did, and an example.
Condensed code using global variable:
JSFIDDLE DEMO
var lastDiv = false;
function showDiv(idInfo) {
var elm = document.getElementById('container'+idInfo);
if ( lastDiv ) {
lastDiv.style.display = 'none';
}
elm.style.display = 'block';
lastDiv = elm;
}
And lastly using a loop like you had before:
JSFIDDLE DEMO
function showDiv(idInfo) {
var elm = document.getElementById('container'+idInfo),
cdiv = document.getElementById("divLinks"),
div = cdiv.getElementsByTagName("div");
for( var i=0; i<div.length; i++ ) {
div[i].style.display = 'none';
}
elm.style.display = 'block';
}
This selects the target to be displayed, then loops through only the div links, making sure they are hidden before displaying the target.
i had a text field named as bill no ,My problem is to increase value in the text field automatically , like initially the bill no will be 1 , after clicking save button it should save with 1 after saving the bill no should automatically increase to 2 ,
any advice ?
<%# page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Sales</title>
<link href="css/module.css" rel="stylesheet" type="text/css">
<link href="css/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/date.js"></script>
<script>
$(document).ready(function() {
$(".datepicker").datepicker({dateFormat:"yy-mm-dd"});
});
</script>
</head>
<body>
<div class="reg-form">
<form method="post" name="sales" action="sales">
<table class="main">
<thead>
<tr>
<th>SALES
</th>
</tr>
</thead>
</table>
<table class="in-sec-small">
<tbody>
<tr>
<td class="label">
<label for="patient-type">PATIENT TYPE
</label>
</td>
<td>
<select id="patient_type" class="textfield-form-req-select" type="text" name="patient_type" required>
<option value="member">IP</option>
<option value="non-member">OP</option>
<option value="non-member">WIP</option>
</select>
</td>
<td class="label">
<label for="reg-type">REG TYPE
</label>
</td>
<td>
<select id="reg_type" class="textfield-form-req-select" type="text" name="reg_type" required>
<option value="member">Member</option>
<option value="non-member">Non Member</option>
</select>
</td>
<td class="label">
<label for="bill-no">BILL NO
</label>
</td>
<td>
<input id="bill_no" class="textfield-form-date-req" type="text" name="bill_no" required>
</td>
</tr>
Try code below, if you save your bill no through ajax, increase number in your ajax success callback.
$("#your-save-button-id").click(function(){
... do your save action here ...
$("#bill_no").val(parseInt($('#bill_no').val()) + 1);
})