Topic: PHP Help

Hello everyone,

I decided to make some random site today, here's the result.
http://www.omgultime.com/

Here's an example of what is creates:
http://www.omgultime.com/archives.php?id=43

Here's the questions:
When there is " in the textarea, it comes up with an error on the next screen, try it for yourself if you don't understand.
http://www.omgultime.com/create.php

Anyone would know how to fix this?

Thanks!
-ultime

Re: PHP Help

Worked for me although the " changed into an /...   I assume you have fixed this by now?
Anyway > http://www.omgultime.com/archives.php?id=52 < might wanna delete that wink

Re: PHP Help

I have added "htmlspecialchars" but I have no idea how to really use them.. Not sure if it fixed the problem.

4

Re: PHP Help

ultime wrote:

I have added "htmlspecialchars" but I have no idea how to really use them.. Not sure if it fixed the problem.

"htmlentities" is sort of like htmlspecialchars. Could work better possibly.

http://ca3.php.net/htmlentities

Re: PHP Help

maybe you want add and strip slashes

Re: PHP Help

get it to change " to " when parsing.

Re: PHP Help

shinko_metsuo wrote:

get it to change " to " when parsing.

How could this be done?

Re: PHP Help

Try this


$content = stripslashes($page['content']);
echo $content;


Replace stuff where it should be...

Indocron
$theQuestion = (2*b) || !(2*b);

9

Re: PHP Help

Does anyone know a php function to make a string such as
THE BIG HOUSE WAS FUNNY LOOKING into
The Big House Was Funny Looking
or even
the big house was funny looking into
The Big House Was Funny Looking

Thanks

Re: PHP Help

ucwords ... the php online manual is one of the best I've used, and I really recommend you to get into the way it works, as it solves alot of problems ... when I do php I usually has the manual open in a browserwindow ... to see how each function exist ... and I often find one function, and on the 'related' functions I find what I'm looking for ...  (like this example, I looked at the strtolower function page, and ucwords function was linked in the 'related' list)

Re: PHP Help

Or download the Document thingy. Its a .chm file that has the entire PHP.net documentation (without the comments, of course).

http://us3.php.net/get/php_manual_chm.zip/from/a/mirror

Indocron
$theQuestion = (2*b) || !(2*b);

Re: PHP Help

not worth it really is it when the site is so fast

Re: PHP Help

It is when your internet is disconnected at 8pm, and almost always you are coding after that time tongue

Indocron
$theQuestion = (2*b) || !(2*b);