Archimedees Posted November 5, 2007 Share Posted November 5, 2007 The following statement is in urllist form below. echo " <td>MyServer=".$value["name"]."</td>\n"; In ActiveServer.php I need to process the strings in $value["name"] using $_Get["MyServer"] and assign it to $strServer Could somebody please outline why so far this is not working?? Mad Techie??? Please assist. Thanks in advance. <form name="urllist" action="ActiveServer.php" method="GET"> <table border=1> <tr> <th></th> <th></th> <th>Server</th> <?php $arPageConf = read_contents_pageconf("page.conf"); $arPingConf = read_contents_pingconf("ping.conf"); $arPageServers = create_servernamelist_pageconf($arPageConf); $arPingServers = create_servernamelist_pingconf($arPingConf); //loop through PingServers to create final List $arFinalServers = $arPageServers; foreach($arPingServers as $nKey => $arServer) { $arFinalServers = search_array($arFinalServers, $arServer); }//end foreach($arPingServers as $nKey => $strServer) foreach($arFinalServers as $key => $value) { echo "<tr>\n"; echo " <td></td>\n"; echo " <td><input type=\"checkbox\" name=\"active_".$key."\" value=\"active\""; if ($value["active"]==true) { echo "checked"; } echo "></td>\n"; echo " <td>MyServer=".$value["name"]."</td>\n"; echo "</tr>\n"; } ?> </table> <input type="submit" name="submit" value="submit"> </form> </body> </html> Now, ActiveServer.php <?php if (isset($_GET["submit"]) && isset($_GET["MyServer"])) { $strServer = $_GET["MyServer"]; } else { die(); }//end of (isset($_Request["submit"][/quote]); ?> edit: We have code tags for good reason. Quote Link to comment https://forums.phpfreaks.com/topic/76044-passing-form-variables-using-submit/ Share on other sites More sharing options...
Archimedees Posted November 5, 2007 Author Share Posted November 5, 2007 I'm on the verge of suicide. Quote Link to comment https://forums.phpfreaks.com/topic/76044-passing-form-variables-using-submit/#findComment-384946 Share on other sites More sharing options...
MadTechie Posted November 10, 2007 Share Posted November 10, 2007 I'm Not 100% sure what your asking for here (but its lates here and i have had littel sleep) but your doing this echo " <td><input type=\"checkbox\" name=\"active_".$key."\" value=\"active\""; when personally i would do this echo " <td><input type=\"checkbox\" name=\"active[".$key."]\" value=\"active\""; the reason is, it create an array this i can access like this foreach($_POST['active'] as $k => $V) { echo "$k => $v<br>" } also you have a class which we have no info on ie read_contents_pageconf <-- whats that do ? Quote Link to comment https://forums.phpfreaks.com/topic/76044-passing-form-variables-using-submit/#findComment-388268 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.