GingerRobot
-
Posts
4,082 -
Joined
-
Last visited
Posts posted by GingerRobot
-
-
I'd still suggest using the serialization functions. This is, afterall, what the functions are for.
-
well for example how do i go about not showing this..
[*img]http://www.google.com[/img]"
currently its trying to actually show the page as an image... (showing a failed image icon) but if this page was a .php page they could easily do pretty much anything they wanted.
i mean i just now tried it on this forum and it doesnt allow it.
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.
-
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.
-
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.
-
...and I can get certain parts working but not others...
Care to share which bits are working and which bits aren't?
-
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
-
Does your browser allow cookies to be set?
-
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.
-
i mean sub-categories in php. php helping completely very active forum thus some interesting topics can be missed out. categorizing shall help to solve this problem.
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.
-
2. When you go to reply check the box that says "Return to this topic." - quick reply automatically does this.
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."
-
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.
-
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);
-
Well PHP supports sockets, so couldn't you have the C-code listening in on a socket and have PHP connect to it?
-
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
-
Heh, must be new.
-
example :
sams’s “whip lash” performances changes to sam’s “whip lashâ€� performances
vineet
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
-
Can you define "doesn't work?" What happens? Do you get any errors? What output does it produce? What output are you expecting?
-
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
-
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.
-
There's still my issue on how to parse attributes in custom tags.
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.
-
I was thinking something like when the user posts a comment it would put a 0 into the database and when you load the page up it would go to 1, I was thinking that but what if there was 2 new comments ? What would be the best way to do this??
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.
-
Using MySQL? Use mysql_real_escape_string
-
My website is database driven and I am very tired of manually making queries to my tables in order to update my site
Couldn't you use PHPMyAdmin? Or are you talking more about content management and basically need a real light CMS?
-
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.
How do I load a page using a PHP function?
in PHP Coding Help
Posted
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.