Hello all! My first post! I'm very new to php and this is the problem I am having. Here is my code first off:
<?php
include("db.php");
if(!empty($fname)) {
$fname = addslashes($fname);
$lname = addslashes($lname);
$email = addslashes($email);
$address = addslashes($address);
$sql = "INSERT INTO ab_profile SET firstname='$fname', lastname='$lname', address1='$address'";
$query = mysql_query($sql) or die("Cannot query the database.<br>" . mysql_error());
echo "Database Updated.";
} else {
?>
<b>Add Address</b>
<form name="ab_profile" method="post" action="<?php echo $PHP_SELF; ?>">
First Name: <input type="text" name="fname">
<br>
Last Name:
<input type="text" name="lname">
<br>
Address:<br>
<textarea name="address1"></textarea>
<input type="submit" name="Submit" value="Submit">
</form>
<?php
}
?>
When hitting submit... I get the following error:
The page cannot be displayed
The page you are looking for cannot be displayed because the page address is incorrect.
--------------------------------------------------------------------------------
Please try the following:
If you typed the page address in the Address bar, check that it is entered correctly.
Open the 127.0.0.1 home page and then look for links to the information you want.
HTTP 405 - Resource not allowed
Internet Information Services
--------------------------------------------------------------------------------
Technical Information (for support personnel)
More information:
Microsoft Support
Any suggestions would be great appreciated!!!