Jump to content

Is this a good approach?


slyte33

Recommended Posts

I have a textbox to enter your username on my game..

As you type, the text is replaced with a php imagecreate using a TTF font with css positioning it in the textbox.

the text-indent is set to -9999.

 

I need to know if this is a good approach to making my game look more professional..

 

go to 

http://foarpg.com/game.php

and simply click "Register", begin typing in the textbox

Also how can I stop, using PHP ofcourse, the textbox from acting as if a slash ( \ ) is two characters even with stripslashes being used? Max char length is 12, but 6 slashes acts as 12 O.O

Link to comment
https://forums.phpfreaks.com/topic/283492-is-this-a-good-approach/
Share on other sites

I have a textbox to enter your username on my game..

As you type, the text is replaced with a php imagecreate using a TTF font with css positioning it in the textbox.

the text-indent is set to -9999.

Why not just use CSS to import the font you want to use and apply it to the textbox. What you have now is laggy and clunky.

Importing custom fonts to CSS

 

 

Also how can I stop, using PHP ofcourse, the textbox from acting as if a slash ( \ ) is two characters even with stripslashes being used? Max char length is 12, but 6 slashes acts as 12 O.O

Either disable magic_quotes_gpc (recommended) or work around it using stripslashes.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.