dennismonsewicz Posted May 8, 2008 Share Posted May 8, 2008 echo "<div class='editor' style='text-align: center'>"; echo "<p class='editortitle' style='font-size: 175%; padding: 4px 0px 4px 0px; margin: 0px;'>Welcome Letter</p> <textarea cols='80' rows='25' name='welcome'>" . $row['welcome'] . "</textarea>"; echo "</div>"; The following code above should work right? In the database there is html tags, could this cause the content to not load? Quote Link to comment Share on other sites More sharing options...
DeanWhitehouse Posted May 8, 2008 Share Posted May 8, 2008 what are the HTML tags in the database? also try this ?> <div class="editor" style="text-align: center"> <p class="editortitle" style="font-size: 175%; padding: 4px 0px 4px 0px; margin: 0px;">Welcome Letter</p> <textarea cols="80" rows="25" name="welcome"><?php echo"" . $row['welcome'] . ""; ?></textarea> </div> <?php Quote Link to comment Share on other sites More sharing options...
dennismonsewicz Posted May 8, 2008 Author Share Posted May 8, 2008 <p> and <font> Quote Link to comment Share on other sites More sharing options...
DeanWhitehouse Posted May 8, 2008 Share Posted May 8, 2008 they shouldn't affect it , are they closed? Quote Link to comment Share on other sites More sharing options...
dennismonsewicz Posted May 8, 2008 Author Share Posted May 8, 2008 yes they are closed. and I tried your code and it didn't work and your code should've been this: <?php echo $row['welcome'];?> Quote Link to comment Share on other sites More sharing options...
DeanWhitehouse Posted May 8, 2008 Share Posted May 8, 2008 ok, soz, i am still learning. Is it just the content not loading? Quote Link to comment Share on other sites More sharing options...
dennismonsewicz Posted May 8, 2008 Author Share Posted May 8, 2008 yeah, i don't understand why its not loading. Everywhere I have looked (using google) suggests exactly what I am doing. Now I am using tinymce to handle my textareas but that shouldn't matter Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted May 8, 2008 Share Posted May 8, 2008 assuming you are retrieving a record and there is a field called welcome with data in it, try: htmlspecialchars($row['welcome'], ENT_QUOTES); Quote Link to comment Share on other sites More sharing options...
dennismonsewicz Posted May 8, 2008 Author Share Posted May 8, 2008 that didn't work what does the ENT_QUOTES do? Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted May 8, 2008 Share Posted May 8, 2008 are you certain that 1. you are getting a record, 2. that record has a field called welcome, and 3. that field is not empty? i'd bet that one of those items is not true. http://us3.php.net/htmlspecialchars Quote Link to comment Share on other sites More sharing options...
dennismonsewicz Posted May 8, 2008 Author Share Posted May 8, 2008 I just echoed $row['welcome'] and it retrieved the file out of the database Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted May 8, 2008 Share Posted May 8, 2008 can we see more of the latest code? Quote Link to comment Share on other sites More sharing options...
dennismonsewicz Posted May 8, 2008 Author Share Posted May 8, 2008 $allowedTags='<p><strong><em><u><h1><h2><h3><h4><h5><h6><img>'; $allowedTags.='<li><ol><ul><br><ins><del>'; $sContent = strip_tags(stripslashes($row['welcome']),$allowedTags); echo "<div class='editor' style='text-align: center'>"; echo "<p class='editortitle' style='font-size: 175%; padding: 4px 0px 4px 0px; margin: 0px;'>Welcome Letter</p> <textarea cols='80' rows='25' name='welcome'>" . $sContent . "</textarea>"; echo "</div>"; Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted May 8, 2008 Share Posted May 8, 2008 where is $row['welcome'] set? Quote Link to comment Share on other sites More sharing options...
dennismonsewicz Posted May 8, 2008 Author Share Posted May 8, 2008 $id = $_GET['id']; $query = mysql_query("SELECT * FROM issues WHERE ezine_id = '$id'") or die("ERROR: " . mysql_error()); $row = mysql_fetch_array($query); Quote Link to comment Share on other sites More sharing options...
dennismonsewicz Posted May 8, 2008 Author Share Posted May 8, 2008 bump Quote Link to comment Share on other sites More sharing options...
dennismonsewicz Posted May 8, 2008 Author Share Posted May 8, 2008 Funny story... I did a hard refresh and the content loaded into the textarea very wierd Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.