EagleAmerican Posted August 7, 2007 Share Posted August 7, 2007 For some reason, the edit field gets messed up when editing if there is HTML in the data. How can I fix this and also how can I make the fields for parasitedescription and parasiteremoval bigger to like 3 lines in height? <fieldset><legend>Parasite Edit</legend> <form method="post" action="<?php $_SERVER['PHP_SELF']; ?>"> <br /> <br /> <br /> <table width="200" border="1"> <tr> <td><input type="hidden" name="id" value="<?php echo $data['id']; ?>" /> Parasitename:</td> <td><input type="text" name="parasitename2" value="<?php echo $data['parasitename']; ?>" /></td> </tr> <tr> <td>Parasitefrom:</td> <td><input type="text" name="parasitefrom2" value="<?php echo $data['parasitefrom']; ?>" /></td> </tr> <tr> <td>Parasitegenre:</td> <td><input type="text" name="parasitegenre2" value="<?php echo $data['parasitegenre']; ?>" /></td> </tr> <tr> <td>Parasitedescription:</td> <td><input type="text" name="parasitedescription2" cols="3" value="<?php echo $data['parasitedescription']; ?>" /></td> </tr> <tr> <td>Parasiteremoval:</td> <td><input type="text" name="parasiteremoval2" cols="3" value="<?php echo $data['parasiteremoval']; ?>" /></td> </tr> <tr> <td> </td> <td><input type="submit" value="Submit" name="parasiteedit" /></td> </tr> </table> <br /> <br /> </form> </fieldset> Screenshot also attached. Thanks so much, Adam [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/63762-solved-fields/ Share on other sites More sharing options...
EagleAmerican Posted August 7, 2007 Author Share Posted August 7, 2007 *Bump* Please this is really important and really is appreciated! Thanks, Adam Link to comment https://forums.phpfreaks.com/topic/63762-solved-fields/#findComment-317836 Share on other sites More sharing options...
nuttycoder Posted August 7, 2007 Share Posted August 7, 2007 to make input fields bigger you should use textareas rather then input so then you can specify how many rows you want will change the height. example <textarea name="parasitedescription" cols="30" rows="3"></textarea> to remove harmful html use htmlspecialchars htmlspecialchars — Convert special characters to HTML entities this would turn script into <script> for example $parasitedescription = htmlspecialchars($parasitedescription); Hope this helps. Link to comment https://forums.phpfreaks.com/topic/63762-solved-fields/#findComment-317852 Share on other sites More sharing options...
EagleAmerican Posted August 7, 2007 Author Share Posted August 7, 2007 Thank you so much for your response. Will the htmlspecialschars convert it back? Because the view.php file that I am using needs to parse the HTML for the download links, etc. Thanks, Adam Link to comment https://forums.phpfreaks.com/topic/63762-solved-fields/#findComment-317863 Share on other sites More sharing options...
nuttycoder Posted August 7, 2007 Share Posted August 7, 2007 no I belive its one way conversion. How does your edit section get messed up with html? Link to comment https://forums.phpfreaks.com/topic/63762-solved-fields/#findComment-317867 Share on other sites More sharing options...
EagleAmerican Posted August 7, 2007 Author Share Posted August 7, 2007 Take a look at the screenshot from my original post. This might fix it.. let me give it a shot. Thanks again, Adam Link to comment https://forums.phpfreaks.com/topic/63762-solved-fields/#findComment-317868 Share on other sites More sharing options...
EagleAmerican Posted August 7, 2007 Author Share Posted August 7, 2007 Thanks so much! It worked. It just overflowed the imput and needed a textarea.. thanks! Thanks, Adam Link to comment https://forums.phpfreaks.com/topic/63762-solved-fields/#findComment-317872 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.