Jump to content

mjlogan

Members
  • Posts

    122
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://php.invisibleshadow.com

Profile Information

  • Gender
    Not Telling

mjlogan's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I abandoned php and mysql on vista manual install. could never get the two to communicate, (was fine via command line though) everything was up and running and functioning independently . http://www.wampserver.com/en/ works fine though! its my working solution.
  2. I would also guess you are not storing it as a timestamp. the strtotime function may also be helpful.
  3. are you looking for exit for? for breaking out of a for loop for example, but a GOTO maybe you need to rethink your logic?!
  4. If you are locally mapped to the webserver, is the drive actually called T:/ on the webserver itself? or is it T: on your machine and something else on the webserver.
  5. $variable = "\\'s"; $variable = mysql_real_escape_string($variable); echo $variable."\n"; $variable = stripslashes($variable); echo $variable; Input => mysql_real_escape_string => stripslashes 's => \'s => 's \'s => \\\'s => \'s \\'s = > \\\'s => \'s
  6. stripslashes is the function you are after.
  7. <?php class FilterPage { private $all; private $id; public function getpage() { $this->all = $_GET['all']; $this->id = $_GET['id']; if($this->all == "1") { echo "all right"; } else { echo "all wrong"; } if($this->id == "1") { echo "id right"; } else { echo "id wrong"; } echo "Nothing"; } } $_temp = new FilterPage(); echo $_temp->getpage(); ?>
  8. echo date("d M y", mktime(0, 0, 0, date("m", 1174831470) , date("d", 1174831470)-date("d", 1174831470)+1, date("Y", 1174831470))); echo date("d M y", mktime(0, 0, 0, date("m", 1174831470)+1 , date("d", 1174831470)-date("d", 1174831470), date("Y", 1174831470))); echo date("d M y", mktime(0, 0, 0, date("m", 1163831470) , date("d", 1163831470)-date("d", 1163831470)+1, date("Y", 1163831470))); echo date("d M y", mktime(0, 0, 0, date("m", 1163831470)+1 , date("d", 1163831470)-date("d", 1163831470), date("Y", 1163831470))); that should get you going... you can improve on that.
  9. Are you using the function mysql_real_escape_string?
  10. http://php.invisibleshadow.com/2007/04/21/cutting-out-part-of-a-string/ echo cutBetween('a. Testing <3>','<','>');
  11. You may find that all those details are lost as the file will be recreated on the server after uploading, so the date created and modified will always show the time the file was uploaded. And I personally don't know of a way of reading meta data from a file on a remote computer, as the server will always make a copy of the file to the local machine. But somebody else might....
  12. The last time I was using sleep() I realised that I was using a some terribly inefficient code, rewrote the whole thing, it performed a lot better and no pause was required.
  13. for ($index = 0; $index < count($fruits); $index++) { # sorry, but I hate foreach to for ($index = 0, $count = count($fruits); $index < $count; $index++) { # sorry, but I hate foreach minor optimisation
  14. i use if ($connDatabase->resultsCount($query) > 0) { while($data = $connDatabase->fetchArray($query)){ $array[$i]['field_01'] = $data['field_01']; $array[$i]['field_02'] = $data['field_02']; $array[$i]['field_03'] = $data['field_03']; $i++; } }
  15. Watch out for SQL injection. 1;DROP TABLE business_info in the password field
×
×
  • 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.