<?php require_once __DIR__.'/../includes/functions.php'; $cid=(int)($_GET['country_id']??0); echo '<option value="">State</option>'; foreach(all_rows('SELECT * FROM mj_states WHERE country_id=? AND is_active=1 ORDER BY name LIMIT 1000',[$cid]) as $s){ echo '<option value="'.e($s['id']).'">'.e($s['name']).'</option>'; }
