php和html中与复选框相关的问题

php和html中与复选框相关的问题,php,Php,我想打印复选框值(仅打印选定值),但显示以下错误 禁止进入 您没有访问请求对象的权限。它受读保护,或者服务器不可读 如果您认为这是服务器错误,请联系网站管理员 错误403 本地主机 Apache/2.4.7(Win32)OpenSSL/1.0.1e PHP/5.5.9 这是整个php文件。。。我是php新手。。。所以请检查我的代码…可能有一些错误 <?php // File: anyco.php require('anyco_ui.inc.php'); // Create

我想打印复选框值(仅打印选定值),但显示以下错误 禁止进入

您没有访问请求对象的权限。它受读保护,或者服务器不可读

如果您认为这是服务器错误,请联系网站管理员

错误403

本地主机 Apache/2.4.7(Win32)OpenSSL/1.0.1e PHP/5.5.9 这是整个php文件。。。我是php新手。。。所以请检查我的代码…可能有一些错误

<?php // File: anyco.php
    require('anyco_ui.inc.php');
    // Create a database connection
    $conn = oci_connect('system','123','localhost/orcl');
    ui_print_header('FoodItemList');

    //session_start();
    //$cid=$_SESSION['cid'];
                   do_query($conn, 'SELECT Fooditem_ID,Food_item_name,price,day_available,time_available,discount_percentage,start_date,deadline FROM Food_Item');
                   ui_print_footer(date('Y-m-d H:i:s'));
    // Execute query and display results
    function do_query($conn, $query)
    {
            $stid = oci_parse($conn, $query);
            $r = oci_execute($stid,OCI_DEFAULT);
            print '<table border="1">';
            print '<tr>';
            print '<td>Food_ID<td>Food_Name<td>Price(tk)<td>Dvailable_day<td>Avaliable_time<td>Discount<td>Dis_start date<td>Dis_finish date<td>selected item<td>quanity';
            while ($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) 
            {
                print '<tr>';
                $num=1;
                $val="";
                foreach ($row as $item) 
                {                  
                    if($num==1)
                    { 
                       $val = $item;
                       $num=2;
                    }

                    print '<td>'.($item!== null ? htmlentities($item) : '&nbsp;').'</td>';

                }

                echo '<td><input type="checkbox" name="ticked[]" value="$val"></td>';
                echo '<td><input type="number" name ="name[]" ></td>';
                print '</tr>';
           }

       print '</table>';
    } 

    if(isset($_POST['submit'])&&)
    {
              echo'yeeeeeeeeeeeeeeee';
             $ticked = $_POST['ticked'];
             foreach ($ticked as $ticked=>$value) 
             {
                 echo "values selected are : ".$value."<br />";
             }
    }

?>
<html>
<style>
body
{
background:orange;
}
</style>
<body text="green">
<br><br>
<form action="<?php echo $current_file;?>" method="POST">


    <input type ="submit" value="Submit"><br><br>   
</form>



</body>
</html>

身体
{
背景:橙色;
}



首先要做的是删除
&&

if(isset($_POST['submit'])&&)
                          ^ remove the &&

那就换这个

<input type ="submit" value="Submit"><br><br>   

编辑

除去

action="<?php echo $current_file;?>"
action=“”


@user3460746 403表示您无法读取该文件。。更改您的权限…仅当我单击“提交”时,才会显示以下错误shown@user3460746删除
action=”“
。。。它一定把你引向了错误的地方。。。如果您提交的是同一个文件,您可以忽略它。当我忽略它时,会显示通知:未定义索引:在第47行的E:\Xamp\htdocs\FoodItemList.php中打勾警告:在第48行的E:\Xamp\htdocs\FoodItemList.php中为foreach()提供的参数无效,这是因为
之外。。。提交的唯一值是
标记内的值
<?php
if(isset($_POST['submit']))
{
    echo'yeeeeeeeeeeeeeeee';

    // more of your code...
}
?>
action="<?php echo $current_file;?>"
<form action="<?php echo $current_file;?>" method="POST">
<form method="POST">