chrisuk Posted February 16, 2007 Share Posted February 16, 2007 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 More sharing options...
jcbarr Posted February 16, 2007 Share Posted February 16, 2007 Use a select query to get the data that you need and then echo it into the form tags where you want it to appear. Link to comment https://forums.phpfreaks.com/topic/38781-solved-updating-data-via-a-form/#findComment-186440 Share on other sites More sharing options...
chrisuk Posted February 18, 2007 Author Share Posted February 18, 2007 that easy eh! thanks Link to comment https://forums.phpfreaks.com/topic/38781-solved-updating-data-via-a-form/#findComment-187935 Share on other sites More sharing options...
chrisuk Posted February 19, 2007 Author Share Posted February 19, 2007 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? Link to comment https://forums.phpfreaks.com/topic/38781-solved-updating-data-via-a-form/#findComment-188637 Share on other sites More sharing options...
chrisuk Posted February 19, 2007 Author Share Posted February 19, 2007 never mind, sorted it Link to comment https://forums.phpfreaks.com/topic/38781-solved-updating-data-via-a-form/#findComment-188656 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.