Cloud Stack Ninja

ive been finishing a school project which needs to get a response from a server so ive written some php code. Ive got everything to align up with tables but when I implement it, I get a Giant gap in code. Has anyone seen this before, I know its the tabs causing this but idk why they keep messing it up, ive tried to move them, but everything in them and more with no luck. below is the outcome of this code,

thank you for your help. Code’s outcome

<?php

  // create short variable names
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$address = $_POST['address'];
$city = $_POST['city'];
$zip = $_POST['zip'];
$state = $_POST['state'];
$outdate = $_POST['outdate'];
$indate = $_POST['indate'];
$numberofpeople = $_POST['numberofpeople'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$cardtype = $_POST['cardtype'];
$cardnum = $_POST['cardnum'];
$specialrequests = $_POST['specialrequests'];

  $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
?>
<html>
<body>
<?php
//displays what the user put in the form by using the vairables
 echo "<table>";
 echo '<h1>Thank you '.$fname.' '.$lname.' for your Reservation</h1><br>';
echo 'The following is the infomation you entered:<br></tr>';
echo "<tr><td>Number & Street</td><td>$address</td><br/</tr>"; 
echo "<tr><td>City</td><td>$city</td><br></tr>"; 
echo "<tr><td>ZipCode</td><td>$zip</td><br></tr>"; 
echo "<tr><td>State</td><td>$state</td><br></tr>"; 
echo "<tr><td>Check-In Date</td><td>$indate</td><br></tr>"; 
echo "<tr><td>Check-out Date</td><td>$outdate</td><br></tr>"; 
echo "<tr><td>Number of People</td><td>$numberofpeople</td><br></tr>"; 
echo "<tr><td>Phone</td><td>$phone</td><br></tr>"; 
echo "<tr><td>Email</td><td>$Email</td><br></tr>"; 
echo "<tr><td>Card-Type</td><td>$cardtype</td><br></tr>"; 
echo "<tr><td>Card-Number</td><td>$cardnum</td><br></tr>"; 
echo "<tr><td>Special Requests</td><td>$specialrequests</td><br></tr>"; 
echo  "</table>";
?>
</body>
</html>



Read more here: https://stackoverflow.com/questions/64409631/php-tables-causing-issues

Content Attribution

This content was originally published by Andrew Steven at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: