Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. EXACTLY. That's what you want! You want to know how many characters are there, excluding HTML. SO STRIP THE HTML AND COUNT IT. You'd need to make the same change to your JS counter. If the problem is that your field is too small, then you need to communicate that to the users, that they can't insert more than X chars INCLUDING HTML.
  2. Yeah you need a valid dir. Users can easily edit cookie data, and if they have cookies blocked, your sessions won't work.
  3. Post your new code which uses the technique I showed you.
  4. Did you even read what I wrote for you? That will check how long the text is without the HTML in it. Then you can still use the text which HAD HTML and store that.
  5. Please use code tags, not quotes. Turn on error_reporting and you will see the error. If you don't have access to php.ini just add error_reporting(E_ALL); at the top of your script.
  6. sessions don't last between subdomains - are you going from www.domain.com to domain.com (no www?) try placing print_r($_SESSION); on both pages?
  7. Hit reply, paste your code, highlight it and press the # button in the editor.
  8. $text = $_POST['text']; $noHTML = strip_tags($text); print strlen($noHTML);
  9. Is that really all that's on page2? If there is still more code, a blank page could mean you have a fatal error, but don't have error reporting on.
  10. No. Do it exactly like artacus posted. No echo. Any code after a redirection will not be run. You also need to stop putting more than one statement per line, that's going to get confusing. in this case it looks like header() will be the last line of code.
  11. Well, if you want it to redirect instead of print out text, put it where you now have it printing out text.
  12. Where you want it to redirect. The header() tells it to go to the Location:
  13. We'd need to see the code. The HTML form (just the form please!) and the processing PHP code. Make sure to highlight your code and hit the # button to put it in code tags.
  14. The php.net manual also shows examples of sending HTML email: http://us3.php.net/manual/en/function.mail.php
  15. You'll probably need to use a regular expression, or just search for the strpos of "sunrise" and then get the substring which is the the next X characters.
  16. If you have their user id associated with those uploads, just DELETE FROM uploads WHERE userid = '$id'
  17. Do this: $time = strtotime ($row['ts19']); if($time){ echo ' <td><div align="center">' . date ('m-d-Y', $time) . "</div></td>\n"; }else{ echo ' <td>'.$time.'</td>\n"; } What's it printing in those wrong ones? It should be nothing, or 0, right? Try changing the if to: if($time > 0){
  18. $time = strtotime ($row['ts19']); if($time){ echo ' <td><div align="center">' . date ('m-d-Y', $time) . "</div></td>\n"; }else{ echo ' <td> </td>\n"; }
  19. Why are you writing C Libraries for a PHP program? It seems like the PHP programmers should be making their library in PHP. I don't believe PHP can access C this way...
  20. it's likely stop caching - but a more reliable method would be to use the current timestamp as it will never repeat. This is a javascript question, btw.
  21. Read the topic about header errors. Is there spaces before your <?php
  22. You'll always have to include the files, but yes you can define your own functions. What's wrong with our tutorials? http://www.phpfreaks.com/tutorials/26/0.php
  23. sounds like php wasn't configured with mysql. http://us3.php.net/manual/en/ref.mysql.php
×
×
  • 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.