thanks jay, but I dont know how to do that, I tried the bow code but no result.
- <html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready( function(){
$("#btn").click(function (){
$.post("result.php",{txtBox: frm.txtbox.value},
function(str){
//str= str.split(' ');
$("#feedback").html(str[0]).show();
});
});
});
</script>
</head>
<body>
<form name="frm">
<input type="text" name="txtbox" id="txt"/>
<input type="button" value="Press Me" id="btn" />
</form>
<table id="tbl" border="1">
<div id="feedback"></div>
</table>
</body>
</html>
- <?php
/**
* @author Naveed
* @copyright 2012
*/
$txtBox = $_POST['txtBox'];
$str = explode(" ",$txtBox);
echo '<tr>';
for ($i=0;$i<=count($str);$++)
{
echo '<td>$str[i]</td>';
}
echo '</tr>';
?>