Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9003901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:46:36+00:00 2026-06-16T00:46:36+00:00

I have the following HTML… <img id=image1 src=URL alt=image1 name=image1 width=137 height=119 border=0 style=position:

  • 0

I have the following HTML…

<img id="image1" src="URL" alt="image1" name="image1" width="137" height="119" border="0" style="position: relative; left: -355px; top: 62px;" >

How would I go about storing the following information into a variable..from the style attribute.

 $variable1 = -355;
 $variable2 = 62;

Thank you in advance!

UPDATE:

Apologies for not explaining clearly and thank you for your help.

The goal right now, after submitting a form on the page, to find all the img tags and store each attribute within the img tag into a PHP variables.

I will then want to store those values into a MySQL database and retrieve them on a different page.

I hope that clears things up.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:46:38+00:00Added an answer on June 16, 2026 at 12:46 am

    If you create the page then you should be able to know these values in advance because you can either assign the variables first and then print them in these tags, or, they are already preset somewhere in the template and you are just going to read these values.

    Otherwise, if that content is generated in another way, not by your system, then you will need some JavaScript code to ‘read’ these attributes and send it to you ‘aside’ as user submits the form. Usually this is done by adding some hidden fields with the something like “document.image1.src” as the value to be sent.

    It is impossible for me to give you even a snipped of code here as we have no idea what really is your application structured like. However, this should give you the understanding on how this works.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following HTML markup, <div id=subcontent_l> <p> <a href=/membership-packages/><img height=202 width=644 alt= src=http://74.52.72.231/wp-content/uploads/2010/06/banner1.jpg
I have following HTML <tr id=r1 class=l1> <td><img class=plusminus id=r1c1 src=assets/images/plus.png border=0 />3/10/12</td> <td></td>
I have following HTML code snippet: <li>2011-10-17</li> <li><p><img style=float: left; alt=photo1 src=/images/stories/site/news/photo1.jpg height=148 width=217>Some
I have the following html to parse: <h1 class=x>test</h1> <p>some text <img src=x /></p>
I have following html codes <div align=center style=width:1000px;border:1px solid green;> <div style=border:1px solid red;float:left;
I have the following html table <table id={64ED3A94-5833-4CC7-869F-CCE583B498BE} class=ms-listviewtable width=100% cellspacing=0 cellpadding=1 border=0 xmlns:o=urn:schemas-microsoft-com:office:office
i have following html page with UL and LI, i try to assign width
I have following HTML with two elements having the same name <input type=hidden name=
I have following html <table> <th>Name</th><th>age</th> <tbody> <tr><td>A</td><td>25</td></tr> <tr><td>B</td><td>30</td></tr> <tr><td>C</td><td>34</td></tr> <tr><td>D</td><td>32</td></tr> </tbody> </table> I
I have following html form: <form method=post action=> <input type=hidden name=userid id=user value=<?php echo

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.