Forum Moderators: coopster
I keep getting Access forbidden: Error 403!
I running a delete query that takes the name from the option value of a drop down dialogue box:
<td><select name="delete">
<?php
$con = mysql_connect("localhost", "root") or die(mysql_error());
mysql_select_db("db", $con) or die(mysql_error());
$state = "SELECT name FROM data";
$query = mysql_query($state, $con);
while($queryColumn = mysql_fetch_array($query)){
echo '<option value="' . $queryColumn ['name'] . '">' . $queryColumn ['name'] . '</option>';
}
?>
</select></td>
The delete function looks like so:
<?php
$con = mysql_connect("localhost","root") or die(mysql_error());
if (!$con)
{
die('Could not connect: ' . mysql_error());
} mysql_select_db("db", $con);
$sql3 = "DELETE FROM 'data' WHERE 'name' = '.$_POST[delete].'";
mysql_query($sql3,$con);
mysql_close($con);
?>
I have checked the http.conf which looks ok:
<Directory "C:/xampp/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# [httpd.apache.org...]
# for more information.
#
Options Indexes FollowSymLinks Includes ExecCGI
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
...and i've also disabled read only for htdocs. With phpmyadmin I have granted all privileges for root, for the db and for the table.
Have I missed anything out?
Cheers
Royce