creating polls (huge security hole?)
Date: 12/15/06
(WebDesign) Keywords: php, mysql, sql, web
So I'm reading a tutorial on creating polls using MySQL and PHP, and this is the php side of it.
Is it me, or is this extremely bad to put on a webpage, what with it requiring a usename and password? Am I just not reading it properly?
$host = 'localhost';
$user = 'user';
$pass = 'pass';
$db = 'polls';
print "\n";
print "\n";
print "Grand Old Opera Poll\n";
print "\n";
print "\n";
print "\n";
print "See vote totals
\n"
;
print "\n";
print "\n";
?>
Source: http://community.livejournal.com/webdesign/1195771.html