Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1064677

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T19:39:17+00:00 2026-05-16T19:39:17+00:00

i have a table called horse, i would like to create a form to

  • 0

i have a table called horse, i would like to create a form to edit the horse_name and horse_height, but the data cannot be updated, it turns out there is a problem with the update query, when i print the query to show the values, the horse_name value is equal to horse_height

<body bgcolor="#009933">
<?php
     include("connection.php"); 
     $conn = oci_connect($UName,$PWord,$DB);
     if(empty($_POST["check"]))
     {
    $query="SELECT * FROM horse ORDER BY horse_name";
    $stmt = oci_parse($conn, $query);
    oci_execute($stmt);


   ?>
<center> <font face="Arial" size="3"><b>Horse Details</b></font>
</center>

<form method="post" action="multiplehorsemodify.php">  
<table border="1" align="center">
  <tr>
  <th>Horse ID</th>
  <th>Name</th>
  <th>Height</th>
  <th>Edit?</th>

  </tr>


  <?php 
        while($row = oci_fetch_array ($stmt))
        {
  ?>
         <tr>
         <td><?php echo $row["HORSE_ID"]; ?></td>
         <td align="center">
         <input type="text" size="24" 
            name="<?php echo $row["HORSE_ID"]; ?>" 
            value="<?php echo $row["HORSE_NAME"]; ?>"></td>

         <td align="center">
         <input type="text" size="5" 
            name="<?php echo $row["HORSE_ID"]; ?>" 
            value="<?php echo $row["HORSE_HEIGHT"]; ?>"></td>
         <td align="center">

<input type="checkbox" name="check[]" value="<?php echo $row["HORSE_ID"]; ?>">

      </td>

         </tr>
  <?php 
        }
  ?>
  </table>
<center>
    <input type="submit" 
      value="Update Selected Titles" />
  </center>
</form>
<?php
    oci_free_statement($stmt);
     }
     else
     {
         foreach($_POST["check"] as $horse_id)  
         {
             echo $horse_id;
             $query = "UPDATE horse set horse_name = ".$_POST[$horse_id]."horse_height = ".$_POST[$horse_id]." WHERE horse_id = '".$horse_id."'";
             echo $query;
            $stmt = oci_parse($conn,$query);
            oci_execute($stmt);
            header("location: multiplehorsemodify.php");
         }
     }
     oci_close($conn);
?>

</body>

  • 0 0 Answers
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Related Questions

i have a table called horse, i would like to create a form to
I have table called Data_Details and the data looks like: DateTimeClosed Datesub TimeSub 6/20/2011
I have a table called 'MyTable' that looks like: ID | Item | Type
I have table called Direccion other called Cliente each one defined like this public
i have table called type which contains data family,individual i want in some pages
I have a table called users where the employee data are stored. Also I
I have a table called reports it looks like: user_id | report_post 1 2
hi i have table called products with columns product_id prodcut_name prodcut_price( values like 1200,2000,3000,100)
i have table called table1 and it looks like the below record type tran_ref_number
I have a table called table and its filled with data, I also have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.