hello i'm new in php development and i want to create an update scrupt for my codes, and i've been way over my head in doing this one.Here is my code for the search result i need some pinters to how i can create an update script for this.thanks

<html>

<head><title>Search IPS</title></head>



<body>

<?php
session_start();

    $conn=odbc_connect('PEDB','','');

    if(!$conn){exit("Connection failed:" .$conn);}



    $ipsnumber=$_GET['ipsnumber'];



    $numrow=0;
    $rownum=1;

        $ipsnumber="SELECT * FROM tblIps where Ips_number='$ipsnumber'";

        if (!$conn) 
        {exit("Connection Failed: " . $conn);}



        $rs=odbc_exec($conn,$ipsnumber);





        if (!$rs) 
        {exit("Error in SQL");}


        //mainquery

        while ($array=odbc_fetch_row($rs)) 
        { $numrow++;

        //binago kobackup
        $manager=odbc_result($rs,"Manager");//binago ko manager from title
        $matid=odbc_result($rs,"Material_id");//binago ko materialid
        $dept=odbc_result($rs,"Department");//dinagdag ko
        $groupname=odbc_result($rs,"Group_name");//dinagdag ko
        $area=odbc_result($rs,"Area");

        $process=odbc_result($rs,"Process");
        $groupleader=odbc_result($rs,"Group_Leader");
        $facilitator=odbc_result($rs,"Facilitator");
        $ipsnumber=odbc_result($rs,"Ips_number");
        $projecttitle=odbc_result($rs,"Project_Title");

        $datesubmitted=odbc_result($rs,"Date_submitted");
        $statusofproposal=odbc_result($rs,"Status_of_proposal");
        $remarks=odbc_result($rs,"Remarks");
        $endorsement=odbc_result($rs,"Endorsement");
        $datereview=odbc_result($rs,"Date_review");


        $dateonevaluation=odbc_result($rs,"Date_onevaluation");
        $dateclosed=odbc_result($rs,"Date_closed");
        $regagingdays=odbc_result($rs,"Registration_agingdays");
        $reviewagingdays=odbc_result($rs,"Review_agingdays");
        $evaluationagingdays=odbc_result($rs,"Evaluation_agingdays");

        $closedagingdays=odbc_result($rs,"Closed_agingdays");
        $totalagingdays=odbc_result($rs,"Total_agingdays");
        $classificationofproposal=odbc_result($rs,"Classification_Proposal");
        $present=odbc_result($rs,"Present");
        $proposed=odbc_result($rs,"Proposed");

        $what=odbc_result($rs,"What");
        $when=odbc_result($rs,"When");
        $location=odbc_result($rs,"Location");
        $why=odbc_result($rs,"Why");

        $section=odbc_result($rs,"Section");
        $subprocess=odbc_result($rs,"Sub_process");
        $unitmanager=odbc_result($rs,"Unit_manager");
        $engineer=odbc_result($rs,"Engineer");
        $email=odbc_result($rs,"Emailadd");

        $reference=odbc_result($rs,"Reference");
        $local=odbc_result($rs,"Local");
        $solution=odbc_result($rs,"Solution");
        $primarybenefit=odbc_result($rs,"Primary_benefit");
        $secondarybenefit=odbc_result($rs,"Secondary_benefit");

        $justification=odbc_result($rs,"Justification");
        $typeofwaste=odbc_result($rs,"Type_ofwaste");
        $originator=odbc_result($rs,"Originator");
        $organization=odbc_result($rs,"Organization");
        $_SESSION['ipsnumber']=$ipsnumber;//binago ko materialid=Material_id

        //end ng pagbabago



            echo "<form method='GET' action='updateips.php?ipsnumber=$ipsnumber'><font face='Arial'><tr>Material Id</tr><input type='text' name='$matid' value='$matid' ></tr><br>
                <tr>Department&nbsp;<input type='text' name='$dept' value='$dept'  style = 'width: 300px'></tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<tr>Organization<input type='text' name='$organization' value='$organization'  style = 'width: 300px'> </tr><br>


            <tr>Section&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='text' name='$section' value='$section' disabled='disabled' style = 'width: 300px'></tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<tr>Manager&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='text' name='$manager' value='$manager'  style = 'width: 300px'></tr></br><br><br><br>

            <tr>Group name&nbsp;&nbsp;&nbsp;&nbsp;<input type='text' name='$groupname' value='$groupname'  style = 'width: 300px'></tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<tr>Ips number&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='text' name='$ipsnumber' value='$ipsnumber'  style = 'width: 300px'>    </tr><br><br><br><br>

            <tr>Project title&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='text' name='$projecttitle' value='$projecttitle' style = 'width: 800px'></tr><br><br><br><br><br>


            <tr>Date submitted&nbsp;&nbsp;&nbsp;&nbsp;<input type='text' name='$datesubmitted' value='$datesubmitted'  style = 'width: 300px'></tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<tr>Unit manager&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='text' name='$unitmanager' value='$unitmanager'  style = 'width: 300px'></tr><br>

            <tr>Process&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='text' name='$process' value='$process'  style = 'width: 300px'></tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<tr>Engineer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='text' name='$engineer' value='$engineer' style = 'width: 300px'></tr><br>

            <tr>Subprocess&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='text' name='$subprocess' value='$subprocess' disabled='disabled' style = 'width: 300px'></tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<tr>Email&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='text' name='$email' value='$email'  style = 'width: 300px'></tr><br><br>


            <tr>Reference&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='text' name='$reference' value='$reference'  style = 'width: 300px'></tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<tr>Local&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='text' name='$local' value='$local'  style = 'width: 300px'></tr><br><br><br>

            <tr>Problem</tr><br><br>

            <tr>What</tr><br>
            <tr><textarea  style='height:80px ;width:900px'>$what</textarea></tr></br><br>

            <tr>When</tr><br>
            <tr><textarea  style='height:80px ;width:900px'>$when</textarea></tr></br><br>

            <tr>Location</tr><br>
            <tr><textarea style='height:80px ;width:900px'>$location</textarea></tr></br><br>

            <tr>Why</tr><br>
            <tr><textarea  style='height:80px ;width:900px'>$why</textarea></tr></br><br>

            <tr>Solution</tr><br>
            <tr><textarea  style='height:80px ;width:900px'>$solution</textarea></tr></br><br>


            <tr>Present</tr><br>
            <tr><textarea  style='height:80px ;width:900px'>$present</textarea></tr></br><br>

            <tr>Proposed</tr><br>
            <tr><textarea  style='height:80px ;width:900px'>$proposed</textarea></tr></br><br>

            <tr>Benefits</tr><br><br>
            <tr>Primary&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='text' name='$primarybenefit' value='$primarybenefit'  style = 'width: 300px'><br></tr><br>

            <tr>Secondary&nbsp;&nbsp;&nbsp;&nbsp;<input type='text' name='$primarybenefit' value='$secondarybenefit'  style = 'width: 300px'><br></tr><br>

            <tr>Justification&nbsp;&nbsp;&nbsp;&nbsp;<input type='text' name='$justification' value='$justification'  style = 'width: 300px'></tr><br><br><br>

            <tr>Type of waste&nbsp;&nbsp;&nbsp;&nbsp;<input type='text' name='$typeofwaste' value='$typeofwaste'  style = 'width: 300px'></tr><br><br><br>


            <tr>Originator&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='text' name='$originator' value='$originator'  style = 'width: 300px'></tr></font><input type='Submit' name='submit' value='Submit'></form>";




        $rownum++;          

        }

?>


</form>
</body>
</html>

Recommended Answers

All 2 Replies

Use [code] tag in editor to post ur code.

no worry vibhadevit i was able no solve my problems .thanks for replying

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.