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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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