Jump to content

How can I allow a user to write text on an image more than once?


Recommended Posts

Hi,

 

I have code (see 2 docs attached) which allows a user to write text on an image - I am using an image map so that the person can click on part of the image and input their text.

 

My problem is that it only allows text to be written on the image once (even though I will have multiple places on the image map that they can click on)  and I need the user to be able to write on it at different places and also at different times.

 

Currently when the text has been written once the user is given a choice whether to open or save the image with the text written on it.  How can I offer the user another chance to write text on the image before giving them the choice to open or save it or even afterwards if they want to go back and have another go ?

 

Thanks

 

[attachment deleted by admin]

You may want to read some documentation on each step and it should become clear how to fit them together.

 

For example http://us3.php.net/manual/en/function.imagepng.php will tell you that you can give a file name instead of outputting to the browser. You can save it to your systems temp folder or elsewhere and manage (delete when no longer needed) your images yourself.

 

Once the file is saved, you can link to it via a <img/> tag.

(if you use the OS temp folder you may need to have a php script retrieve it for you.)

 

At that point you should be back to where you started and the user can do it all over again.

Unless you want to provide the ability to undo changes, I would recommend writing newer file over the older version, as to reduce the files to clean up.

Hi markjoe,

 

I have now saved the file but when reopened the user can no longer write text to it.

 

It seems that I am gong to have to try to use a while loop so that the user can keep on adding text as they wish.

 

But at least I have got that far.

 

Thanks for your help

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.