PHP URL Generation
I have a set of data being returned to a table using PHP and MySQL and I would like to put a link at the end of this data using elements from the row to build the link with some static elements.
i.e. $urlStart/name-installer-date-email-gno$urlEnd
<tr>
<th>Installer Ref:</th>
<th>Fitter</th>
<th>Guarantee</th>
<th>Equipment</th>
<th>Installed</th>
<th>Options</th>
</tr>
</开发者_高级运维thead>
<?php
$i=0;
while ($i < $num) {
/* $f1=mysql_result($result,$i,"installer"); */
$f2=mysql_result($result,$i,"fitter");
$f3=mysql_result($result,$i,"guarantee_no");
$f4=mysql_result($result,$i,"equipment");
$f5=mysql_result($result,$i,"certificate_no");
$f6=mysql_result($result,$i,"install_date");
?>
<tbody>
<tr>
<td><?php echo $f5; ?></td>
<td><?php echo $f2; ?></td>
<td><?php echo $f3; ?></td>
<td><?php echo $f4; ?></td>
<!-- <td><?php echo $f5; ?></td> -->
<td><?php echo $f6; ?></td>
$link = "$urlStart/name-$f6-$email-$f3$urlEnd";
精彩评论