I have the following code with a small form in it. The form is fine when on its' own but doesn't show up when combined with the PHP code. Suggestions anyone??
Thanks!!
<?php
$username="root ";
$password="woot s";
$database="text ";
$id=$_GET['id'];
mysql_connect(l ocalhost,$usern ame,$password);
@mysql_select_d b($database) or die( "Unable to select database");
$query="SELECT * FROM trc_text where id='$id'";
$result=mysql_q uery($query);
$num=mysql_numr ows($result);
mysql_close();
$i=0;
while ($i < $num) {
$text=mysql_res ult($result,$i, "text");
?>
<form action="updated _text.php" method="post">
<input type="hidden" name="ud_id" value="<?php echo $id; ?>">
Text: <input type="text" name="ud_text" value="<?php echo $text; ?>"><br>
<input type="Submit" value="Update">
</form>
<?php
++$i;
}
?>
Thanks!!
<?php
$username="root ";
$password="woot s";
$database="text ";
$id=$_GET['id'];
mysql_connect(l ocalhost,$usern ame,$password);
@mysql_select_d b($database) or die( "Unable to select database");
$query="SELECT * FROM trc_text where id='$id'";
$result=mysql_q uery($query);
$num=mysql_numr ows($result);
mysql_close();
$i=0;
while ($i < $num) {
$text=mysql_res ult($result,$i, "text");
?>
<form action="updated _text.php" method="post">
<input type="hidden" name="ud_id" value="<?php echo $id; ?>">
Text: <input type="text" name="ud_text" value="<?php echo $text; ?>"><br>
<input type="Submit" value="Update">
</form>
<?php
++$i;
}
?>
Comment