Quick PHP Question...

by 1 replies
2
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?
#programming #php #question #quick

Next Topics on Trending Feed

  • 2

    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.