I've narrowed it down considerably. I had an inkling that the PHP might be outputting something to screw the javascript because of the session.
if (arg1 == 2)
{
var text = prompt("Type any text you want to appear as the link"," ")
if (text != " " && text != null)
{
var text2 = prompt("Enter the URL"," ")
if (text2 != " " && text2 != null)
{
document.posterForm.content.value+='<a href="' + text2 + '">' + text + '</a>'
}
}
}
that's a small function to include links in a text area. However, on the first script to use session_start(); what is actually sent to the browser is
document.posterForm.content.value+='<a href="' + text2 + '?PHPSESSID=4d6f74dcfe21bc38890816042797e501">' + text + '</a>'
(This is the sligthly edited version to the one that was malfunctioning by the way. Now it adds the session id to the link URL.)