无法在php中转发页面

无法在php中转发页面,php,Php,我有一个php页面。当用户点击编辑按钮时,我的所有其他字段数据将出现在相应的文本框中,并且如果他提交了表格,我的数据将更新。但我的问题是它没有转发到我尊敬的页面 我这样表示它header('Location:/profile.php')用于在我的个人资料页面中转发 原因可能是什么 我的完整代码: <?php include '../../../include/connection.php'; $idd =$

我有一个php页面。当用户点击编辑按钮时,我的所有其他字段数据将出现在相应的文本框中,并且如果他提交了表格,我的数据将更新。但我的问题是它没有转发到我尊敬的页面

我这样表示它
header('Location:/profile.php')用于在我的个人资料页面中转发
原因可能是什么

我的完整代码:

  <?php
                    include '../../../include/connection.php';
                    $idd =$_REQUEST['id'];
                    $resultt = mysql_query("SELECT * FROM budget  WHERE budget_id = '$idd'");
                    $test = mysql_fetch_array($resultt);
                     if (!$resultt)
                        {
                            die("Error:<font color='red'> Data not found..</font>");
                        }
                    $budget_id=$test['budget_id'];
                    $heads_id=$test['heads_id'];
                    $amount= $test['amount'];
                    $from_date=$test['from_date'];
                    $to_date= $test['to_date'];

                    if (isset($_POST['submit'])) {
                        $headsid=$_POST['headsid'] ;
                        $amount= $_POST['amount'] ;
                        $todate=$_POST['todate'] ;
                        $frmdate= $_POST['frmdate'] ;
                        mysql_query("UPDATE budget SET heads_id ='$headsid',amount ='$amount',from_date ='$frmdate' ,to_date ='$todate',updater_id ='$uid',updated_date=NOW()  WHERE budget_id = '$idd'")
                                or die(mysql_error());
                        header('Location: /profile.php');// PROBLEM HERE UNABLE TO FORWARD TO THE PAGE
                    }
                    ?>

去掉或删除反斜杠

 header("Location: http://example.com/path/path/profile.php");
 exit;

您是否已验证设置了
$\u POST['submit']
?请尝试将表单发布到
phpinfo()
页面以确保。是否无法转发此页面?是您得到404错误页面未找到还是重定向它自身未找到happening@Devesh它仍然在同一页中,没有更改我的url@Ashutosh“你是想在按下按钮后重定向它吗?”凯伊,我已经在我的问题中提到过。我想重定向我的页面,如果我的页面的提交按钮在执行其操作后被按下,我尝试了,但是页面是空白的,我的url没有改变,它仍然保持相同的方式来放置整个路径。
header('Location: profile.php');
die;