Jump to content

hushtalk

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

hushtalk's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. yes i changed it to this $postedcontent=$_POST["content"]; $postedtxt = htmlspecialchars_decode($postedcontent, ENT_QUOTES); mysql_query("INSERT INTO blog(title, content, date, source, source_link,picture) VALUES('$data[title]','$postedtxt','$data[date]','$data[source]','$data[source_link]','$data[picture]')") or die(mysql_error()); and if($thatblog==""){ $position=50; // Define how many character you want to display. $post = substr($blogrow['content'], 0, $position); echo $post; echo "..."; ?><br/><br/><br/> <strong><a href="blog.php?blogid=<? echo $blogrow['id'] ?>&article=<? echo $blogrow['title'] ?>" style="text-decoration:none;color:#090"><em><br/> go to post</em></a></strong> <? }else{ $con = wordwrap($blogrow['content'], 64); echo $con; } the result is i can now use tags , even embed etc
  2. all done and sorted and most of all working,.. i can now add tags to posts and with no weird signs showing this is actually the first time on a forum like this that people take time to explain to make me understand so its easy for me to figure it out myself usually or they ignore my posts or they just give me the code!
  3. so i have to use html_entity_decode before posting to the database right? and afterwards with more code allow some tags and convert? that makes sence to me.. thank you!
  4. that bit i pasted out the login script i downloaded somewhere,.. i guess that could be left out i think its a jquery function if i leave that bit out i could just enter the values with $POST
  5. i hope you dont mind getting deeper into this the data gets entered via a simple form then insertted with this code : foreach($_POST as $key => $value) { $data[$key] = filter($value); } mysql_query("INSERT INTO blog(title, content, date, source, source_link,picture) VALUES('$data[title]','$data[content]','$data[date]','$data[source]','$data[source_link]','$data[picture]')") or die(mysql_error()); then the output is like this $thatblog = $_GET['blogid']; if($thatblog==""){ $position=50; // Define how many character you want to display. $post = substr($blogrow['content'], 0, $position); $txt=html_entity_decode($post); echo $txt; echo "..."; ?><br/><br/><br/> <strong><a href="blog.php?blogid=<? echo $blogrow['id'] ?>&article=<? echo $blogrow['title'] ?>" style="text-decoration:none;color:#090"><em><br/> go to post</em></a></strong> <? }else{ $con = wordwrap($blogrow['content'], 64); //$html = htmlspecialchars($utf8_string, ENT_COMPAT, 'UTF-8'); $txt=html_entity_decode($con); echo $txt; }
  6. hmm.. maybe i will have to play around with both now i got it workin, now i figured that when i want something in bold for example i will have to add tags, like <b></b> for example,.. now with entity decode that wont work anymore ofcourse so in the submit entry form i suppose i will have to use htmlentuty first? then decode again for print?
  7. no, same problem,.. but... i done some googling again, and together with your suggestion i found html_entity_decode() and that works!! so thank you! btw what is the difference between both?
  8. hi all i am new here, i was looking for some help as im stuck with something i have given myself the task to make a blog script all is going fine untill this: i go to mysql to fill in the form from there i put this text: this is what i get when i print it i use this to print it out $con = wordwrap($blogrow['content'], 64); echo $con; $con is the content when i use a form to print the same its even worse,.. then it actually puts even weirder input in the database any help on this please i think i almost looked all over google but what i found i can hardly understand lol
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.