Call These Senators:
$DBhost = "localhost";
$DBuser = "blsp";
$DBpass = "1ava1amp";
$DBName = "congress";
$table = "senate_member";
mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable to connect to database");
@mysql_select_db("$DBName") or die("Unable to select
database $DBName");
$sqlquery = "SELECT last_name, first_name, phone FROM senate_member
WHERE state_ab='$hold_state'";
$results = mysql_query($sqlquery) or die(mysql_error());
while($row = mysql_fetch_array($results)){
echo " Senator $row[first_name] $row[last_name] $row[phone] \n";
}
mysql_close();
?>
* Not your Senator? Click Here.
Suggested Script:
We NEED the economic recovery bill, and we need it now. Economists say it will create jobs, and we can't wait
around while Senators argue about political theories. Please vote YES on the economic recovery bill today.
$DBhost = "localhost";
$DBuser = "blsp";
$DBpass = "1ava1amp";
$DBName = "call_in";
$table = "senate_member";
mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable to connect to database");
@mysql_select_db("$DBName") or die("Unable to select
database $DBName");
$sqlquery = "SELECT COUNT(id) as hold
FROM econstim ";
$results = mysql_query($sqlquery) or die(mysql_error());
$row = mysql_fetch_array($results);
$newresult = $row[hold] * 2;
echo "$newresult calls and counting ...";
mysql_close();
?>
|