[nflug] PHP Coding..
robert at muzzlethem.com
robert at muzzlethem.com
Sun Oct 5 21:08:11 EDT 2008
Hi all! Trying my hand at MySQL and PHP coding. Given the following code:
<?php
include 'lib/config.php';
include 'lib/opendb.php';
$browser = $_SERVER['HTTP_USER_AGENT'];
$ip = $_SERVER['REMOTE_ADDR'];
echo $browser;
echo '<BR>',$ip;
mysql_select_db($dbname);
$query = "INSERT INTO banking (IP, BROWSER, UserName, PassWord) VALUES
($ip,
$browser, 'DummyUser', 'DummyPass')";
mysql_query($query) or die('<BR><BR><BOLD>Error, insert query
failed!,</BOLD>');
include 'lib/closedb.php';
I keep getting the message saying that the insert query failed. Is there
something that I am doing wrong here?
More information about the nflug
mailing list