• PHP Help PHP Newbies
  • [RESOLVED] Forbidden You don't have permission to access /GoodsInSchedule/< on this server.

I am receiving the current error message when uploading to my local testing server.

Forbidden You don't have permission to access /GoodsInSchedule/< on this server.

I am a complete novice with only a few days understanding of php so please forgive me as I know the answer to my query must be very straightforward.

Do I need to amend the php.ini file in order to gain access to the local server? If so where can I locate the line that needs amending?

The php code in the script I'm testing is as follows;

<?php
if (!$POST['submit'])
{
?>
<form method="post" action="<?=$
SERVER['PHP_SELF']?>"> Enter number of rows
<input name="rows" type="text" size="4" /> and columns
<input name="columns" type="text" size="4" />
<input type="submit" name="submit" value="Draw Table" />
</form>
<?php
}
else
{
?>
<table border="1" cellspacing ="5" cellpadding="0">
<?php
// set variables from form input
$rows = $POST['rows'];
$columns = $
POST['columns'];

// loop to create rows
for ($r = 1; $r <= $rows; $r++)
{
	echo "<tr>";
	// loop to create columns
	for ($c = 1; $c <= $columns; $c++)
	{
		echo "<td>&nbsp;</td>\n";
	}
	echo "</tr>\n";
}

?>
</table>
<?php
}
?>

    I have managed to fix the issue.

    The problem was with the following statement;

    <form method="post" action="<?= $_SERVER['PHP_SELF']?>"> 

    It now reads;

    <form method="post" action="<?php $_SERVER['PHP_SELF']?>"> 

    I'd basically missed out the openning <?php tag. My testing server does not accept the shorthand <?.

      9 months later

      Thanks - there is no Error message once I have changed <?= to <?php , however its not adding the text to the database.

        Write a Reply...