Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
$result = mysql_query("SELECT * FROM person
WHERE FirstName='$FirstName'");
$result = mysql_query("SELECT * FROM person
WHERE FirstName='[red]" . $FirstName . "'"[/red]);
$result = mysql_query("SELECT * FROM person
WHERE FirstName='{$_SESSION['Firstname']}'");
<?php
if (mysql_num_rows($result) > 0){
echo "<table border=\"1\">\r\n";
while ($row = mysql_fetch_assoc($result)){
//start the row
echo "\t<tr>\r\n";
//if this is the first row, then print the fieldnames
if (empty($flag)){
foreach ($row as $field=>$value){
echo "\t\t<th>$field</th>\r\n";
}
//set the flag to stop the fieldnames from printing again
$flag = true;
// restart the row
echo "\t</tr>\r\n\t<tr>\r\n";
}
//start the actual data
foreach ($row as $field=>$value){
echo "\t\t<td>$value</td>\r\n";
}
//end the row
echo "\t</tr>\r\n";
} //end the while loop
echo "</table>\r\n";
} else {
echo "No Data found";
}
?>
<?php
if (mysql_num_rows($result) > 0){
echo "<table border=\"1\">\r\n";
while ($row = mysql_fetch_assoc($result)){
foreach ($row as $field=>$value){
//start the row
echo "\t<tr>\r\n";
//start the actual data
echo "\t\t<td>$field</td><td><input type=\"text\" name=\"$field\" value=\"$value\" /></td></tr>\r\n";
echo "\t</tr>\r\n";
}
} //end the while loop
echo "</table>\r\n";
} else {
echo "No Data found";
}
?>