Hi,

I am currently having problems inserting a window.open into my PHP code using echo.

What I want to able to do, is open a popup from a link, which contains by variables in the URL.

The code I have at the moment is:

<?  echo (substr(mysql_result($req,$i,2),0, 80)."...<a href=pop_up.php?id=".mysql_result($req,$i,0)." target=blank>see more</a>") ;?>

And the code I want to insert into that is:

<a href="#" onClick="MM_openBrWindow('pop_up.php','','scrollbars=yes,width=300,height=300')">see more</a>

But I want to keep .mysql_result($req,$i,0)." this part of the code in my window open. I have tried numerous things and can't get them to work. Unfortunately, I am new to PHP and don't have a clue how to insert this type of code into my PHP. If anyone has any ideas or can help I would be really grateful.
:eek:

    Well, i've managed to find an answer (or at least a friend has for me) which will do at the moment. I will post it here incase anyone else is looking for this subject.

     <?  echo (substr(mysql_result($req,$i,2),0, 80)); ?>....<a href="#" onClick="MM_openBrWindow('pop_up.php?id=<? echo mysql_result($req,$i,0); ?>','','width=300,height=300')">voir</a>

    In fact, I needed to break out of my PHP as to insert the javascript. There's probably an easier way to do this and I am still interested if anyone knows of one.

    Regards

    Sharon

      Write a Reply...