ile Posted March 6, 2006 Share Posted March 6, 2006 I've made a page with an include.THe include is a checkbox where the user can select only certain items in the list they want to see.I have it as a <$php $PHP_SELF ?> for some reason when i come back to the page it ignores the fact that i've posted to it. Like the post has never happened.Is there any settings in the PHP.ini that would change this. I use $_POST to get the information so Global_Variables set to off woudn't be what's wrong.checkbox code<form action="<?php echo $PHP_SELF; ?>" method="post"><br/><?php$x=0;while($x < sizeof($select)){ if($select[$x] == "Identifier") { echo"CHECKED"; }//endif$x++;}//end while?> name="select[]" value="Identifier">CI Identifier</td><td><input type="checkbox"<?php$x=0;while($x < sizeof($select)){ if($select[$x] == "CIName") { echo"CHECKED"; }//endif$x++;}//end while?><td align="center" colspan="2"><input type="submit" name="submit" value="Submit" class="inputbtn" /></td><td align="center" colspan="2"><input type="submit" name="reset" value="Show All" class="inputbtn" /></td><td align="center" colspan="2"><a href="edit.php">Add</a></td></tr><tr><td align="center" colspan=6><a href="excel.php">Extract to Excel Spreadsheet</a></td></tr></table></form>then here is the code for the index page.<?phpsession_start();include("db.php"); $mtime = microtime(); $mtime = explode(' ', $mtime); $mtime = $mtime[1] + $mtime[0]; $starttime = $mtime;if ($_GET["order"]!=""){$ordertype = ($_GET["order"]);}else{$ordertype = "CIName";}if ($_GET["order"]!=""){$results = mssql_query("SELECT * FROM newhardware ORDER BY ".$ordertype);}else{$results = mssql_query("SELECT * from newhardware ORDER BY CIName");}if (isset($_POST['submit'])){echo "SUBMIT WORKING";}else{echo "NOT SUBMITED";}//$results = mssql_query("select * from newhardware");//this table will output all the information from the database (Ian Elliott Feb 2 2006)$checkBoxSelect = "select ";$orderBy = " order by ";//$selectwhat = ""include("header.php");?><html><head><title>Asset Tracking</title><style type="text/css"><!--@import url("style.css");--></style></head><body><?phpinclude('checkbox.php');echo "check box";<div class="info">Some Helpful notes:<br/>The Links at the Top of the Tables Sort in a 1-9 A-Z fashion, but NULL or Empty Fields will always come first.<br/>The Checkbox above is set to sort by Order so if CI Identifier is check it will be the first thing to be ordered by and so on.<br/>Any Questions please feel free to email.</div>[THIS IS WHERE THE CODE STOPS LOADING WHEN YOU DO A SUBMIT]<?phpecho "start table";?><?phpif(isset($_POST['submit'])){ if(isset($_POST['select'])) { $selectArray = $_POST['select']; $results = count($selectArray); $counter = 1; $counterColor = 0; foreach($selectArray as $return) { Quote Link to comment Share on other sites More sharing options...
craygo Posted March 6, 2006 Share Posted March 6, 2006 this[code]action="<?php echo $PHP_SELF; ?>" [/code]should be this[code]action="<?=$_SERVER['PHP_SELF']?>"[/code]Try that firstRay Quote Link to comment Share on other sites More sharing options...
ile Posted March 6, 2006 Author Share Posted March 6, 2006 [!--quoteo(post=352177:date=Mar 6 2006, 02:29 PM:name=craygo)--][div class=\'quotetop\']QUOTE(craygo @ Mar 6 2006, 02:29 PM) [snapback]352177[/snapback][/div][div class=\'quotemain\'][!--quotec--]this[code]action="<?php echo $PHP_SELF; ?>" [/code]should be this[code]action="<?=$_SERVER['PHP_SELF']?>"[/code]Try that firstRay[/quote]Tooo bad but that didn't work :( 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.