诚然,这是我试图解决的问题。 我有一个索引页,配备了一台实验室,其中包括服务器上的其他档案。 例如,一个文件来建造我的菜单等等。
在这些档案中,我正在与一个包含一个表格的目录一起工作,每个行各有一处删除的纽扣吨,以便用户必要时可以删除数据。 既然如此,表格的页正使用这一形式定义:
<form name=somename id=someid method=post action=<?php $PHP_SELF?>
Well whats happening is, when the delete is executed the form tries to post to itself and it throws an error into the address bar of:
Notice: Un Defintable:PHP_SELF in C:xampphtdocs websomefile.php on line39
第39条是属性。
================================================================================================================================================================================================================================================================
该指数页的设置也一样:
<div id="container">
<div id="left">
<p>Welcome <?php echo $_SESSION[ USERFIRSTNAME ]?> <?php echo $_SESSION[ USERLASTNAME ]?></p>
</div>
<div id="right">
<?php
//navigation menu
include( menu.php );
?>
</div> <!-- menu div -->
<div class="clear"></div>
</div> <!-- container div -->
<div id="userlist">
<?php
//build user access links
//include( userlist.php );
?>
</div><!-- user list div -->
<div id="dbview">
<?php
include( dbview.php );
?>
</div>
页: 1 网址是上表一。
I m trying to figure out how i can execute the delete (which simply updates a db row) while it refreshes back to the index page. The current code which i m using to handle the post doesn t seem to be working:
if (($someresult)&& ($anotherresult))
{
echo <font color="#FF0000">You have successfully removed item </font> ;
header( Location: index.php );
exit;
}
else
{
echo <font color="#FF0000">Error while Removing</font> ;
}
all the issue seems to be with the $PHP_SELF part, but i need some assistance. I m sorry for the drawn out post. Hopefully it makes sense. If more code needs to be posted i can do that as well. Thanks again!