I am saving to a text file using the fwright command, all the info saves ok but how can I get the data in the text file to have a space in-between each variable
<table width="590" border="1">
<tr>
<td width="129">Name </td>
<td width="335"><?php echo $_POST["name"]; ?></td>
</tr>
<tr>
<td>Account Number</td>
<td><?php echo $_POST["accno"]; ?></td>
</tr>
<tr>
<td>Date and Time</td>
<td><?php echo $_POST["dt"]; ?></td>
</tr>
<tr>
<td height="45">Lengh of Visit </td>
<td><?php echo $_REQUEST["lvisit"]; ?></td>
</tr>
<td height="45">Reason For call</td>
<td><?php echo $_REQUEST["rcall"]; ?></td>
</tr>
</tr>
<td height="45">Cost of Extra Medication</td>
<td><?php echo $_REQUEST["com"]; ?></td>
</tr>
</table>
<br />
<?php
$name=$_REQUEST['name'];
$accno=$_REQUEST['accno'];
$dt=$_REQUEST['dt'];
$lvisit =$_REQUEST['lvisit'];
$rcall =$_REQUEST['rcall'];
$com =$_REQUEST['com'];
$fp = fopen("data.txt", 'ab');
fwrite($fp,$name);
fwrite($fp,$accno);
fwrite($fp,$dt);
fwrite($fp,$lvisit);
fwrite($fp,$rcall);
fwrite($fp,$com);
fclose($fp);
?>