Now, this value "123" is being used for another purpose in my code and it is required to be there. But at the same time, I need to send the value of USA also to my submitted php code.
Instead of wrangling with a bunch of strings and changing all your validation methods, I'd just grab the value "from wherever it came." That is, if you have a country table that generated this list (which you
should) just get the country input and look it up in that table. You should have a function somewhere that does this as it's one of those things you'll use
a lot. list($country_abbrev,$country) = get_country_name($_POST['country']);
if (! $country_abbrev) { error_function('Invalid country name'); } // you'd write this error function of course
function get_country_name($id) {
if (! is_numeric($id) or (is_numeric($id) and ! ($id > 0))) { return null; }
$r=array(null,null);
$q = "select short_title,title from country where id=$id";
$res = mysql_query($q) or die("cannot query country list for name");
$r = mysql_fetch_array($res);
return array($r[0],$r[1]);
}