> echo "<script language=\"JavaScript\">";
 > echo" function pop1() {";
 > echo" window.open(\"info.php?prod_id=$result[0]\"); }";
 > echo "</script>";

 > I am calling this function in the following manner: echo"<img
 > onclick=\"pop1();\"";

OK, I tend not to put javascript inside php echo statements as it
confuses things - which variables belong to which language.  Second, as
it stands, if I understand you correctly, it won't matter which image is
clicked on, you'll always get the same prod_id.  That's a logic problem.

 > <?
 > $myid = $_GET['prod_id'];
 > echo" Product ID: $myid<br>";
 > ?>

You don't seem to be doing anything much on this yet - except trying to
display text.

Anyway, if you're serious about solving this why not start simpler and
work up.  Create yourself some html with the javascript in it to call
your new php page.  This way you _know_ what is being passed to your
popup.  If this doesn't work then you need to fix your javascript.  If
it does work you can start putting your php back into the first one and
see where it stops working - this will likely be what you need to fix.

In future please reply to the group rather than to me personally - and
no, I'm not going to write your code for you.

CYA, Dave



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to