Jump to content

ile

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by ile

  1. ile

    POST problems

    [!--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 first Ray [/quote] Tooo bad but that didn't work :(
  2. 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. <?php session_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> <?php include('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] <?php echo "start table"; ?> <?php if(isset($_POST['submit'])) { if(isset($_POST['select'])) { $selectArray = $_POST['select']; $results = count($selectArray); $counter = 1; $counterColor = 0; foreach($selectArray as $return) {
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.