在PHP中找不到请求网址

时间:2014-09-04 05:52:28

标签: php

我的home.php是

required("conn.php");
<html>
<body>
<form action="like.php" name="art" method="post">
        <?php 
        //$email=$data['email'];
        ?>
                <table align="center" border="2">
                <tr><th colspan="4"><h2 align="center">Articals</h2></th></tr>
                <tr>    <th>Name</th><th>Artical</th><th>Status</th><th colspan="2">option</th>
                </tr>
        <?php
            $r = mysql_query("select * from ar ");
                while($ro=mysql_fetch_array($r)){
        ?>
        <tr>
                <td> <?php echo $ro["fname"]?></td>
                <td><textarea rows="2" cols="25"><?php echo $ro["post"]?></textarea></td>
                <td><?php echo $ro["status"]?></td>
                <td><a name="like" href="like.php?id=<?php echo $ro['id']?>"> like</a></td>
                <!--<td><a href="delart.php?id=<?php //echo $row["id"]?>" >Delete</a></td>
                <td><a href="edt.php?unm=<?php //echo $row[0]?>">Upadate</a></td>
-->            
        </tr>
    <?php
    }
    mysql_close($con);
?>
</form>
</table>
    </body>    
</html>

和like.php是

<?php 
session_start();
if(!isset($_SESSION['user']))    
       {
         header('Location:index.php');  
       }
require("conn.php");
$id=$_GET['id'];
mysql_query("insert into `like` ar where id='$id'");


?>

当我点击链接时,如此错误“在此服务器上找不到请求的URL /25-8/like.php”。来了请帮助我是php的新手 我想在那里计算不喜欢和点击那个像按钮它自动改变为不像

1 个答案:

答案 0 :(得分:0)

你必须把home.php和like.php放在同一个目录里吗?

相关问题