Link to home
Start Free TrialLog in
Avatar of volvopilot
volvopilot

asked on

PHP equivalent of ColdFusion <CFABORT>

I'm rewriting an application to PHP from ColdFusion.

There's a handy ColdFusion tag called <CFABORT>.  It basically stops execution, such as may be appropriate after someone has entered a bad password.  Without this tag, one has to use more if/else logic and it can get tedious.  

For example, with CFABORT, you can code:

<CFIF PasswordStatus IS "Bad">
  BAD PASSWORD! GO AWAY!
  <CFABORT>
</CFIF>
Hi!  
Welcome to our site, authorized user
etc.

Without CFABORT, you'd have to code:

For example, with CFABORT, you can code:

<CFIF PasswordStatus IS "Bad">
  BAD PASSWORD! GO AWAY!
  <CFABORT>
<CFELSE>
  Hi!  
  Welcome to our site, authorized user
  etc.
</CFIF>

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of rstorey2079
rstorey2079

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of volvopilot
volvopilot

ASKER

Thank you, both.

I doubled the points and so I gave you each 125.

Thanks again.