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);
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.