I want jquery popup should come once the form is submitted using php and mysql, the output has come in jquery popup?I have fetched the values from table.Those value I have to show in pop?what kind of pop is available for that?
This is the value I want to show in popup?once the form is submitted.Those values are from db?
Here is the db values:
id Author Names Title of the Paper Journal Vol Yr Pages
1 V.Thahira Banu Assistant Semantic Sensor Network A Survey International Special Volume 2013 p.no:549 to 553
Professor, PSGR Krishna..
2 .......................
3 .......................
jQuery by itself has no UI elements. You either have to use the traditional javascript alert() or include a UI library like jQueryUI and use their dialog component or equivalent.
You can use JavaScript Alert or a plugin for that.
JavaScript Alert
Alert(data);
of visit this link Sample Alert Plugins for use of plugins
This is the best thing, you should use and try :- http://getbootstrap.com/javascript/#modals
Check the code:
Index.php
<?php
require_once"class/db.php";
$db= new db();
$data=$db->fetch_user_det();
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Dialog - Animation</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery- ui.css">
<script src="//code.jquery.com/jquery-1.9.1.js"></script>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
<script>
$(function() {
$( "#dialog" ).dialog({
autoOpen: false,
show: {
effect: "blind",
duration: 1000
},
hide: {
effect: "explode",
duration: 1000
}
});
$( "#opener" ).click(function() {
$( "#dialog" ).dialog( "open" );
});
});
</script>
</head>
<body>
<div id="dialog" title="Basic dialog">
<p>
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Name</td>
<td>Class</td>
<td>Roll</td>
</tr>
<?php
foreach($data as $val)
{
?>
<tr>
<td><?php echo $val['field_name1']; ?></td>
<td><?php echo $val['field_name2']; ?></td>
<td><?php echo $val['field_name3']; ?></td>
</tr>
<?php
}
?></table>
</p>
</div>
<button id="opener">Open Dialog</button>
</body>
</html>
Database Class: db.php
you can download full project from here: http://1drv.ms/OzfdH4
just edit database details in db.php
check updated link