Hello!
I have a linux server with custom api.I make a php script who check if user pay invoce.How can i make this script acces a link if he return true.The link is like: "ipservert:2030/username=../planname=.."
Acces link if it is returned True
-
- Posts:39
Acces link if it is returned True
Admin
Posts:805
Hi
If you want to open /redirect to a page address when a condition is True in php, you can use the header() function; like in this example:
Or, if you want to display a link:
If you want to open /redirect to a page address when a condition is True in php, you can use the header() function; like in this example:
Code: Select all
$some_var =true;
if(isset($some_var) && $some_var ===true){
header('Location: //ipservert:2030/username=../planname=..');
exit();
}
else echo 'Error some text..';
Code: Select all
$some_var =true;
if(isset($some_var) && $some_var ===true){
echo '<br><a href="//ipservert:2030/username=../planname=.." title="Click">Click</a>';
}
else echo 'Error some text..';