如何在不丢失输入数据的情况下更新URL

I have this option selector which updates url adding ?type=size, type depends on option selected. I use $_GET to then get the data from url.

The problem is, after entering value in inputs (name, price, etc) before, then on selection part the page refreshes and the input data I entered before is gone.

enter image description here

    <label>Type</label>
    <select name="type" onchange="location = this.value;">
        <option>Select...</option>
        <option value="?type=size">Size</option>
        <option value="?type=weight">Weight</option>
        <option value="?type=dimension">Dimension</option>
    </select>

How can I fix this?