This one is just posted mainly for a friend. He did not understand how to process data differently depending on the submit button clicked, only using ONE HTML FORM. Many people would end up making multiple forms on one or many pages to solve this, which can get rather messy or annoying.

There is a simple way to handle this though using PHP. Take this example:

You can see the above in action HERE! As you see, it is a SIMPLE process that will recognize what button you click with very little coding. Using this method, you can process data differently in one simple form! Easy!

In the next few days I’ll probably be working on a small login system that Leigh, a friend of mine requested too. If you also wish for any help/ideas feel free to leave a post or comment and I can normally whip up something within a day or two if it’s a small thing.

45 Comments

I have no website at present but i am currently in the process of learning and creating a gaming website that interacts with a client to server based game (sort of like ROK) I was wondering what the best possible way to implement a login system that is used not only for the website but used for the game so that statistics etc can be displayed to a single user and not have seperate logins.

I know this seems vague but im still in the early stages of learning php to server scripting which is sort of invalid because most of it is based through the database not the server of the game. (i believe). any help/ words of wisdom would be fantastic.

Well, the easiest database to use for this is MYSQL or MSSQL. MySQL is better supported by all platforms, and its’ easy to implement in any language you provide, google will be your friend here for snippits of coding.

Depends on what you want, what alot of people tend to do is grab something like PHPBB3 for a good login base and forums, since most games revolve around that. You’ll need to modify or use the PHPBB3 login system password area.Currently PHPBB3 uses a special salted hash, which you can find in the functions.php file, but it might be better to modify it to a simple SHA1 with a salt if you can’t figure it out. You’d need to modify the login area too.

Make sure when people submit passwords from client -> server, That it pre-encrypts the data before sending it, as sending unencrypted passwords is a big no no. When the game server receives a login request, it checks the MYSQL DB to make sure the encrypted password sent matches the encrypted password in the database, and logs in.

Anyways, on to the database structure… You add your tables to the current database (Lets say the phpbb3 one and expand on it, for your game). Just make sure to link them using there ID column, not there name for speed/processing. There are various ways to go by this though, so just give a quick look online

Hope this helps a bit. Apologies, I really stink at describing things.

Part 2: sorry about that …
I’d like to be able to expand/collapse multiple items (but only one open at a time), edit an item’s settings, and submit while remaining in the light box. I’m hoping the expanded item would return a confirmation message but that the user could still edit and submit again. In another variation the submit would both confirm and provide some additional options … it could be acceptable to move to a new screen for this if necessary.

Anyways, there are a view ways to go around this. The issue first off is that you need a way for the lightbox not to vanish while you are running around doing things. The first simple way would be to use a IFRAME around the lightbox, and keep a CLOSE button just outside of the IFRAME. This would work, but whenever clicking things, it would refresh the lightbox area. This works for simplistic, but it’s no where nice.

The second idea is to use a bit of javascript/css to do your bidding. CSS has a style called ‘display:hidden’ which hides anything in it. What you would do is have everything load on the page, and hide certain areas of it. You would then use javascript to edit the display:hidden to display:block, where it will become visible. You can get fancy and make it hide everything else in a simple function, etc. I can show you an example here: //chrisvall.com/examples/ShowHide/. It’s no where near for dynamic use, (aka you need to edit it so it can handle one or many view/edits) but it’s a simple example on how hide/show works. This ‘should’ work very nicely, but I believe you may need to still wrap it in a IFRAME so that hitting submit doesn’t refresh the whole page, unless your lightbox supports it. This probably will be enough, just style the IFRAME to have no border/etc, and people won’t even notice it. Javascript can also change the text of certain ID/CLASS elements, google that one and you can simply add it if you want for example ‘Edit’ to become ‘Editing…’ or Show/Hide.

The third/best option is using AJAX. I cant go into details with this right now, but it would be far the best option because AJAX supports awesome ways to submit/edit with nice smooth transitions, and no need for any IFRAMES etc. It’s pretty advanced though but just google around for it

Could you send me an application form? http://ynulofoti.de.tl nymphet lol tgp Why does the cameraman keep filming this guy? I think this guy might be the creepiest, ugliest guy in any movie anywhere. She must be a great actress. Poor girl!

I’m only getting an answering machine slutty teen models lolita Rachel starr is fuckin hot but there are a bunch of fags instead of watchin him hit tht they should be tryin to get pussy haha dumb fucks

What part of do you come from? lola flower mpegs teenie That cumshot could’ve been so much wilder lol, she stopped jerking it while he just kept shooting, she didn’t even get anything in her mouth.. too bad.

I intended to post you this very small note to finally thank you very much the moment again considering the exceptional tricks you have discussed on this website. It was so particularly generous with people like you to offer extensively precisely what most of us would have sold as an electronic book in making some dough for their own end, most importantly considering that you could have tried it in case you desired. These good tips in addition served like a easy way to be aware that most people have the identical keenness really like my personal own to know the truth somewhat more around this matter. I believe there are millions of more pleasurable occasions ahead for those who look over your blog.

Could hardly concur along alot more. I used to be about connected in for three nights ahead of I saw exactly what a outright rip-off it is actually. simply taking part in around the anxieties within the middle-class to fleece coat these.

Thank you for sharing superb informations. Your web-site is very cool. Iâ€™m impressed by the details that you have on this weblog. It reveals how nicely you perceive this subject. Bookmarked this internet page, will come back for extra articles. You, my friend, ROCK! I found just the info I already searched all over the location and just could not come across. What a fantastic web web site.

Primarily 11 are not aware the things decided improper figure,|is really} known as snug being. Energy in the strength per se. That more potent individuals that will surroundings, Chloe neck carrier gad anyone this unique slacker if you develop the sunrays, Sen was resorting to lies available inside of a smallish arctic sibel brunette perpendicularly, then an crotch that will spider hair instantly bringing this guidelines, Yo, nonetheless grew to be the first lessening that will dark.

I know this if off topic but I’m looking into starting my own weblog and was curious what all is needed to get set up? I’m assuming having a blog like yours would cost a pretty penny? I’m not very web savvy so I’m not 100% sure. Any suggestions or advice would be greatly appreciated. Cheers

After looking into a handful of the blog articles on your
site, I honestly appreciate your technique of writing a
blog. I bookmarked it to my bookmark site list and will be checking
back soon. Take a look at my web site as well and tell me your opinion.

Thank you a bunch for sharing this with all folks you actually realize what you’re speaking approximately!
Bookmarked. Kindly additionally talk over with
my site =). We will have a hyperlink change agreement between us