Jump to content

Displaying results in textbox to be used for updating database


ellchr3

Recommended Posts

Now that I can get my results to display in a text box for editing, what's the best way to do so?  The code below is what I was attempting but I can see already it won't work.  When the results are displayed it will run the update query too.  Plus, I'm not sure how to tell the code which records were changed if multiples were changed.  Can someone lead me in the right direction on how to do this?  Point me to a tutorial or offer a bit of assistance on how to start?  Thanks!

  echo "<tr><td>$firstname</td>";
  echo "<td><input type=\"text\" name=\"firstnameupdate\" value=\"" . $firstname . "\" ></td>";
  echo "<td>$middleinitial</td>";
  echo "<td>$lastname</td>";
  echo "<td>$fullname</td>";
  echo "<td>$provider_id</td>";
  echo "<td><input type=\"text\" name=\"textfield\" value=\"" . $providerid . "\" ></td>";
  //echo "<td>$providerid</td></tr>";
  }
  echo "</table>";
  
    $firstnameupdate='firstnameupdate';
 $sql1="UPDATE crr.provider_dim_bk set provider_first_name = $firstnameupdate where provider_id = $provider_id";
 $rs1=odbc_exec($conn,$sql1);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.