Hello Guys,
May Be I am wrong to this space but I need yur little help in this regard.I tried running this PHP script but need to modify as per my requirement:
Code:
<?php
$con = mysql_connect("localhost","root","mysql123");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}mysql_select_db("petp", $con);
$query= "select * from task where Project='" . $_POST['Project'] . "'";
//echo $query;
$result= mysql_query($query);
$num_results = mysql_num_rows($result);
for ($i=0; $i <$num_results; $i++)
{
$row = mysql_fetch_array($result);
echo "Project: ", $row['Project'], ": ",$row['Project'];
echo "List of Task: ", $row['List'], ": ",$row['List'];
echo "Assigned To: ", $row['Assigned'], ": ",$row['Assigned'];
echo "Start Date: ", $row['Start'], ": ",$row['Start'];
echo "End Date: ", $row['End'], ": ",$row['End'];
echo "Completion Percent: ", $row['Completion'], ": ",$row['Completion'];
}
?>
This displays the following output on Web Broswer:
Project: gice: giceList of Task: : Assigned To: Select: SelectStart Date: 0000-00-00: 0000-00-00End Date: 0000-00-00: 0000-00-00Completion Percent: : Project: gice: giceList of Task: : Assigned To: Select: SelectStart Date: 0000-00-00: 0000-00-00End Date: 0000-00-00: 0000-00-00Completion Percent:
It is throwing the following way but I want to be displayed in the tables in rows and columns.
Pls Help.