ok so earler i posted about changing a url into a java script, which i now find out, thanks to the reply is easy 🙂
but.... not what i need after all 🙂 so what i do need is a way of changing plain text into a link. i'll try to explain:
i have a page that add an entry to a table in my database, one of the fields is a text box which contains a news story, what i would really like to be able to do is be able to write links out ne where in that text box, without actually have to write the whole html code out ever time.
My idea (which didn't work) was to have two functions on the page that displays my news story 1 called popup and 1 called offpage, which insert all the html i want when i use <?php popup("mypage.htm")?> or <?php offpage("mypage.htm")?>
the functions look like this
<?php
function popup($url)
{
echo("<p class=\"smalltext\" onClick=\"MM_openBrWindow('$url','popup','width=600,height=400')\"><a href=\"#\" class=\"smallwhitelinks\">Click Here</a></p>");
}
?>
the trouble is that if i put <?php popup("potw2.htm")?> into the my story field when i load the page it prints <?php popup("potw2.htm")?> and not what my function should echo.
now i guess that thats becouse i just cant add php to a page like that (i'm guessing cous i've been learning this for only a few hours) but is there another way of doing what i want?
neway thx for reading all that , i know its long 🙁
Knifee