The Center of Indiana
global $wpdb;
$state = "IN";
$statefull = "Indiana";
$result = $wpdb->get_row(”SELECT * FROM wp_statenames WHERE named_state=’$state’ ORDER BY price DESC”, ARRAY_A);
if ($result == 0){
$price = 1;
echo ‘
No one has named the center yet.
‘;
}
else {
$price = $result[’price’]*2;
echo ‘
Patrons of Exploration in ‘.$statefull.’
‘;
$listofnames = $wpdb->get_results(”SELECT * FROM wp_statenames WHERE named_state=’$state’ ORDER BY price DESC”, ARRAY_A);
echo “
| Name | Namer | Price |
|---|---|---|
| “; echo $value[’name’]; echo “ |
“; echo ““.$value[’namer’].”“; echo “ |
“; echo “$”.$value[’price’].”.00″; echo “ |
‘;
}
echo ‘
echo “
Now it’s your turn!
For only $”.$price.”.00, you can rename the center of “.$statefull.”. Just fill out the form below, and you’ll become a member of the National Geographic Center Society and get the center named whatever you want!”;
echo ‘
‘;
?>