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:
<input name="button1" type="submit" value="You hit button 1" /> <input name="button2" type="submit" value="You hit button 2" /> <input name="button3" type="submit" value="You hit button 3" /> <?php // check which button was clicked if ($_POST['button1'] { echo "Button one clicked!"; } else if ($_POST['button2']) { echo "Button two clicked!" } else if ($_POST['button3']) { echo "Button three clicked!"; } ?> |
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.
Related posts:
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.
Cheers, Chris Page (Verim)
Hey there, I must of missed your comment! Huge apologies for that!
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.
Hi Chris,
I came across this article while searching for a dependable approach to submitting multiple forms with a lightbox. Eg.
Item A: (view/edit)
Item B: (hide)
choose: choice 1 | choice 2
Item C: (view/edit)
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.
What do you think? Thank you!
Hey there, sorry about the late reply, I am not home at the moment.
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
Hope this helps slightly!
Play infomriavte for me, Mr. internet writer.
XI39gt http://wnbUj5n0mXqpcvm27Hms.biz
I study here Little Loli >:-)
US dollars Pretee Models Bikini
06553
Hiya! I just want to give an enormous thumbs up for the nice data you’ve got here on this post. I shall be coming back to your blog for extra soon.
Nice article. I myself write for video games and find it very fulfilling. It’s also great to let go with a tank or tactical nuke once in a while.
Finally! Been trying to figure out how to make it work.
Thanks for the help!
Hello.
I tried testing your script here, but I ran into a couple of problems.
1. It’s missing parentheses and semicolon.s
(revised script)
hmmm. the revised script didn’t appear on my last comment… well, just wanted to let you know you have a couple of typos.
Your web site scrolls in my iPhone, it hurts my eyes, that’s all I’ve got to say
I’m a trainee http://ocafiilemy.de.tl naked bbs ru Damn i love it when she moans and smile when she is getting her tight pussy fucked.How I would love to get some action with her!!!
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!
How much does the job pay? http://gepykecoaqu.de.tl bbs petite model nudes I seriously doubt I’ll ever tire of watching this clip. Cherokee rocks my world. Such the perfect fuck thing.
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
Sorry, you must have the wrong number nude webcams teens lolita OOOOH MY GOD THAT WAS SOOOO HOTT !!!! NOTHING LIKE WATCHING ( BE NICE TO JOIN IN TOO , LOL ! ) GORGEOUS WOMEN HAVING SENSUOUS SEXXX .
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’m only getting an answering machine preteen lolita pics elwebbs DAMN THIS IS A SHITTY ARRANGEMENT! THIS DUDE JUST WANTS HAND JOBS! SHE IS GOING TO CHEAT ON THIS ASSHOLE WITHIN A YEAR!
A few months tamoxifen online
Saskatchewan and Manitoba Pharmacare Programs. This program ensures that insurance carriers are not paying for claims which
Withdraw cash childmodels no nude lolitas I love it when girls to lesbian scenes and they arn’t into it. FOr some reason I think its hotter
A company car 14 yo nude lolita I want more movies like these. They are way more realistic and the girl is way hotter than fake porn body girls.
This is the job description loli asian models links No matter how many times I watch this, it gets me wet every single time! Lisa Ann is a Goddess.
Yes, I play the guitar 100 sites lolita bbs It looks like Nina Hartley .
I can’t hear you very well Preteens Preteens Nymphets They can attack me anytime they like
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.
Michaela lives and teaches yoga in Los Angeles, CA. Growing up as a gymnast, she was first introduced to the practice of Yoga during high school and instantly fell in love.
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.
Hello my family member! I wish to say that this article is awesome, nice written and come with almost all vital infos. I would like to look extra posts like this .
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
Fastidious response in return of this question with solid arguments and telling everything concerning that.
What a information of un-ambiguity and preserveness of precious knowledge about unexpected
feelings.
Hi there, I wish for to subscribe for this website to get
newest updates, thus where can i do it please assist.
I Tried but i got some errors…
Hey worked after some time due to server error
I cant figure out what to if anything, needs to be changed, is
offsite SEO still viable?
Shared on StumbleUpon, someone will like it!
If some one needs expert view regarding running a blog then i suggest him/her to visit this
webpage, Keep up the nice job.
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
New super hot photo galleries, daily updated collections
http://porncum.energysexy.com/?sydney
long free videos of porn antwerp antwerpen belgium porn addams family porn movie goth mobile porn natalia flavor of love porn
Scandal porn galleries, daily updated lists
http://nanciporn.alexysexy.com/?estefany
free porn omegle videos free young russian porn best pubic porn free orgy porn streaming male and women free porn clips