i have a program where i post data by radio button and send it to a php page by jquery ajax function . I want to get variable data from this page so that i can use it in my page from where i send the data . can anyone help me
<script type="text/javascript">
function getDesign() {
var radioValue = $("input[name='metal']:checked").val();
$.ajax({
type: "POST",
url: "<?php echo SITE_URL; ?>image_filter.php",
data:'metal='+radioValue,
success: function(data){
//$("#desc2").html(data);
alert(data);
}
});
}
</script>
<?php
$metal = $_POST['metal'];
$finish = $_POST['finish'];
echo $metal;
?>
i want to use the metal variable in my main page