-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPaulblike.php
More file actions
31 lines (27 loc) · 760 Bytes
/
Paulblike.php
File metadata and controls
31 lines (27 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
include("navbar.php");
?>
<html>
<div id="page">
<div id="barackswrap">
<img src="BarackObama2005portrait.png">
<?
include("Paulcomments.php");
$host="sql.mit.edu";
$username="grosas";
$password="snett";
$db_name="grosas+candidates_2012";
// Table name
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$conn = mysql_connect("$host", "$username", "$password") or die(mysql_error());
$id=$_GET['id'];
$bvte=$_GET['vote'];
mysql_query("UPDATE $tbl_name SET BadVote=$bvte WHERE ID = $id") or die('dead!');
mysql_close($conn);
echo "<meta http-equiv=\"Refresh\" content=0;url=\"$web\">";
//header('Location: Obamasapproval.php');
?>
</div>
</div>
</html>