TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
snowal raj
NA
166
39.5k
call php function in html button
Jan 6 2017 8:41 AM
hai ,
how to call php function in from html button in same page .
This is my code but is not working
<html>
<head>
FromDate : <input type="date" data-date-inline-picker="true" name="dtpFromDate" />
ToDate : <input type="date" data-date-inline-picker="true" name="dtpToDate" />
<br> <br>
<button id="btnfun1" name="btnfun1" onClick="load();">Submit</button>
<table width="100%" border="5" >
<thead>
<td><strong><font color="#000000">client_name</font></strong></td>
<td><strong><font color="#000000">process description</font></strong></td>
<td><strong><font color="#000000">start time</font></strong></td>
<td><strong><font color="#000000">end time</font></strong></td>
<td><strong><font color="#000000">Duration </font></strong></td>
<td><strong><font color="#000000">userName </font></strong></td>
<td><strong><font color="#000000">utilization id</font></strong></td>
<td><strong><font color="#000000">call Status</font></strong></td>
<td><strong><font color="#000000">patient_name</font></strong></td>
</thead>
<?php
include_once ("psl-config.php");
// include_once ("user.class.php");
function Load()
{
$FromDate = $_POST['dtpFromDate'];
$ToDate =$_POST['dtpToDate'];
$mysqli = new mysqli(HOST, USER, PASSWORD,DATABASE);
// $result= GetData($mysqli,'ICCTRACE');
$sql = ("CALL SP_GET_LOG_SHEET");
$result = mysqli_query($mysqli, $sql);
// //
while(($row = mysqli_fetch_array($result)))
{
?>
<tr>
<td><?php echo $row['client_name']; ?></td>
<td><?php echo $row['process_description']; ?></td>
<td><?php echo $row['start_time']; ?></td>
<td><?php echo $row['end_time']; ?></td>
<td><?php echo $row['Duration']; ?></td>
<td><?php echo $row['userName']; ?></td>
<td><?php echo $row['utilization_id']; ?></td>
<td><?php echo $row['call_status']; ?></td>
<td><?php echo $row['patient_name']; ?></td>
</tr>
</head>
</html>
<?php
}
}
?>
i want to call load function when i click submit button
Reply
Answers (
2
)
Word Press themes which are good and free
Publish website via IIS