The simplest way to do this is:
While creating links check if the user is logged in or not. If user is logged in then add url of the package, otherwise add a simple javascript code to open popup.
If you are using session then you might need to add something like this:
if (isset($_SESSION['user'])){ ?>
<a href="http://www.example.com">Booking</a><?php
}
else{ ?>
<a href="#" onclick="alert('You must log in')">Booking</a><?php
}
Also you would need to add redirection for non logged in users on the package page as well.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.