kev wood Posted November 13, 2008 Share Posted November 13, 2008 i have created an content management system for a flash web site which was all working fine. i have now been asked to add an image upload function to the site to accompany the content already being added. i am trying to upload the article as it was before using forms and sending all the variables over to a processing page which tells the user if it was added or not. the user is then redirected to this page. once back on this page the user has the option to upload an image for that article. i have got the image upload working fine but i cannot get it update the table and put the image in the row for the article. here is the code i have for updating the table $run=mysql_query('select max(id) from internal'); $lastid = mysql_fetch_row($run); $lastid=$lastid[0]; $sql="UPDATE internal SET image= $consname2 WHERE id= $lastid"; $query = mysql_query($sql); the first section of the code is returning the the highest number in the id column but the table is not getting updated. any help with this would be great. Quote Link to comment https://forums.phpfreaks.com/topic/132582-solved-help-needed-with-update/ Share on other sites More sharing options...
fenway Posted November 13, 2008 Share Posted November 13, 2008 Please don't mark topic "solved" unless you post the solution for the benefit of others. Quote Link to comment https://forums.phpfreaks.com/topic/132582-solved-help-needed-with-update/#findComment-689621 Share on other sites More sharing options...
kev wood Posted November 14, 2008 Author Share Posted November 14, 2008 i marked the topic solved as i had help from another part of this site to get the answer (in the php section) as these sections are closely linked i assumed that the majority of people who come on this section will also pay a visit to the php section therefore will be able to see the answer to the question there. Quote Link to comment https://forums.phpfreaks.com/topic/132582-solved-help-needed-with-update/#findComment-690021 Share on other sites More sharing options...
fenway Posted November 17, 2008 Share Posted November 17, 2008 i marked the topic solved as i had help from another part of this site to get the answer (in the php section) as these sections are closely linked i assumed that the majority of people who come on this section will also pay a visit to the php section therefore will be able to see the answer to the question there. If that's the case, then at least post the URL of the related post/thread! I've never visited the php section. Quote Link to comment https://forums.phpfreaks.com/topic/132582-solved-help-needed-with-update/#findComment-692148 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.