dashysearching Posted October 23, 2007 Share Posted October 23, 2007 Hi everyone, I am fetching data from an xml file where the format is <firstname>David</firstname> <lastname>Rosberg</lastname> <division>ABC</division> <photolink>1_thumb.jpg</photolink> Using xforms i am able to change the firstname, lastname and divison fields but i am not able to change photolink from the webform. I need the user to change the existing image so that the new link is updated or replaced in the XML file. Can someone help me ???? Quote Link to comment https://forums.phpfreaks.com/topic/74505-changing-existing-image/ Share on other sites More sharing options...
Toshiba23 Posted October 24, 2007 Share Posted October 24, 2007 why not just have str_replace("<photolink>".$oldphoto."</photolink>", "<photolink>".$newphoto."</photolink>", $xml); ? Quote Link to comment https://forums.phpfreaks.com/topic/74505-changing-existing-image/#findComment-376807 Share on other sites More sharing options...
dashysearching Posted October 24, 2007 Author Share Posted October 24, 2007 Thanks for early reply. I will remodify the query, the XML file is on the server and when the user changes or uploads a new image, the old path in the xml file should be replaced by the new path ,so that when the user (client-side) logs in again the new image is available. For this purpose the string replace function will not work. Please reply. Quote Link to comment https://forums.phpfreaks.com/topic/74505-changing-existing-image/#findComment-377117 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.