title: Redirecting to HTML from PHP with setting img src
body: <p>
  I am new to HTML and PHP. I am designing a html page which invokes a php for some computation. In the end the php function returns a src path. I want to invoke the initial html page with a pre-existing img tag, and I want to set the src of the img tag to be the src url contained in the php function.</p>
  
  <p>
  I am using the 
  </p>
  
  <pre><code>echo
  '&lt;script&gt;',
  '&lt;a href="Age.html"&gt;&lt;img id= "preview" name= "preview" src=' + $src_path + '/&gt;&lt;/a&gt;;',
  '&lt;/script&gt;';
  </code></pre>
  
  <p>src_path = <a href="http://localhost:8082/AgePage/uploads/case.jpg" rel="nofollow">http://localhost:8082/AgePage/uploads/case.jpg</a>, which I am able to check through echo.
  But it is not redirecting to the Age.html page. If I do simply :</p>
  
  <pre><code>echo
  '&lt;script&gt;',
  'window.location.href = "http://localhost:8082/AgePage/Age.html";',
  '&lt;/script&gt;';
  </code></pre>
  
  <p>It redirects to Age.html page.</p>
  
  <p>
  Please help. The code snippet will be great.
  Thank you
  </p>