loxinthe
January 2nd, 2008, 11:06
Ok I have this form here, but whenever it pulls the data from the database, it will not accept anything after a *space*. Anyone know why and how to fix it?
<?
$id=$_POST['id'];
$title=$_POST['title'];
$pic=$_POST['pic'];
$description=$_POST['description'];
$expire=$_POST['expire'];
$valid=$_POST['valid'];
?>
<form ENCTYPE="multipart/form-data" method="post" action="editdb.php">
<table bgcolor=#ffffcc align=center>
<tr>
<td colspan=2><strong>Fill out this form to edit this special on the web site</strong></td></tr>
<tr>
<td>
<input type="hidden" name="id" value="<?echo $id;?>"> Title:</td><td><input type="text" size=25 name="title" value="<?echo $title;?>">
</td>
</tr>
<tr>
<td>
Image:</td><td><input type="file" name="pic" value="<? echo $pic;?>">
<input type="hidden" name="pico" value="<?echo $pic?>">
</td>
</tr>
<tr>
<td>
Description:</td><td><textarea height="30" name="description"><? echo $description; ?></textarea>
</td>
</tr>
<tr>
<td>
Expiration:</td><td align=center>
<input type="text" size=25 name="expire" value="<?echo $expire;?>">
</td>
</tr>
<tr>
<td>
Valid with other offers?:</td>
<td>
<input type="radio" name="valid" value="yes" <? if ($valid=="yes"){echo "checked";} ?>> Yes<br>
<input type="radio" name="valid" value="no" <? if ($valid=="no"){echo "checked";} ?>> No
</td>
</tr>
<tr><td colspan=2 align=center><input type=submit name="send" value="Submit"></td></tr>
</table>
</form>
</td>
</tr>
</table>
<?
$id=$_POST['id'];
$title=$_POST['title'];
$pic=$_POST['pic'];
$description=$_POST['description'];
$expire=$_POST['expire'];
$valid=$_POST['valid'];
?>
<form ENCTYPE="multipart/form-data" method="post" action="editdb.php">
<table bgcolor=#ffffcc align=center>
<tr>
<td colspan=2><strong>Fill out this form to edit this special on the web site</strong></td></tr>
<tr>
<td>
<input type="hidden" name="id" value="<?echo $id;?>"> Title:</td><td><input type="text" size=25 name="title" value="<?echo $title;?>">
</td>
</tr>
<tr>
<td>
Image:</td><td><input type="file" name="pic" value="<? echo $pic;?>">
<input type="hidden" name="pico" value="<?echo $pic?>">
</td>
</tr>
<tr>
<td>
Description:</td><td><textarea height="30" name="description"><? echo $description; ?></textarea>
</td>
</tr>
<tr>
<td>
Expiration:</td><td align=center>
<input type="text" size=25 name="expire" value="<?echo $expire;?>">
</td>
</tr>
<tr>
<td>
Valid with other offers?:</td>
<td>
<input type="radio" name="valid" value="yes" <? if ($valid=="yes"){echo "checked";} ?>> Yes<br>
<input type="radio" name="valid" value="no" <? if ($valid=="no"){echo "checked";} ?>> No
</td>
</tr>
<tr><td colspan=2 align=center><input type=submit name="send" value="Submit"></td></tr>
</table>
</form>
</td>
</tr>
</table>