[thelist] Re: php/mysql and form input...sorta

David Kutcher david_kutcher at hotmail.com
Fri Aug 16 13:11:01 CDT 2002


"Roger Harness" <magic32 at jps.net> wrote:

> echo "<form>\n";
> echo "<table>\n";
> echo "<tr>\n";
> echo "<td>";
> echo ($i+1).". Description:</td>\n ";
> echo "<td>";
> echo htmlspecialchars( stripslashes($row["descr"]));
> echo "</td>\n";
> echo "</tr>\n";
> echo "<tr>\n";
> echo "<td>";
> echo "Style</td>\n";
> echo "<td>";
> echo "<input type=text value=".stripslashes($row["style"]).'>';
> echo "</td>\n";
> echo "</td>\n";

Roger... you might want to consider cleaning up the code and making it
easier for yourself by doing the following instead:

?>
<form>
<table>
<tr>
<td><?=$i+1 ?>. Description</td>
<td><?=htmlspecialchars( stripslashes($row["descr"])) ?></td>
</tr>
<tr>
<td>Style</td>
<td><input type=text value="<?=stripslashes($row["style"]) ?>></td>
</tr>
</table>

it just makes it so much nicer to code, read, etc.  oh, and it's also
faster.

David
www.confluentforms.com




More information about the thelist mailing list