title: PHP does not find strings in a certain html element and throws Notice: Undefined index:
body: <p>I am trying to store links of uploaded images to a database via php. It reads all of the elements inside a form. Yet, it does not find the string in here.</p>
  <pre><code>&lt;div class=&quot;hidden&quot; id=&quot;FixedIMG1_1&quot; name=&quot;FixedIMG1_1&quot;&gt;/var/ups/BaianatAqaria60f54840932d7.png &lt;/div&gt;
  </code></pre>
  <p><code>BaianatAqaria60f54840932d7.png</code> is the value that is generated by a php file and I need to store it to a database.
  <a href="https://i.stack.imgur.com/IFzvV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IFzvV.png" alt="enter image description here" /></a></p>
  <p>I added this line in php <code>$img1 = (isset($_POST['FixedIMG1_1']));</code> and <code>echo &quot;&lt;pre&gt;&quot;, $img1, &quot;&lt;/pre&gt;&quot;;</code></p>
  <p>and got:</p>
  <pre><code>Notice: Undefined variable: stmt in /var/www/website/homie/pagies/postadData.php on line 85
  </code></pre>
  <p>I tried another solution and and wrote this variable like this <code>$img1 = (isset($_POST['FixedIMG1_1']) ? $_POST['FixedIMG1_1'] : null);</code></p>
  <p>and the output was no error found, and the variable remained empty. When I tried to store it in my database I got empty values as well.
  <a href="https://i.stack.imgur.com/r20Sz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r20Sz.png" alt="enter image description here" /></a></p>
  <p>As the variable is supposed to be a link, I tried to store it again with <code>realpath()</code> in the database, and I only got the directory of my localhost without the string needed.
  <a href="https://i.stack.imgur.com/XuJbA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XuJbA.png" alt="enter image description here" /></a></p>