PHP - AREA tags - replace shape coords with strings

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tommydog
    New Member
    • Sep 2006
    • 10

    PHP - AREA tags - replace shape coords with strings

    i am trying to generate an image map from the mouse coords of a click.
    i can pass the X Y through ok as
    $_POST['submit_x']
    $_POST['submit_y']
    how should the string be put into the AREA tag ?
    i am keeping the diameter as 10

    this is what i am trying:
    echo "SHAPE=CIRC LE COORDS="'.$_POS T['submit_x'].',143,10">";
  • tommydog
    New Member
    • Sep 2006
    • 10

    #2
    ok i worked it out !

    COORDS={$_POST['submit_x']},{$_POST['submit_y']},10\">";

    Comment

    • tbb9216
      New Member
      • Sep 2006
      • 16

      #3
      im pretty sure this will only work in IE and when you click on a submit button that uses an image.

      let me know if im wrong, best of luck to you

      -tim

      Comment

      • tommydog
        New Member
        • Sep 2006
        • 10

        #4
        Originally posted by tbb9216
        im pretty sure this will only work in IE and when you click on a submit button that uses an image.

        let me know if im wrong, best of luck to you

        -tim
        when do i write my data to the data base?

        i am building a browser based image map generator using php. each time an image is clicked the coords and a text box contents are to be saved somehow. i am expecting upto 50 lines of data for each image (x coord, y coord and text) :

        sample data:
        image name x y description
        image7.jpg 123 123 wheel
        image7.jpg 485 688 tyre
        image7.jpg 456 595 bolt

        later on i will display the image and create the hotspots image map with the text data (description) as html alt tags.

        i have a data table in MYSQL with 4 columns:
        1 image name
        2 x_coord
        3 y_coord
        4 text for alt tags

        do i collect 50 sets of data in a temp file or array or something and then write it to the database in one go or write each line of data as it is created ? my worry is that if i write to the database it may be a pain to edit any mistakes. so maybe some kind of preview table might be a good idea....

        Comment

        Working...