Jump to content

GingerRobot

Staff Alumni
  • Posts

    4,082
  • Joined

  • Last visited

Everything posted by GingerRobot

  1. What are you trying to achieve? You want to (re)load a page in one frame, during which another frame's content is changed via a PHP include? You can't do that. I *guess* you could reload the page that defines the frameset with some parameters passed in the URL, but that's pretty messy (plus it requires all the frames to be re-loaded). Alternatively, you could use some javascript. Maybe if you explain what it is you're trying to do, we could suggest a better method.
  2. I'd still suggest using the serialization functions. This is, afterall, what the functions are for.
  3. Two things...firstly, you would get a "failed" image icon if you do this kind of thing; what you're displaying isn't a valid image so it can't be displayed. Second, you'd need to change the extension of the php file to, say, .png and then configure your webserver to parse files with the extension .png as php files.
  4. Well if you just wanted to check the extension you could use strrpos to find the last occurence of a '.' and then use substr to check what comes after the dot for valid extensions. However, if you want to ensure it's actually an image, you're best bet would probably be to try and open it using the GD library. Otherwise, someone could fake an extension and have some php code running on your site, for example.
  5. Your question isn't very clear. Are you concerned about unique/'pretty' URLs for SEO reasons? If you're running an apache server, mod_rewrite is your friend.
  6. Care to share which bits are working and which bits aren't?
  7. To make a checkbox checked, you need to set the attribute checked to "checked": <input type="checkbox" checked="checked" /> I wrote a tutorial on working with checkboxes which can be found here: http://www.phpfreaks.com/tutorial/working-with-checkboxes-and-a-database
  8. At first glance, the characters at the end look like some form of token. Try either: not following the redirects, or: allowing cookies to be set.
  9. It's been tried in the past. We used to have a dedicated OO PHP board, for example. It was dropped for various reasons, including the fact that people regularly posted in the wrong place. In any case, unless there was demand for a board of this nature (and my demand, I mean a number of posts fitting into that category) it'd seem a touch pointless creating one.
  10. Or head here http://www.phpfreaks.com/forums/index.php?action=profile;area=theme and tick the box that says "Return to topics after posting by default."
  11. As the manual page says, this 'flavour' of regular-expression (pattern matching) functions have been depreciated in favour of the PCRE ones (see here) as of PHP version 5.3. Of course, if you're using a third party script, you may wish to simply turn off the display of E_DEPRECIATED notices using the display_errors function or changing the value in php.ini. However, you might be wise to find an alternative to this script; it is obviously out-dated if it is relying on depreciated elements, so who knows what other problems exist. Further, the functions that are currently depreciated will be removed in PHP 6, so the 'solution' isn't a long-term one.
  12. This means there is a problem with your query and mysql_query() has returned false. You should add some debugging code to your call to mysql_query(): $result = mysql_query($sql) or trigger_error(mysql_error() . "<br> Query was: " . $sql , E_USER_ERROR);
  13. Well PHP supports sockets, so couldn't you have the C-code listening in on a socket and have PHP connect to it?
  14. So I'm writing a Java app which will require the use of a relational database. Probably 2-3 tables and something up to around 25k rows in total. I was just wondering if anyone has any experience of using a database with a Java app? Is Java DB adequate? Or would I be better off with JBDC and SQLlite/MySQL? Thanks in advance for any suggestions, Ben
  15. Those quotes aren't normal quotes. They appear to my the microsoft "smart" ones. You could convert them to standard quotes. For example, see: http://shiflett.org/blog/2005/oct/convert-smart-quotes-with-php
  16. Can you define "doesn't work?" What happens? Do you get any errors? What output does it produce? What output are you expecting?
  17. If you have a syntax error and PHP can't parse the page, then setting the error_reporting level and turning on the displaying of errors at runtime will have no effect. See the comments on my tutorial:http://www.phpfreaks.com/tutorial/debugging-a-beginners-guide
  18. Do you have error_reporting(including notices) turned on? It could be that you've mistyped a variable name. Or perhaps the username has a quote mark in it? If you're using string variables in the value field, you should run them through htmlentities to ensure you don't end up closing the value tag with a quote mark that is in the variable.
  19. Ok, well you'll need to be using regular expressions. There's some introductory material in the tutorial section of this website (http://www.phpfreaks.com/tutorial/regular-expressions-part1---basic-syntax), but if you were to google for some tutorials for implementing BB codes, you'd find exactly what you need.
  20. It's effectively a simple, one-way PM system, right? You want to send "messages" to a user when something happens and have them be notified of these "messages" until they've read them.
  21. Using MySQL? Use mysql_real_escape_string
  22. Couldn't you use PHPMyAdmin? Or are you talking more about content management and basically need a real light CMS?
  23. This isn't PHP i'm afraid. You're looking for a Perl forum! I'll move this over to the "Other Programming Languages" section -- you might get a reply there.
×
×
  • 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.