mrjameer Posted January 7, 2007 Share Posted January 7, 2007 hi,i have a mysql table called footers.it's fields are as followsid--caption--content1--aboutus--some company info2--privacy--privacy info3--copyright--copyright infohere i retrieved all the captions from table and print in the footer position on my form as footer menu.what i want to do actually is when i click aboutus,it should open small window and display the aboutus content from mysql table,similarly when i click privacy,it should open a small window and should display privacy info like that.everything i did,but when i click aboutus,it shows all the three records from table.i want to display uniquely.means if i click aboutus it should display only aboutus info in small window like that..any of your help will be greatly appreciatedhere is my code<?php$conn4=mysql_connect("localhost","","");mysql_select_db("jrm",$conn4);$sql="SELECT * FROM footers";$result=mysql_query($sql,$conn4) or die (mysql_error());echo "<center><table border='0' style='text-align:left;'><tr>";while($newarray=mysql_fetch_array($result)){ $caption=$newarray['caption']; echo "<center><a style='text-decoration:underline;'href onclick=window.open('xyz.php','','top=200,left=350,screenY=0,screenX=0,width=400,height=300,scrollbars=yes');><td><font color='white'><b>".$caption. " </b></font></td></a></center>";}echo "</tr></table></center>";?>xyz.php------<?php$conn4=mysql_connect("localhost","","");mysql_select_db("jrm",$conn4);$sql="SELECT * FROM footers";$result=mysql_query($sql,$conn4) or die (mysql_error());while($newarray=mysql_fetch_array($result)){ $caption=$newarray['caption']; $content=$newarray['content'];echo "<center><b><u><font color='navy'>".$caption."</font></b></u><br><font color='green'>".$content."</font></center>";}?>is it possible without using xyz.php file,i will display the $content in small window directlythanksmrjameer Link to comment https://forums.phpfreaks.com/topic/33202-handling-onclick-windowopen/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.