title: [PHP ]How To Pass ID to other page?
body: <p>I want to pass the id to other page so I can update the data by using the id</p>
  
  <p>I think I've coded it wrong</p>
  
  <pre><code>$sql = "insert into hotel (hotel_name, hotel_website, hotel_description, hotel_email, hotel_contact) values ('$hotel_name','$hotel_website','$hotel_desc','$hotel_email','$hotel_contact')";
  mysqli_query($conn, $sql);
  ?&gt;
      &lt;script type="text/javascript"&gt;
          alert("Hotel Information have been Saved");
      &lt;/script&gt;
  &lt;?php
  $result = mysqli_query($conn,"select hotel_id from hotel");
  $row = mysqli_fetch_assoc($result);
  
  $hotel_id = $row["hotel_id"];
  echo '&lt;script&gt;window.location.href="property_add_address.php?id=".$hotel_id."&lt;/script&gt;';
  </code></pre>