Jump to content

mushroom

Members
  • Posts

    41
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.oldslides.com

Profile Information

  • Gender
    Not Telling
  • Location
    Queen Charlotte B. C. Canada

mushroom's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. If "cat_id" is "AUTO_INCREMENT" there is no need to include in your second query at all, the field and value will fill in automatically.
  2. There is no need to hide your page if you do it like this <?php $allowed[]="xxx.xx.xx.xx"; # authorized ip's 1 per line # $allowed[]="xxx.xx.xx.xx"; # uncomment and/or add as many as you like $raddr=$_SERVER["REMOTE_ADDR"]; if (in_array($raddr,$allowed)) { # your code here # insert e-mail code if you need conformation } else { $myself="http://your_main_index.page"; # redirect page for all others header("Location: $myself"); } ?>
  3. If you look at the line I quoted, there is a built in php function to do what you are asking. http://ca.php.net/manual/en/function.in-array.php
  4. you may wish to incorporate this if (in_array($your_value,$array))
  5. I do a lot of php/mysql and find openSUSE the easiest to set up and manage.
  6. gmdate() returns Greenwich Mean Time. if you want local time use date()
  7. Fairly slow then.... on the group I am tracking one particular IP generated 173M records in a month. ( a mail server) A thing to remember is that the larger a table gets the slower it works. I may be wise to only keep a month worth of data in a single table and create new table(s) for each month. this will minimize the slow down.
  8. If you have any amount of traffic I would suggest a total rethink of your table structure, it will get way to big way to fast, I know. I wrote a suite for my local ISP to track usage on 9 subnets.
  9. I do not see any "{}" with your if ,else statements if (....) { code ; } else { code ; }
  10. I don't think you can avoid that, but you can finish the page. after "</html>" and before sleep(x); add ob_flush(); flush();
  11. OK, there is no default php page in most Linux installs I haven't used Fedora is quite some time but have download the latest and plan on looking at it in the near future. For a development machine I recommend that you: 1. edit apache, to follow symlinks 2. edit php.ini to display all errors 3. give each project a directory in /home/your_user_name/public_html/ 4. create a symlink to each project directory
  12. I didn't know browsers had the ability to build arrays the same way php can ??? if they do, try designating each array value when[0], when[1], when[2], etc.
  13. I have found that some functions do not work with compound variables....... solution give the function a simple variable $files=$files."/"; $total = total_size('$files');
  14. If you have 4 elements in your array they are numbered by default 0,1,2,3 not 1,2,3,4
  15. Note: variables can not start with a number. but it can be done with code some thing like this $i=0; # open file # loop through file. {$var="varname".$i; $$var=$line; # read each line $i++; } I have use this in the past, but now prefer to use arrays they are much easier to work with later. # open file # loop through file. { $array_name[]=$line; # read each line }
×
×
  • 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.