Skip to content

Instantly share code, notes, and snippets.

@incubs
Created December 30, 2016 02:55
Show Gist options
  • Save incubs/136355e6f70e2b7e91df4d5aa4129a52 to your computer and use it in GitHub Desktop.
Save incubs/136355e6f70e2b7e91df4d5aa4129a52 to your computer and use it in GitHub Desktop.
Table
<?php
//echo '<pre>';
//print_r( $_POST);
//die;
?>
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<title>
Message
</title>
</head>
<body>
<?php if (isset($_POST["info"])) { ?>
<div class="container">
<table class="table-condensed table-hover table-bordered" >
<tr>
<th>Name</th>
<th>Email</th>
<th>Message</th>
<th>Gender</th>
<th>Hobbies</th>
</tr>
<tr>
<td><?php echo $_POST["name"];?></php></td>
<td><?php echo $_POST["email"];?></php></td>
<td><?php echo $_POST["message"];?></php></td>
<td><?php if (!empty($_POST['gender']))
{
echo $_POST["gender"];
}?></php></td>
<td><?php
if (!empty($_POST['hobbie']))
{
echo implode(', ', $_POST['hobbie']);
}
?></php></td>
</tr>
</table>
</div>
<?php }?>
<?php if (isset($_POST["cinfo"])) { ?>
<div class="container">
<table class="table-striped table-condensed" >
<tr >
<th>Name</th>
<th>Email</th>
<th>Message</th>
<th>Gender</th>
<th>Hobbies</th>
</tr>
<tr>
<td><?php echo $_POST["cname"];?></php></td>
<td><?php echo $_POST["cemail"];?></php></td>
<td><?php echo $_POST["cmessage"];?></php></td>
<td><?php if (!empty($_POST['cgender']))
{
echo $_POST["cgender"];
}?></php></td>
<td><?php
if (!empty($_POST['chobbie']))
{
foreach($_POST["hobbie"] as $chobbie)
{
echo $chobbie;
}
}
?></php></td>
</tr>
</table>
</div>
<?php }?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment