Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Feb 2007
    Posts
    217
    Thanks
    25
    Thanked 1 Time in 1 Post

    numeric check gives me error message

    I've been staring at this line for a while now, but I can't see what's wrong with this numeric check.

    Code:
    if (is_numeric($this->request->get['edit'])){}else{$this->redirect($this->url->link('account/oops'));}
    It gives me the following error:

    Parse error: syntax error, unexpected T_IF, expecting T_FUNCTION

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Works for me. Your problem is elsewhere.
    Why are you using an if without a body and dropping it to an else? Use a negation instead.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •