HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-31-18-78 6.17.0-1017-aws #17~24.04.1-Ubuntu SMP Tue May 26 21:09:53 UTC 2026 aarch64
User: ubuntu (1000)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /var/www/selfanalyse/wp-content/plugins/psychometrics/api/get_city.php
<?php
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: POST, GET, OPTIONS');
header('Access-Control-Max-Age: 1000');
header('Access-Control-Allow-Headers: Content-Type');

include_once('../../../../wp-config.php');

$PSY_CITY = $wpdb->prefix . PSY_CITY;

$state_id = $_REQUEST['state'];

$cities = $wpdb->get_results("SELECT * from $PSY_CITY where state_id='$state_id'");



echo $citi = '<option value="0">^^Select City^^</option>	';
foreach ($cities as $ct) {
    ?>
    <option value="<?php echo $ct->city_id ?>"><?php echo $ct->city_name ?></option>
<?php
}