this is my search.php , however once user has view one data user will want to update one location / status . I can not do the Edit.php . Can someone please help me ?

Search.php

<html>
<head>
    <title>::Home</title>
</head>

<body>
    <div id="header">
        <img src='banner.png' align='middle' width='101%' height='110%'>
    </div>


<div id="navigation">            
<div class="mainMenu">
<ul>
<li>
    <a  echo ;   href='main.php' >Main</a>
</li>

<li>
    <a  echo ;  href='aduanbaru.php'>New Complaint</a>
</li>

<li>
<a  echo class='selected';  href='bor_semak_aduan.php'>Complaint Status</a>
</li>
</ul> 
</div>
</div>

<div id="content"> 

<?php
if($_GET)
{
    $search=$_GET['search'];
    $connect =mysql_connect("localhost","root","");
        if($connect)
        {
            mysql_select_db("final",$connect);
            $query = "SELECT * FROM myaduan WHERE id='".$search."'";
            $results = mysql_query($query) or die(mysql_error() . '<br/>' . $query);
            while($row = mysql_fetch_array($results))
            {
                    echo" <table id='table' align='center' width='80%'><br/>";
                    echo"<th colspan='2' class='th'> Complaint Status <br/></th>";
                    echo"<tr><td><br/></td></tr>";
                    echo"<tr><td valign='top' width='30%'>Complaint No. 
                    </td><td width='70%'> :";
                    echo $row['id'];
                    echo"</td></tr>";

                    echo"<tr><td valign='top' width='30%'>Complaint Category
                    </td>
                    <td width='70%'> :";
                    echo $row['kategori'];
                    echo"</td></tr>";

                    echo"<tr><td valign='top' width='30%'>Location
                    </td>
                    <td width='70%'> :";
                    echo $row['unit_pengadu'];
                    echo"</td></tr>";


                    echo"<tr><td valign='top' width='30%'>Complaint
                    </td>
                    <td width='70%'> :";
                    echo $row['aduan_details'];
                    echo"</td></tr>";

                    echo"<tr><td valign='top' width='30%'>Status 
                    </td><td width='70%'> :";
                    echo $row['status'];
                    echo"</td></tr>";

                    echo"<tr><td valign='top' width='30%'>Result 
                    </td><td width='70%'> :";
                    echo $row['keputusan'];
                    echo"</td></tr>";

                echo"<tr><td align=center><br/><br/><a href=Edit.php>Update</a></td></tr> ";

                echo "</table>";
            }
          }else
            {
                die(mysql_error());
            }
}

?>

</div>

<div id="footer">
       <img src='banner.png' align='middle' width='101%' height='110%'>
</div>
</body></html>

1) What do you mean by "I can not do the Edit.php"? Where is the code for this file? Does it fail to execute or produce incorrect results?

2) In the top portion of code that you have posted, why do you have the word echo at various places? if it is intended to do some output via php then it must be enclosed in opening (<?php) and closing (?>) tags.

For example:

<a  echo ;   href='main.php' >Main</a>

should be something like:

<a  <?php echo $someVariable; ?>   href='main.php' >Main</a>

Although I don't see any good reason of its usage at places where you have tried to use it.

Hi

change line 81. because if you want to edit you have pass value in edit.php

example if complaint no is id then we have to write the code as below

<a href=Edit.php?id='<?php echo $row['id']; ?>'>Update</a>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.