2 argument in if - when isset button or onload

29 Views Asked by At

I have argument which "do something" when i press the searchbutton, but I want to do the same on load webpage

<?php
if (isset($_POST['searchbutton'])) {
$time = time();
$time_now = (date("H:i:s",$time));
echo $time_now;
}
?>

I want to do this when page is loading and after click button searchbutton

Is there any options to use two arguments in this if like this:

if ((window.onload) OR (isset($_POST['searchbutton'])))
0

There are 0 best solutions below