Any body can provide any idea to solve my PHP problem. My problem listed below: **************************************************** Please see below line of html . <table width="100%" border="0"> <tr> <td>The 2nd NATTA Himalayan International <img src="file:///D|/wamp/www/bhoj/asian_exped_new_update/images/pic_06.jpg" width="101" height="28" />Travel Mart 2007 was held in Kathmandu from 11-13 May,<img src="file:///D|/wamp/www/bhoj/asian_exped_new_update/images/pic_01.jpg" width="253" height="124" /></td> </tr> </table> Note: I don't Know how many images are there and above information should be should be taken Text Area ******************************************************* Now I would like to delete the path of the both images (file:///D|/wamp/www/bhoj/asian_exped_new_update/images/) and add extra folder name: uploadfile . I mean I would like to keep image name with uploadfile name in database. That is only (uploadfile /pic_06.jpg) and (uploadfile / pic_01.jpg). That is ****************************************************** Output <table width="100%" border="0"> <tr> <td>The 2nd NATTA Himalayan International <img src="uploadfile/pic_06.jpg" width="101" height="28" />Travel Mart 2007 was held in Kathmandu from 11-13 May,<img src="uploadfile/pic_01.jpg" width="253" height="124" /></td> </tr> </table> *************************************************** Please try to share your knowledge to solve my problem by using PHP scripts. I am waiting for your reply. Please try to give your logic. Reply With Quote
I think what you need is: str_replace("file:///D|/wamp/www/bhoj/asian_exped_new_update/", "uploadfile/", $_POST['your_textarea']); Code (markup):
Hello friend, My problem is that I would like to make online news posting editor. where i can upload both text and image in database. So if u have any resources then plz share with me Regards, B R B
I never store images into the database as it is consume too much resources from the SQL server. Simply store your text + the physical path to your image. That way your database will stay small and will run more quickly and efficiently. Hope this helps. --Tal