PHP URGENT HELP
Posted: Thu Jul 22, 2010 3:59 pm
I have the following php code that take 2 variables for redirect to a subdomain, it works ok
<?php
$p = $_GET['p'];
$a = $_GET['a'];
$review_url = 'http://' . $a . '.' . $p . '.com';
header('Location: ' . $review_url);
exit();
?>
But my problem is that when the variables come null or by error there is not variables values in the string then it redirect to "..com"
What can I do to show any warning text if the variable values come null ,insteance of the redirecting ????
Thanks in advance
<?php
$p = $_GET['p'];
$a = $_GET['a'];
$review_url = 'http://' . $a . '.' . $p . '.com';
header('Location: ' . $review_url);
exit();
?>
But my problem is that when the variables come null or by error there is not variables values in the string then it redirect to "..com"
What can I do to show any warning text if the variable values come null ,insteance of the redirecting ????
Thanks in advance