Jump to content

stricks1984

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

stricks1984's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. How much traffic do you plan on getting? If not tons, why not host your own site? That's free, well except for the learning curve...
  2. Anywho if that's the case hmm. VB script perhaps? Or use some type of AJAX technique (though if js is disabled couldn't do it through that I guess.) Or an annoying way would be submit the form when a checkbox is click and refresh the results based on that. That will stop the JS problem.
  3. How would you go about doing that? EDIT: Nevermind that... Wow... "This would be easy to get past if they have javascript disabled" Oops.
  4. Ok, I fixed it. I'm not sure why, but I was pulling 4 values from the DB to populate the list and one of them was white space, which is what I think caused the error. Still a dilemma to me though.
  5. <input type="checkbox" oncheck="myDisable(this)" /> <a href="" id="link"></a> <script> function myDisable(e){ if(e.checked){ document.getElementById('link').disabled = true; } } </script> I think that should work, I didn't test it, just wrote.
  6. To make it simpler: // Put each name retrieved from the DB into a list. while($temp = mssql_fetch_row($result)){ array_push($list, array(trim($temp[0]), $temp[1])); echo '<br /> <br />List is now'.print_r($list). '<br />'; } echo '<br /><br />array out put: '.print_r($list); From that code I am getting this output: List is now1 Array ( [0] => Array ( [0] => [1] => 1 ) [1] => Array ( [0] => Dr. [1] => 2 ) [2] => Array ( [0] => Mr. [1] => 3 ) [3] => Array ( [0] => Ms. [1] => 4 ) ) array out put: 1Array ( [0] => [1] => Dr. [2] => Mr. [3] => Ms. ) How is this possible?
  7. Hi everyone. The following code: $result = mssql_query("SELECT $col, $id FROM $table;"); // Put each name retrieved from the DB into a list. while($temp = mssql_fetch_row($result)){ if($type == 'title_prefixes' || $type == 'degree_types'){ echo 'temp[0] = '.$temp[0]. ' and temp[1]: '.$temp[1].'<br />'; } array_push($list, array(trim($temp[0]), $temp[1])); if($type == 'title_prefixes' || $type == 'degree_types'){ echo '<br /> <br />List is now'.print_r($list). '<br />'; } } if($type == 'title_prefixes' || $type == 'degree_types'){echo '<br /><br />array out put: '.print_r($list);} Produces this output: ... [b]List is now1 Array ( [0] => Array ( [0] => B.S. [1] => 1 ) [1] => Array ( [0] => B.S.M.S. [1] => 2 ) [2] => Array ( [0] => M.S. [1] => 3 ) [3] => Array ( [0] => [1] => 4 ) ) // NOTICE THIS DOES NOT FLATTEN, CORRECT array out put: 1Array ( [0] => Array ( [0] => [1] => ) [1] => Array ( [0] => [1] => 4 ) [2] => Array ( [0] => B.S. [1] => 1 ) [3] => Array ( [0] => B.S.M.S. [1] => 2 ) [4] => Array ( [0] => M.S. [1] => 3 ) ) Items: 1[/b] .... ... [b]List is now1 Array ( [0] => Array ( [0] => [1] => 1 ) [1] => Array ( [0] => Dr. [1] => 2 ) [2] => Array ( [0] => Mr. [1] => 3 ) [3] => Array ( [0] => Ms. [1] => 4 ) ) // FLATTENS!!! I did not do anything, it's the exact same loop and the only call between the two echo statements is NOTHING. array out put: 1Array ( [0] => [1] => Dr. [2] => Mr. [3] => Ms. ) Items: 1 [/b] ... There is nothing different about how the arrays are built and as you can see at ListNow1 it is a 2D array in the 2nd and 1st examples but only in the 2nd does it flatten. These are both being built within the sam eloop and nothing is done in between the two echo statements...Does anyone see anything??
  8. Ok, so I found the problem... In Section.php : private $input_type; // The object being passed as parameter. Needed to be either protected or public. Wow, I don't know how I didn't see that.
  9. When I do echo print_r($input); I get the following: Input Object ( [type:private] => text [display:private] => [id:private] => title [display] => [js] => )
  10. If I call a bogus method: $this->input_type->bogus(); I get: Call to undefined method Input::bogus() With non-bogus: PHP Fatal error: Call to a member function make() on a non-object
  11. Hello, I have the following directory structure: /Program.php /Sections/Section.php /Sections/Inputs/Input.php In Program.php I have the following: require('Sections/Inputs/Input.php'); require('Sections/Section.php'); ... array_push($this->sections, new Section('ff', 'ff', new Input('title', 'text'))); // Where problem begins. In Section.php I have: private $input_type; private $id; private $headerTitle; function __construct($id, $header, $input){ $this->id = $id; $this->headerTitle = $header; $this->input_type = input; $this->input_type->make(); // DOES NOT WORK // PHP Fatal error: Call to a member function make() on a non-object } Code for Input.php: class Input { private $display; private $id; public function __construct($id){ $this->id = $id; $this->display = ''; } public function make(){ error_log('Gets called, during creation, but can't access this method'); } public function display(){ return $this->display; } public function getID(){ return $this->id; } I know this has something to do with reference and such, but I just don't understand what I'm doing wrong. I'm running PHP 5>. Any help would greatly be appericated.
  12. Hello, I'm not looking to switch to Sharepoint, but my "uppers" already use Sharepoint while all of our websites use PHP. Instead of creating a whole new management system by scratch with PHP/SQL I'm looking for a way to interact with Sharepoint using PHP. Is there any known API for this? Any help would be appreciated Thanks, Brian
×
×
  • 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.