Jump to content

[SOLVED] Updating data via a form


chrisuk

Recommended Posts

I am trying to figure out how to read in data from an entry in a MySQL database into a form, so that I can then alter that data when necessary and then save it, updating the database.

 

I know that you need to use an Update query to perform the actual update, but how do i get the data into the form in the first place?

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/38781-solved-updating-data-via-a-form/
Share on other sites

Actually i'm still having a bit of trouble with this...

 

I'm trying to get data from the database into the from so it can be updated....as i've already said.

 

When the user clicks on the link, the URL is appended with the ID of the particular issue...eg:

 

viewcall.php?issue_id=16

 

So i have my query code as follows:

 

$sql = "SELECT * FROM Issues WHERE issue_id ='$_GET[issue_id]'";

$result = mysql_query($sql)or die("error");

 

Now - when i try to show the data from that row, the only thing that shows up is the issue_id - which i'm assuming is just coming from the URL?

 

What am I doing wrong?

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.