Quick PHP Question...

1 replies
Hey guys,

Trying to figure out what's wrong with my php code below. Basically, I am sending a query string to a page with the following code. What I want to do is evaluate the query string that contains the variable "abc". And if that variable is empty, then I want to redirect to "otherpage.html". If the variable is not empty, I want to stay on the same page.

PHP Code:
<?php

    $abc
=$_GET['abc'];

    if (!empty(
$abc)){    
   echo 
'<META HTTP-EQUIV="Refresh" Content="0; URL=otherpage.html">';    
   exit;    
   }    

?>
Any ideas what's wrong with my code?
#php #question #quick
  • Profile picture of the author Brandon Tanner
    Nevermind guys, I got it figured out.
    Signature

    {{ DiscussionBoard.errors[1926473].message }}

Trending Topics