|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Michael Condon (admin
compinfosec.com)
Date: Tue May 06 2008 - 09:39:01 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I have a PHP script that seems to be failing. I execute it using
window.location.href("http://www.vote.com/vote2.php"):
<?php
$link = mysql_connect('localhost', 'login', 'password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
$result = use election
if (!$result) {
die('Could not connect: ' . mysql_error());
}
$result = mysql_query("update election set Votes = Votes + 1 where
Name='TheGuy'");
if (!$result) {
$message = 'Invalid update: ' . mysql_error() . "\n";
$message .= 'Whole query: ' . $result;
die($message);
mysql_close($link);
?>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]