Note that there are some explanatory texts on larger screens.

plurals
  1. POSQLSTATE[HY000]: General error: 25 bind or column index out of range
    text
    copied!<p>ive been stuck on this on for hours i keep getting this error code SQLSTATE[HY000]: General error: 25 bind or column index out of range tried everything i could find</p> <p>$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);</p> <pre><code>$stmt = $db-&gt;prepare('insert into rentals(title, pid, uid, address, description, amenities, manager_name, bedrooms, sale_price, property_type, manager_phone, manager_email) values(:title, :pid, :uid, :address, :description, :amenities, :manager_name, :bedrooms, :sale_price, :property_type, :manager_phone, :manager_email)'); $stmt-&gt;bindParam(':title', $_POST['title']); echo $_POST['title'].'&lt;br/&gt;'; $stmt-&gt;bindParam(':pid', $pid); echo $pid.'&lt;br/&gt;'; $stmt-&gt;bindParam(':uid', $uid); echo$uid.'&lt;br/&gt;'; $stmt-&gt;bindParam(':address', $_POST['street-address']); echo $_POST['street-address'].'&lt;br/&gt;'; $stmt-&gt;bindParam(':description', $_POST['description']); echo $_POST['description'].'&lt;br/&gt;'; $arr= array($_POST['smoking'], $_POST['children'], $_POST['refridgerator'], $_POST['internet'], $_POST['utils'], $_POST['pool'], $_POST['laundry'], $_POST['microwave'], $_POST['stove'], $_POST['cable'], $_POST['cleaning'], $_POST['ac']); $arr = array_filter($arr, 'strlen'); $amenities = join(':|:', $arr); $stmt-&gt;bindParam(':amenities', $amenities); echo $amenities.'&lt;br/&gt;'; $stmt-&gt;bindParam(':manager_name', $_POST['manager']); echo $_POST['manager'].'&lt;br/&gt;'; $stmt-&gt;bindParam(':bedrooms', $_POST['bedrooms']); echo $_POST['bedrooms'].'&lt;br/&gt;'; $stmt-&gt;bindParam(':sale_price', $_POST['prices']); echo $_POST['prices'].'&lt;/br&gt;'; $stmt-&gt;bindParam(':property_type', $_POST['property_type']); echo $_POST['property_type'].'&lt;br/&gt;'; $stmt-&gt;bindParam(':manager-phone', $_POST['manager-phone']); echo $_POST['manager-phone'].'&lt;br/&gt;'; $stmt-&gt;bindParam('manager_email', $_POST['manager-email']); echo $_POST['manager-email'].'&lt;br/&gt;'; $stmt-&gt;execute(); }catch(Exception $e){ echo $e-&gt;getMessage(); } unset($db); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload