Hello i used ajax function send data:itemShape and when i directly run url page or service page it's show error:
Notice: Undefined index: itemShape in C:\wamp64\www\inventory_software\get_item_types_dhk.php on line 5
please someone help how to solve this issue. i am going to upload pic of error for better understanding:
here is the url page code:
<?php
include 'config.php';
    $itemShape = $_POST["itemShape"];
    $mysql="SELECT product_id,item_shape from product_table where item_name="."'$itemShape'";
    //echo $mysql;
    $count=0;
    $myquantity = $conn->query($mysql);
    $new_array=array();
if ($myquantity->num_rows > 0) {
        while($myrow = $myquantity->fetch_assoc()) {
            $quantity_sum['count']=$count+1;
            $quantity_price['item_name']= $myrow['item_shape'];
            $quantity_price['item_id']= $myrow['product_id'];
            array_push($new_array,$quantity_price);
        }
    }
    $new_item=array_merge($quantity_sum,$new_array);
    echo json_encode($new_item);
?>
this is the ajax method which is used:
$('#item_name').change(function(){
        //alert();
        var Item_Name=$("#item_name option:selected").text();
        alert("item_name");
         $.ajax({
         type: 'POST',
         url: 'get_item_types_dhk.php', 
         data: {itemShape: Item_Name},
         dataType: "json",
         success: function(data){ 
Someone please help me how to solve this issue

 
     
    