# URL Not matching up?

**URL:** <https://forum.kirupa.com/t/url-not-matching-up/292727>\
**Category:** programming\
**Created:** [July 18, 2009, 12:35am UTC](https://forum.kirupa.com/t/url-not-matching-up/292727 "2009-07-18T00:35:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![drummer392](https://avatars.discourse-cdn.com/v4/letter/d/45deac/32.png) [@drummer392](https://forum.kirupa.com/u/drummer392)\
**Post date:** [July 18, 2009, 12:35am UTC](https://forum.kirupa.com/t/url-not-matching-up/292727/1 "2009-07-18T00:35:21Z")

</div>

I have this code that puts content into TinyMCE. I have defined the URL, but for some reason, when it adds the image into TinyMCE, it takes off $path and just leaves “/images/upload\_pic/” in the coding. Basically, it puts in the code where the image is from where the editor file is saved.

Any suggestions?

```php
			  $path = "http://www.askassociatesconsulting.com/";
			  $local = "Heriyah/admin/images/upload_pic/";
			    $query0 = "SELECT time, imagepath FROM images";
  $result0 = mysql_query($query0);

while(list($time, $imagepath)= mysql_fetch_row($result0))
{
		echo "<a href=\"#\" onclick=\"tinyMCE.execCommand('mceInsertContent',false,'<b><img src={$path}{$local}{$time}-{$imagepath}></b>');return false;\"><img src=\"{$path}{$local}{$time}-{$imagepath}\" width=\"50px\" height=\"50px\"></a>";
		}

```
