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.
Quick PHP Question...
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.
Any ideas what's wrong with my code?
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;
}
?> - Brandon Tanner
Next Topics on Trending Feed
-
2