Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block danielemarino

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ajax.php
<?php // Load items into a HTML select box via PHP & Ajax
$firstbox = $_POST['firstbox'];
$query = "SELECT * FROM mytable WHERE id_firstbox = '$firstbox';";
$result = pg_query($query) or die('Query failed: ' . pg_last_error());
$secondbox_arr = array();
if (pg_num_rows($result) > 0) {
while ($row = pg_fetch_array($result, NULL, PGSQL_ASSOC)) {
$secondbox_arr[] = array("id" => $row['id_secondbox'], "name" => $row['testo_secondbox']);
You can’t perform that action at this time.