<?php if (something) { //do something here <input type="submit" value="continue button" /> } else { //if the continue button was press go down to the else part of this if } ?>
Jump to Else
-
- Posts: 165
- Joined: Fri May 06, 2011 5:02 pm
Jump to Else
I have a page that has a continue button. If the user presses continue, I want to run the stuff in the else part of the if. Is this possible?
Re: Jump to Else
Why would you want to do that?
if your using a if you want
if your using a if you want
if(something) { works } ELSE { the else is for if the something fails to do what you want.. }so why would you do that?
I would put a signature.. BUT, i don't have the time.
Re: Jump to Else
if (isset($_GET['continue']) { //do something here } else { ?> <form action="" method="get"> <p> <input tyoe="hidden" name="continue" value="1" /> <input type="submit" value="continue button" /> </p> </form> }this is just basic logic...
-
- Posts: 165
- Joined: Fri May 06, 2011 5:02 pm
Re: Jump to Else
Basically, I am trying to say... if company names match... show suggested companies, but if you press continue because those companies don't match the one you are creating, go to the next step and finish creating your company.jacek wrote:if (isset($_GET['continue']) { //do something here } else { ?> <form action="" method="get"> <p> <input tyoe="hidden" name="continue" value="1" /> <input type="submit" value="continue button" /> </p> </form> }this is just basic logic...
Re: Jump to Else
Cool... so ... what's that problem now ?unemployment wrote:Basically, I am trying to say... if company names match... show suggested companies, but if you press continue because those companies don't match the one you are creating, go to the next step and finish creating your company.
-
- Posts: 165
- Joined: Fri May 06, 2011 5:02 pm
Re: Jump to Else
The problem is that I have it set up like...Cool... so ... what's that problem now ?
if (company names match the one you typed) { // show suggested companies and join one or press continue <input type="submit" value="continue" /> } else { // those companies don't match the one you are creating or you pressed continue //finish creating your company. },
Re: Jump to Else
okay...
so what is preventing you from using the example above to create the correct code ?
so what is preventing you from using the example above to create the correct code ?
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: Jump to Else
switch is basically for use instead of a big list of else ifs.
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9