[insert_php] global $wpdb;
global $current_user;

$data = $wpdb->get_row(“SELECT meta_id, meta_value, post_date FROM wp_postmeta a, wp_posts b WHERE meta_value like ‘%\”” . $current_user->user_login . “\”%’ and meta_value like ‘%\”liccnt\”%’ and meta_key = ‘form_data’ and a.post_id = b.id order by post_date desc limit 1”, ARRAY_A);
$metaid = $data[‘meta_id’];
$data= unserialize($data[‘meta_value’]);

$liccnt = isset($data[‘liccnt’]) ? $data[‘liccnt’] : 0;
// $lictype = isset($data[‘lictype’]) ? $data[‘lictype’] : “”;
$liccnt = $liccnt + 2000;

$url = “https://www.deployhub.com/checkout/?level=” . $liccnt;
// echo $url;
header(‘Location: ‘ . $url);
[/insert_php]