Mad Cow Posted November 21, 2007 Share Posted November 21, 2007 Hello, I am new to PHP and trying to help recover a website after a HDD crash. Our original programmer was shipped out to the middle east and those of us left in charge dont do PHP. I am trying to get our member map to work again. http://www.osfhome.com/mem_map On mouse over it should return a list of members that live in the state or return the statement "We have no members in $state2" I have checked to make sure that the db connections are good and they are. I have checked the sql statement and it returns the info we want. I don't understand why it doesn't work. Maybe a syntax error? Something selse that I just dont know of? I am counting on the PHP freaks to help me out. Thanks in advance. Code: get_members.php <? include "../mysql_connect.php"; include "state_list.php"; @mysql_connect($hostname, $username, $password) or die("Can't connect to db"); @mysql_select_db($dbName) or die("Can't select DB $dbName"); $sql = mysql_query("SELECT m.name, pf.field_4, pf.field_5, pf.field_7 FROM ibf_members AS m LEFT OUTER JOIN ibf_pfields_content AS pf ON m.id = pf.member_id WHERE pf.field_4='$state' AND pf.field_7='active' ORDER BY m.name"); ?> <center> <table border="1" cellpadding="0" cellspacing="0" width="100%" bordercolor="#000000" bgcolor="#88A882"> <tr> <td width="100%"> <p style="margin: 2" align="center"><font face="verdana" size="2"><b><? echo $state2 ?></b></td> </tr> </table> <? IF (@mysql_num_rows($sql)=="0"){ echo "<font face='Verdana' size='2'>We have no members in " .$state2. '</font>'; } ?> <? while( $row = mysql_fetch_array($sql) ) { ?> <table border="0" cellpadding="0" cellspacing="0" width="100%" bordercolor="#000000" bgcolor="#88A882"> <tr> <td width="100%"> <p style="margin-left: 3; margin-right: 3; margin-top: 0; margin-bottom: 0"> <font face="verdana" size="2"><? echo $row[0]; ?></font> </p> </td> </tr> <? } ?> </table> index.php <? error_reporting(0); ?> <html> <head> <link rel="stylesheet" type="text/css" href="../default.css"> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_showHideLayers() { //v6.0 var i,p,v,obj,args=MM_showHideLayers.arguments; for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2]; if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; } obj.visibility=v; } } //--> </script> </head> <body marginheight=10 marginwidth=20 topmargin=10 leftmargin=20 bgcolor="#FFEECC" background="../images/parchment.gif" bgproperties="fixed"> <p align="right"><img src="map.gif" width="800" height="600" border="0" usemap="#Map"> <map name="Map"> <area shape="poly" coords="811,365" href="#"> <area shape="poly" coords="41,142,71,119,37,120,30,96,90,73,68,64,98,47,118,48,106,31,179,12,247,24,182,107,140,94" href="#" onMouseOver="MM_showHideLayers('AK','','show')" onMouseOut="MM_showHideLayers('AK','','hide')"> <area shape="poly" coords="246,22,262,29" href="#"> <area shape="poly" coords="249,23,271,30,320,17,412,40,474,36,488,30,474,17,481,3,512,24,523,40,531,20,546,23,555,43,542,56,478,106,185,106" href="#" onMouseOver="MM_showHideLayers('NT','','show')" onMouseOut="MM_showHideLayers('NT','','hide')"> <area shape="poly" coords="189,108,241,223,260,216,322,217,319,201,294,169,312,108" href="#" onMouseOver="MM_showHideLayers('BC','','show')" onMouseOut="MM_showHideLayers('BC','','hide')"> <area shape="poly" coords="314,108,377,108,354,216,323,217,323,203,297,167" href="#" onMouseOver="MM_showHideLayers('AB','','show')" onMouseOut="MM_showHideLayers('AB','','hide')"> <area shape="poly" coords="378,108,429,108,420,217,355,217" href="#" onMouseOver="MM_showHideLayers('SK','','show')" onMouseOut="MM_showHideLayers('SK','','hide')"> <area shape="poly" coords="430,107,477,107,478,119,483,118,490,136,501,133,512,141,469,178,467,217,421,217" href="#" onMouseOver="MM_showHideLayers('MB','','show')" onMouseOut="MM_showHideLayers('MB','','hide')"> <area shape="poly" coords="513,141,538,153,559,154,562,176,582,193,587,234,593,245,611,252,627,253,629,258,617,267,595,270,591,276,568,292,566,279,574,258,589,262,578,249,552,245,545,227,523,217,508,228,470,216,470,180" href="#" onMouseOver="MM_showHideLayers('ON','','show')" onMouseOut="MM_showHideLayers('ON','','hide')"> <area shape="poly" coords="583,191,593,183" href="#"> <area shape="poly" coords="581,191,592,184,579,159,597,143,580,117,580,88,599,85,631,97,653,121,664,105,690,157,662,157,681,184,746,187,735,202,687,203,703,220,672,227,662,234,657,253,633,256,621,249,595,241" href="#" onMouseOver="MM_showHideLayers('QC','','show')" onMouseOut="MM_showHideLayers('QC','','hide')"> <area shape="poly" coords="665,104,760,178,764,199,786,211,798,238,749,233,751,193,744,183,683,181,670,161,696,155" href="#" onMouseOver="MM_showHideLayers('NL','','show')" onMouseOut="MM_showHideLayers('NL','','hide')"> <area shape="poly" coords="253,223,260,217,300,217,294,247,248,248,243,224" href="#" onMouseOver="MM_showHideLayers('WA','','show')" onMouseOut="MM_showHideLayers('WA','','hide')"> <area shape="poly" coords="300,218,307,218,314,242,312,251,322,265,337,262,331,288,288,289" href="#" onMouseOver="MM_showHideLayers('ID','','show')" onMouseOut="MM_showHideLayers('ID','','hide')"> <area shape="poly" coords="241,245,249,255,291,251,283,290,226,290" href="#" onMouseOver="MM_showHideLayers('OR','','show')" onMouseOut="MM_showHideLayers('OR','','hide')"> <area shape="poly" coords="227,292,258,292,250,324,292,375,286,394,270,398,240,376,224,328" href="#" onMouseOver="MM_showHideLayers('CA','','show')" onMouseOut="MM_showHideLayers('CA','','hide')"> <area shape="poly" coords="311,219,396,219,393,256,340,255,324,258" href="#" onMouseOver="MM_showHideLayers('MT','','show')" onMouseOut="MM_showHideLayers('MT','','hide')"> <area shape="poly" coords="400,219,450,218,452,246,398,248" href="#" onMouseOver="MM_showHideLayers('ND','','show')" onMouseOut="MM_showHideLayers('ND','','hide','ND','','hide')"> <area shape="poly" coords="260,294,306,294,296,353,290,360,255,323" href="#" onMouseOver="MM_showHideLayers('NV','','show')" onMouseOut="MM_showHideLayers('NV','','hide')"> <area shape="poly" coords="341,261,392,261,387,299,335,299" href="#" onMouseOver="MM_showHideLayers('WY','','show')" onMouseOut="MM_showHideLayers('WY','','hide')"> <area shape="poly" coords="311,294,330,292,329,303,344,306,339,344,304,344" href="#" onMouseOver="MM_showHideLayers('UT','','show')" onMouseOut="MM_showHideLayers('UT','','hide')"> <area shape="poly" coords="301,349,338,348,333,407,315,408,291,396" href="#" onMouseOver="MM_showHideLayers('AZ','','show')" onMouseOut="MM_showHideLayers('AZ','','hide')"> <area shape="poly" coords="398,252,449,252,449,278,437,278,396,278" href="#" onMouseOver="MM_showHideLayers('SD','','show')" onMouseOut="MM_showHideLayers('SD','','hide')"> <area shape="poly" coords="350,307,402,306,400,344,346,344" href="#" onMouseOver="MM_showHideLayers('CO','','show')" onMouseOut="MM_showHideLayers('CO','','hide')"> <area shape="poly" coords="345,350,391,350,386,400,355,401,339,410" href="#" onMouseOver="MM_showHideLayers('NM','','show')" onMouseOut="MM_showHideLayers('NM','','hide')"> <area shape="poly" coords="394,283,436,282,447,284,458,310,407,309,410,300,392,298" href="#" onMouseOver="MM_showHideLayers('NE','','show')" onMouseOut="MM_showHideLayers('NE','','hide')"> <area shape="poly" coords="407,315,460,315,464,323,464,344,407,344" href="#" onMouseOver="MM_showHideLayers('KS','','show')" onMouseOut="MM_showHideLayers('KS','','hide')"> <area shape="poly" coords="394,347,464,348,464,379,445,380,421,372,420,353" href="#" onMouseOver="MM_showHideLayers('OK','','show')" onMouseOut="MM_showHideLayers('OK','','hide')"> <area shape="poly" coords="394,354,416,356,417,374,440,387,459,384,467,387,471,427,440,450,439,472,420,465,398,429,384,437,361,407,391,405" href="#" onMouseOver="MM_showHideLayers('TX','','show')" onMouseOut="MM_showHideLayers('TX','','hide')"> <area shape="poly" coords="453,220,469,220,501,231,484,240,482,251,482,263,492,272,458,273" href="#" onMouseOver="MM_showHideLayers('MN','','show')" onMouseOut="MM_showHideLayers('MN','','hide')"> <area shape="poly" coords="454,278,493,278,495,285,502,292,494,304,461,304" href="#" onMouseOver="MM_showHideLayers('IA','','show')" onMouseOut="MM_showHideLayers('IA','','hide')"> <area shape="poly" coords="492,240,525,258,522,284,505,283,495,272,485,259" href="#" onMouseOver="MM_showHideLayers('WI','','show')" onMouseOut="MM_showHideLayers('WI','','hide')"> <area shape="poly" coords="462,309,491,308,511,343,507,354,504,351,469,349,466,324" href="#" onMouseOver="MM_showHideLayers('MO','','show')" onMouseOut="MM_showHideLayers('MO','','hide')"> <area shape="poly" coords="468,355,502,354,506,358,495,379,495,388,472,389,469,381" href="#" onMouseOver="MM_showHideLayers('AR','','show')" onMouseOut="MM_showHideLayers('AR','','hide')"> <area shape="poly" coords="505,291,521,291,525,327,517,341,507,330,497,311" href="#" onMouseOver="MM_showHideLayers('IL','','show')" onMouseOut="MM_showHideLayers('IL','','hide')"> <area shape="poly" coords="471,394,493,394,494,401,490,412,504,417,512,425,515,437,499,437,488,430,476,431" href="#" onMouseOver="MM_showHideLayers('LA','','show')" onMouseOut="MM_showHideLayers('LA','','hide')"> <area shape="poly" coords="528,298,533,293,546,297,547,321,538,332,525,336,528,324" href="#" onMouseOver="MM_showHideLayers('IN','','show')" onMouseOut="MM_showHideLayers('IN','','hide')"> <area shape="poly" coords="550,295,568,299,581,293,583,313,570,325,553,321" href="#" onMouseOver="MM_showHideLayers('OH','','show')" onMouseOut="MM_showHideLayers('OH','','hide')"> <area shape="poly" coords="516,349,525,341,541,338,550,328,566,331,569,340,564,348" href="#" onMouseOver="MM_showHideLayers('KY','','show')" onMouseOut="MM_showHideLayers('KY','','hide')"> <area shape="poly" coords="513,354,573,352,551,367,505,368" href="#" onMouseOver="MM_showHideLayers('TN','','show')" onMouseOut="MM_showHideLayers('TN','','hide')"> <area shape="poly" coords="503,371,518,370,516,405,519,421,512,422,495,409" href="#" onMouseOver="MM_showHideLayers('MS','','show')" onMouseOut="MM_showHideLayers('MS','','hide')"> <area shape="poly" coords="524,371,542,370,548,400,549,411,524,415,520,403" href="#" onMouseOver="MM_showHideLayers('AL','','show')" onMouseOut="MM_showHideLayers('AL','','hide')"> <area shape="poly" coords="528,419,550,415,556,418,583,420,599,462,597,482,589,481,575,457,571,438,562,426,547,429" href="#" onMouseOver="MM_showHideLayers('FL','','show')" onMouseOut="MM_showHideLayers('FL','','hide')"> <area shape="poly" coords="546,371,564,370,586,401,581,416,553,412" href="#" onMouseOver="MM_showHideLayers('GA','','show')" onMouseOut="MM_showHideLayers('GA','','hide')"> <area shape="poly" coords="567,371,589,398,605,383,598,373,583,371" href="#" onMouseOver="MM_showHideLayers('SC','','show')" onMouseOut="MM_showHideLayers('SC','','hide')"> <area shape="poly" coords="559,367,584,366,598,370,607,380,629,365,627,350,578,352" href="#" onMouseOver="MM_showHideLayers('NC','','show')" onMouseOut="MM_showHideLayers('NC','','hide')"> <area shape="poly" coords="572,342,590,342,606,324,613,326,619,336,622,347,570,348" href="#" onMouseOver="MM_showHideLayers('VA','','show')" onMouseOut="MM_showHideLayers('VA','','hide')"> <area shape="poly" coords="585,318,570,329,576,339,589,338,602,322" href="#" onMouseOver="MM_showHideLayers('WV','','show')" onMouseOut="MM_showHideLayers('WV','','hide')"> <area shape="poly" coords="585,293,626,292,628,302,630,310,623,314,587,314" href="#" onMouseOver="MM_showHideLayers('PA','','show')" onMouseOut="MM_showHideLayers('PA','','hide')"> <area shape="poly" coords="587,292,597,279,617,274,630,260,637,262,638,276,640,283,640,299,628,291" href="#" onMouseOver="MM_showHideLayers('NY','','show')" onMouseOut="MM_showHideLayers('NY','','hide')"> <area shape="poly" coords="673,231,679,236,681,246,688,259,707,249,698,233,698,224" href="#" onMouseOver="MM_showHideLayers('NB','','show')" onMouseOut="MM_showHideLayers('NB','','hide')"> <area shape="poly" coords="664,235,671,234,676,241,677,248,686,260,665,278,658,258" href="#" onMouseOver="MM_showHideLayers('ME','','show')" onMouseOut="MM_showHideLayers('ME','','hide')"> <area shape="poly" coords="638,259,651,258,644,281" href="#" onMouseOver="MM_showHideLayers('VT','','show')" onMouseOut="MM_showHideLayers('VT','','hide')"> <area shape="poly" coords="654,260,662,282,648,283" href="#" onMouseOver="MM_showHideLayers('NH','','show')" onMouseOut="MM_showHideLayers('NH','','hide')"> <area shape="poly" coords="608,318,618,326,628,344,644,310,662,301,673,301,666,286,644,285,644,299,639,304,633,299,634,311,629,317" href="#" alt="Click here to enlarge" onClick="MM_showHideLayers('LARGE','','show')" onMouseOver="MM_showHideLayers('LARGE2','','show')" onMouseOut="MM_showHideLayers('LARGE2','','hide')"> <area shape="poly" coords="533,290,546,294,560,292,563,271,558,255,540,240,521,233,505,241,526,252,538,253" href="#" onMouseOver="MM_showHideLayers('MI','','show')" onMouseOut="MM_showHideLayers('MI','','hide')"> <area shape="poly" coords="707,249,719,251,738,240,746,248,706,276,697,266,711,255" href="#" onMouseOver="MM_showHideLayers('NS','','show')" onMouseOut="MM_showHideLayers('NS','','hide')"> <area shape="poly" coords="702,236,716,233,725,238,722,248,710,247" href="#" onMouseOver="MM_showHideLayers('PE','','show')" onMouseOut="MM_showHideLayers('PE','','hide')"> <area shape="poly" coords="736,13,708,67,765,67" href="#" onMouseOver="MM_showHideLayers('INFO','','show')" onMouseOut="MM_showHideLayers('INFO','','hide')"> <area shape="poly" coords="693,368,707,404,701,425,710,438,724,426,728,429,726,445,759,424,742,419,755,403,744,390,724,396" href="#" onMouseOver="MM_showHideLayers('OT','','show')" onMouseOut="MM_showHideLayers('OT','','hide')"> </map> </p> <div id="LARGE" style="position:absolute; width:291px; height:299px; z-index:1; left: 566px; top: 6px; layer- border: 1px none #000000; overflow: visible; visibility: hidden;"> <div align="center"> <p><img src="map2.gif" width="248" height="233" border="0" usemap="#Map2"> <map name="Map2"> <area shape="poly" coords="110,8,114,20,114,28,123,49,124,82,130,112,133,118,161,104,166,104,168,110,137,130,125,125,125,118,104,112,90,93,9,111,11,89,19,68,42,68,60,53,54,39,63,24" href="#" onMouseOver="MM_showHideLayers('NY','','show')" onMouseOut="MM_showHideLayers('NY','','hide')"> <area shape="poly" coords="113,8,117,21,117,28,125,45,126,61,140,60,140,47,137,33,142,28,141,13,143,9" href="#" onMouseOver="MM_showHideLayers('VT','','show')" onMouseOut="MM_showHideLayers('VT','','hide')"> <area shape="poly" coords="146,10,145,29,142,35,144,59,170,53,177,42,170,36,170,28,162,14" href="#" onMouseOver="MM_showHideLayers('NH','','show')" onMouseOut="MM_showHideLayers('NH','','hide')"> <area shape="poly" coords="166,13,172,26,173,33,181,41,184,34,186,24" href="#" onMouseOver="MM_showHideLayers('ME','','show')" onMouseOut="MM_showHideLayers('ME','','hide')"> <area shape="poly" coords="128,67,171,56,177,48,184,54,180,60,194,75,205,73,207,78,188,85,173,75,129,83" href="#" onMouseOver="MM_showHideLayers('MA','','show')" onMouseOut="MM_showHideLayers('MA','','hide')"> <area shape="poly" coords="166,78,172,77,186,87,168,98" href="#" onMouseOver="MM_showHideLayers('RI','','show')" onMouseOut="MM_showHideLayers('RI','','hide')"> <area shape="poly" coords="129,87,135,112,143,106,164,97,162,80" href="#" onMouseOver="MM_showHideLayers('CT','','show')" onMouseOut="MM_showHideLayers('CT','','hide')"> <area shape="poly" coords="104,115,121,120,120,132,131,134,135,155,127,169,125,183,115,178,105,174,101,161,115,149,102,132" href="#" onMouseOver="MM_showHideLayers('NJ','','show')" onMouseOut="MM_showHideLayers('NJ','','hide')"> <area shape="poly" coords="7,115,88,97,100,112,96,133,109,148,93,161,24,174,10,148" href="#" onMouseOver="MM_showHideLayers('PA','','show')" onMouseOut="MM_showHideLayers('PA','','hide')"> <area shape="poly" coords="100,161,102,175,122,190,106,199,95,167" href="#" onMouseOver="MM_showHideLayers('DE','','show')" onMouseOut="MM_showHideLayers('DE','','hide')"> <area shape="poly" coords="46,174,90,166,103,201,119,197,115,223,104,222,91,204,87,212,78,210,69,210,72,198,69,192,60,186" href="#" onMouseOver="MM_showHideLayers('MD','','show')" onMouseOut="MM_showHideLayers('MD','','hide')"> <area shape="rect" coords="153,142,209,162" href="#" onClick="MM_showHideLayers('LARGE','','hide')"> </map> </p> <p align="center"> </p> </div> </div> <div id="LARGE2" style="position:absolute; width:200px; height:86px; z-index:1; left: 5px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Click to enlarge this area</font></div> <div id="INFO" style="position:absolute; width:200px; height:261px; z-index:1; left: 5px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Move your cursor over the Provinces, States and aircraft to display current members from each area</font></div> <div id="OT" style="position:absolute; width:200px; height:322px; z-index:1; left: 5px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members_other.php?state=OT'; ?> </div> <div id="WY" style="position:absolute; width:200px; height:322px; z-index:1; left: 5px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=WY'; ?> </div> <div id="WI" style="position:absolute; width:200px; height:322px; z-index:1; left: 5px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=WI'; ?> </div> <div id="WV" style="position:absolute; width:200px; height:322px; z-index:1; left: 5px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=WV'; ?> </div> <div id="WA" style="position:absolute; width:200px; height:322px; z-index:1; left: 5px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=WA'; ?> </div> <div id="VA" style="position:absolute; width:200px; height:322px; z-index:1; left: 5px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=VA'; ?> </div> <div id="VI" style="position:absolute; width:200px; height:322px; z-index:1; left: 5px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=VI'; ?> </div> <div id="VT" style="position:absolute; width:200px; height:322px; z-index:1; left: 5px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=VT'; ?> </div> <div id="UT" style="position:absolute; width:200px; height:322px; z-index:1; left: 5px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=UT'; ?> </div> <div id="TX" style="position:absolute; width:200px; height:322px; z-index:1; left: 5px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=TX'; ?> </div> <div id="TN" style="position:absolute; width:200px; height:322px; z-index:1; left: 5px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=TN'; ?> </div> <div id="SD" style="position:absolute; width:200px; height:322px; z-index:1; left: 5px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=SD'; ?> </div> <div id="SC" style="position:absolute; width:200px; height:322px; z-index:1; left: 5px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=SC'; ?> </div> <div id="RI" style="position:absolute; width:200px; height:322px; z-index:1; left: 5px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=RI'; ?> </div> <div id="PA" style="position:absolute; width:200px; height:322px; z-index:1; left: 5px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=PA'; ?> </div> <div id="OR" style="position:absolute; width:200px; height:322px; z-index:1; left: 5px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=OR'; ?> </div> <div id="OK" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=OK'; ?> </div> <div id="OH" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=OH'; ?> </div> <div id="ND" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=ND'; ?> </div> <div id="NC" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=NC'; ?> </div> <div id="NY" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=NY'; ?> </div> <div id="NM" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=NM'; ?> </div> <div id="NJ" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=NJ'; ?> </div> <div id="NH" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; layer- border: 1px none #000000; visibility: hidden;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=NH'; ?> </div> <div id="NV" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=NV'; ?> </div> <div id="NE" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=NE'; ?> </div> <div id="MT" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=MT'; ?> </div> <div id="MO" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=MO'; ?> </div> <div id="MS" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=MS'; ?> </div> <div id="MN" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=MN'; ?> </div> <div id="MI" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=MI'; ?> </div> <div id="MA" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=MA'; ?> </div> <div id="MD" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=MD'; ?> </div> <div id="MH" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=MH'; ?> </div> <div id="ME" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=ME'; ?> </div> <div id="LA" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=LA'; ?> </div> <div id="KY" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=KY'; ?> </div> <div id="KS" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=KS'; ?> </div> <div id="IA" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=IA'; ?> </div> <div id="IN" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=IN'; ?> </div> <div id="IL" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=IL'; ?> </div> <div id="ID" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=ID'; ?> </div> <div id="HI" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=HI'; ?> </div> <div id="GA" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=GA'; ?> </div> <div id="FL" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=FL'; ?> </div> <div id="DC" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=DC'; ?> </div> <div id="DE" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=DE'; ?> </div> <div id="CT" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=CT'; ?> </div> <div id="CO" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=CO'; ?> </div> <div id="CA" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=CA'; ?> </div> <div id="AR" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=AR'; ?> </div> <div id="AZ" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=AZ'; ?> </div> <div id="AS" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=AS'; ?> </div> <div id="AK" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=AK'; ?> </div> <div id="AL" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=AL'; ?> </div> <div id="PE" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=PE'; ?> </div> <div id="NS" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=NS'; ?> </div> <div id="NB" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=NB'; ?> </div> <div id="NL" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=NL'; ?> </div> <div id="QC" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=QC'; ?> </div> <div id="ON" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=ON'; ?> </div> <div id="MB" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=MB'; ?> </div> <div id="SK" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=SK'; ?> </div> <div id="AB" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=AB'; ?> </div> <div id="BC" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=BC'; ?> </div> <div id="NT" style="position:absolute; width:200px; height:322px; z-index:1; left: 4px; top: 5px; visibility: hidden; layer- border: 1px none #000000;"> <? include 'http://www.osfhome.com/mem_map/get_members.php?state=NT'; ?> </div> <p align="right"> </p> </body> </html> Quote Link to comment Share on other sites More sharing options...
btherl Posted November 22, 2007 Share Posted November 22, 2007 Do you have a new php installation now with register_globals set to off? If so, you will need to either set register_globals on, or add the following line at the top of get_members.php: $state = $_REQUEST['state']; You may need to modify other scripts in a similar way. The rule is that data coming from get or post must be accessed by either $_GET['varname'], $_POST['varname'] or $_REQUEST['varname'] ($_REQUEST contains both $_GET and $_POST data). Quote Link to comment Share on other sites More sharing options...
Mad Cow Posted November 22, 2007 Author Share Posted November 22, 2007 btherl, Thank you so much for your reply. I added the $state = $_REQUEST['state']; line as suggested in order to call the variable. This line allowed the names of the member in the state to populate. This still leaves another problem. The name of the state does not show up. I tried adding $state2 = $_REQUEST['state2']; just below the $state line, but it still returned nothing. For a test I changed it to: $state2 = $_REQUEST['state']; It now returns the States abbreviation, which with the above line would be correct, but how do I get it to properly recognize the full state name? get_members.php <? include "../mysql_connect.php"; include "state_list.php"; @mysql_connect($hostname, $username, $password) or die("Can't connect to db"); @mysql_select_db($dbName) or die("Can't select DB $dbName"); $state = $_REQUEST['state']; $state2 = $_REQUEST['state']; $sql = mysql_query("SELECT m.name, pf.field_4, pf.field_5, pf.field_7 FROM ibf_members AS m LEFT OUTER JOIN ibf_pfields_content AS pf ON m.id = pf.member_id WHERE pf.field_4='$state' AND pf.field_7='active' ORDER BY m.name"); ?> <center> <table border="1" cellpadding="0" cellspacing="0" width="100%" bordercolor="#000000" bgcolor="#88A882"> <tr> <td width="100%"> <p style="margin: 2" align="center"><font face="verdana" size="2"><b><? echo $state2 ?></b></td> </tr> </table> <? IF (@mysql_num_rows($sql)=="0"){ echo "<font face='Verdana' size='2'>We have no members in " .$state2. '</font>'; } ?> <? while( $row = mysql_fetch_array($sql) ) { ?> <table border="0" cellpadding="0" cellspacing="0" width="100%" bordercolor="#000000" bgcolor="#88A882"> <tr> <td width="100%"> <p style="margin-left: 3; margin-right: 3; margin-top: 0; margin-bottom: 0"> <font face="verdana" size="2"><? echo $row[0]; ?></font> </p> </td> </tr> <? } ?> </table> state_list.php <? IF ($state=="AL"){ $state2="Alabama, USA"; } IF ($state=="AK"){ $state2="Alaska, USA"; } IF ($state=="AZ"){ $state2="Arizona, USA"; } IF ($state=="AR"){ $state2="Arkansas, USA"; } IF ($state=="CA"){ $state2="California, USA"; } IF ($state=="CO"){ $state2="Colorado, USA"; } IF ($state=="CT"){ $state2="Connecticut, USA"; } IF ($state=="DE"){ $state2="Delaware, USA"; } IF ($state=="FL"){ $state2="Florida, USA"; } IF ($state=="GA"){ $state2="Georgia, USA"; } IF ($state=="HI"){ $state2="Hawaii, USA"; } IF ($state=="ID"){ $state2="Idaho, USA"; } IF ($state=="IL"){ $state2="Illinois, USA"; } IF ($state=="IN"){ $state2="Indiana, USA"; } IF ($state=="IA"){ $state2="Iowa, USA"; } IF ($state=="KS"){ $state2="Kansas, USA"; } IF ($state=="KY"){ $state2="Kentucky, USA"; } IF ($state=="LA"){ $state2="Louisiana, USA"; } IF ($state=="ME"){ $state2="Maine, USA"; } IF ($state=="MD"){ $state2="Maryland, USA"; } IF ($state=="MA"){ $state2="Massachusetts, USA"; } IF ($state=="MI"){ $state2="Michigan, USA"; } IF ($state=="MN"){ $state2="Minnesota, USA"; } IF ($state=="MS"){ $state2="Mississippi, USA"; } IF ($state=="MO"){ $state2="Missouri, USA"; } IF ($state=="MT"){ $state2="Montana, USA"; } IF ($state=="NE"){ $state2="Nebraska, USA"; } IF ($state=="NV"){ $state2="Nevada, USA"; } IF ($state=="NH"){ $state2="New Hampshire, USA"; } IF ($state=="NJ"){ $state2="New Jersey, USA"; } IF ($state=="NM"){ $state2="New Mexico, USA"; } IF ($state=="NY"){ $state2="New York, USA"; } IF ($state=="NC"){ $state2="North Carolina, USA"; } IF ($state=="ND"){ $state2="North Dakota, USA"; } IF ($state=="OH"){ $state2="Ohio, USA"; } IF ($state=="OK"){ $state2="Oklahoma, USA"; } IF ($state=="OR"){ $state2="Oregon, USA"; } IF ($state=="PA"){ $state2="Pennsylvania, USA"; } IF ($state=="RI"){ $state2="Rhode Island, USA"; } IF ($state=="SC"){ $state2="South Carolina, USA"; } IF ($state=="SD"){ $state2="South Dakota, USA"; } IF ($state=="TN"){ $state2="Tennessee, USA"; } IF ($state=="TX"){ $state2="Texas, USA"; } IF ($state=="UT"){ $state2="Utah, USA"; } IF ($state=="VT"){ $state2="Vermont, USA"; } IF ($state=="VA"){ $state2="Virginia, USA"; } IF ($state=="WA"){ $state2="Washington, USA"; } IF ($state=="WV"){ $state2="West Virginia, USA"; } IF ($state=="WI"){ $state2="Wisconsin, USA"; } IF ($state=="WY"){ $state2="Wyoming, USA"; } IF ($state=="AB"){ $state2="Alberta, Canada"; } IF ($state=="BC"){ $state2="British Columbia, Canada"; } IF ($state=="MB"){ $state2="Manitoba, Canada"; } IF ($state=="NB"){ $state2="New Brunswick, Canada"; } IF ($state=="NL"){ $state2="Newfoundland & Labrador, Canada"; } IF ($state=="NT"){ $state2="Northwest Territories, Canada"; } IF ($state=="NS"){ $state2="Nova Scotia, Canada"; } IF ($state=="NU"){ $state2="Nunavut, Canada"; } IF ($state=="ON"){ $state2="Ontario, Canada"; } IF ($state=="PE"){ $state2="Prince Edward Island, Canada"; } IF ($state=="QC"){ $state2="Quebec, Canada"; } IF ($state=="SK"){ $state2="Saskatchewan, Canada"; } IF ($state=="YT"){ $state2="Yukon Territory, Canada"; } IF ($state=="OT"){ $state2="Outside North America"; } ?> Quote Link to comment Share on other sites More sharing options...
btherl Posted November 22, 2007 Share Posted November 22, 2007 The solution is to move the "$state = $_REQUEST['state']" line to BEFORE where you include the state list. That will make the variable available for use by state_list Edit: And remove $state2 = $_REQUEST['state2']. It's not needed, as $state2 comes from the included file, not from data received by the script. Quote Link to comment Share on other sites More sharing options...
Mad Cow Posted November 22, 2007 Author Share Posted November 22, 2007 Oh duh! See what happens when you stay up too late to look at these things? Thanks you so much for your help, it works! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.