PHP upload script with auto edit of file after upload?

Links for php scripts

Moderators: macek, egami, gesf

fentontech
New php-forum User
New php-forum User
Posts: 1
Joined: Thu May 24, 2012 11:52 am

PHP upload script with auto edit of file after upload?

Postby fentontech » Thu May 24, 2012 12:07 pm

I have no idea how to search for this function to find a solution but I am hoping you gurus can help me out.

This is most likel a simple script that I cant tie together myself and it would most likely take me days where it would take you guys minutes so here it goes....

was hoping for an ajax page where you have a form where you submit a file(xml) and a text value(example: MI0601503), all that would happen is that the script would edit the xml file by replacing anything after <COL82_BUILDING_ID> and before </COL82_BUILDING_ID> with the text value supplied in the form submited. I would also like to see a link to allow download of the new file....

Any help or suggestions would be greatly appreaciated.

Thank you

Example

Before edit:<?xml version="1.0"?>
<COL82_DETAIL>
<COL82_PROJECT_ID>3238</COL82_PROJECT_ID>
<COL82_BUILDING_ID>MI-06-015</COL82_BUILDING_ID>
<COL82_UNIT_ID>2348</COL82_UNIT_ID>
<COL82_REPORT_START_DT>20120101</COL82_REPORT_START_DT>
<COL82_REPORT_END_DT>20120331</COL82_REPORT_END_DT>
<COL82_BEDROOM_SIZE>2</COL82_BEDROOM_SIZE>
<COL82_UNIT_SQFT>01000</COL82_UNIT_SQFT>
<COL82_UNIT_TYPE>0099</COL82_UNIT_TYPE>
</COL82_DETAIL>
</COL82_FILE>

After edit:
<?xml version="1.0"?>
<COL82_DETAIL>
<COL82_PROJECT_ID>3238</COL82_PROJECT_ID>
<COL82_BUILDING_ID>MI0601503</COL82_BUILDING_ID>
<COL82_UNIT_ID>2348</COL82_UNIT_ID>
<COL82_REPORT_START_DT>20120101</COL82_REPORT_START_DT>
<COL82_REPORT_END_DT>20120331</COL82_REPORT_END_DT>
<COL82_BEDROOM_SIZE>2</COL82_BEDROOM_SIZE>
<COL82_UNIT_SQFT>01000</COL82_UNIT_SQFT>
<COL82_UNIT_TYPE>0099</COL82_UNIT_TYPE>
</COL82_DETAIL>
</COL82_FILE>

User avatar
Nullsig
php-forum Fan User
php-forum Fan User
Posts: 981
Joined: Thu Feb 17, 2011 6:52 am
Location: Racine, WI

Re: PHP upload script with auto edit of file after upload?

Postby Nullsig » Thu May 24, 2012 12:23 pm



Return to “PHP Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest

cron