User Profile

Collapse

Profile Sidebar

Collapse
guile
guile
Last Activity: Jun 12 '07, 02:47 PM
Joined: Apr 25 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • guile
    started a topic IE 7 applying padding to random elements

    IE 7 applying padding to random elements

    Hi. Here is the structure of my document

    Container
    --Header
    --Navigation
    --Main
    ----Sidebar
    ----Main Content
    --Footer
    Container Ends

    I'm using a background image for the container, which is decorates the left hand side of the container box. i have applied padding-left: 30px to shift all child blocks inside the container to left.
    On IE 7, the header works as expected,...
    See more | Go to post

  • guile
    started a topic ImportError using Django

    ImportError using Django

    hi,
    i'm running apache 2.2.3 on windows xp and have python 2.5 and mysql 5 installed. i'm having problems installing django. please give me some help.

    i created a folder "django" in my c:\python25\lib \site-packages\
    then i used svn to stuff it with the latest build (in trunk)
    i copied my bin\django-admin.py into the scripts folder of python
    i added c:\python25\, c:\python25\scr ipts\ to my path...
    See more | Go to post
    Last edited by guile; Jun 10 '07, 10:02 AM. Reason: additional supporting information

  • guile
    replied to MAX_FILE_SIZE for HTML forms
    in PHP
    It is recommended that we include this inside forms containing file uploads.

    <input type="hidden" name="MAX_FILE_ SIZE" value="512000" />

    This limits the size of file that can be uploaded. I mostly use php, and it gives an error if the uploaded file exceeds this value. It must be similar in other scripting languages....
    See more | Go to post

    Leave a comment:


  • Sorry for replying this late, I was held up in some other work, and almost forgot about this.


    My scores appear ranked (without the actual rank provided), but only for that simple query. The problem is backtracking when you have just the user ID and wish to display the game info, and user's rank (if he/she's played the game).

    If I use something similar to what you suggest, and use a counter in my script to calculate...
    See more | Go to post

    Leave a comment:


  • guile
    started a topic MAX_FILE_SIZE for HTML forms
    in PHP

    MAX_FILE_SIZE for HTML forms

    hi,
    I tried to lookup on w3c website for information on the MAX_FILE_SIZE hidden field to restrict the size of file uploads, but couldn't find much. Looked up elsewhere, but generally, couldn't find more than a single line about this. I know that this fails in many browsers, but I'd still like to learn about it. Here are some of my doubts regarding this

    * Is it necessary to include it at the beginning of the form?
    * Does...
    See more | Go to post

  • guile
    started a topic Forms spanning over multiple pages
    in PHP

    Forms spanning over multiple pages

    Hi,
    I am working on a small site, whose main purpose is to gather lots of user registration data and use that for their need. Now since the required data is quite heavy, I will be splitting my forms across 3 or even 4 pages.

    How should I keep track of the data being submitted on the earlier pages? I can keep the data in a temporary table in the database using MySQL, and purge all of that across the main tables once the final...
    See more | Go to post

  • That is the problem. 'rank' is not any column in my schema, and it would keep changing with newer game scores. for a simple ordering of players for all the games in order of their scores, i can use

    Code:
    SELECT `game_id`, `user_id`, `score` FROM `table` ORDER BY `score` GROUP BY `game_id`
    which should give me something given below - except for the last row

    game_id | user_id | score | rank
    ---------------------------------------------...
    See more | Go to post

    Leave a comment:


  • odd that nobody replied to this. it was definitely something interesting.

    anyways, i found this link to be very useful for the purpose

    Emulating Analytic (AKA Ranking) Functions with MySQL: Part 2

    as for my case, i had information spread over several tables, so in the end my query was something like - 3 nested select statements, a couple of inner joins and use of some variables inside 'if' clause. quite...
    See more | Go to post

    Leave a comment:


  • Generating user ranks in multiple games, based on score, using Subqueries.

    Hi,
    Say, I am building a small gaming portal where people can play small games and score points.
    a player can play different games and the scores are logged in.

    now, given a user ID, how do I build my dataset such that we can retrieve a table in this sort

    user_id | game_id | rank

    now, the rank is relative just to that game.

    i'm finding it extremely hard, that is why i am...
    See more | Go to post

  • guile
    replied to Files being read in (seemingly) random order
    in PHP
    using ORDER BY is the recommended thing, but what do I order by?
    If I order by the file name, then things might go wrong as file uploads later might not exactly follow the same naming scheme but would be shown first based on their name.
    If I order by the file title/caption, then things go absolutely wrong.

    So only way for me was ordering them by the way they are added, which I expected to follow some alphabetical order,...
    See more | Go to post

    Leave a comment:


  • guile
    started a topic Files being read in (seemingly) random order
    in PHP

    Files being read in (seemingly) random order

    hi, i'm using opendir( ) to create resource to a directory, and readdir( ) thereon to read the files one by one. I then add the file info into a database, and they are listed back in the very order that they were added. This order is a must-have.

    But because of some odd reason, the files are not being added either
    - alphabetically
    - date and time of uploading

    This is defeating my purpose. Moreover, it seems...
    See more | Go to post

  • guile
    replied to Restricting access to a php script
    in PHP
    Hi,
    thanks for that response. I think PHPBB does something similar to ensure include files aren't executed in isolation. It sets up a variable in the master pages and puts a check at beginning of each include file.

    I think I can combine both of these systems...check ing for the existence of the particular variable to make sure that file is being used inside some other script, and then checking if the session is set to logged...
    See more | Go to post

    Leave a comment:


  • guile
    replied to Restricting access to a php script
    in PHP
    hello cyberking,

    i wrote about maintaining login sessions. i think that is the best possible way to restrict access.
    but say you had somebody who has access to the admin area. how do you stop that person from writing a program/script to flood the script with requests?

    has anybody ever checked for the page from which the request comes from? does it work? how do cms packages prevent their include files from being...
    See more | Go to post

    Leave a comment:


  • guile
    started a topic Restricting access to a php script
    in PHP

    Restricting access to a php script

    hi,
    I have a script 1 that calls another script 2 when a form is submitted. both scripts belong to the admin side and the second one involves database modification.
    how do i make sure that there are no loose ends?

    one way is to put a check in script 2 so that it executes only when session variables are set to logged in.
    another way is to check for the source that the form data came from....I'm not sure of how to...
    See more | Go to post

  • guile
    replied to Simple yes/no radio button not working
    hi,
    thanks for this hack. that got it working in IE(7). but then I found that it stopped working on Firefox and Opera.

    In the end: simple use of innerHTML property. works across everything
    should've thought of that earlier....
    See more | Go to post

    Leave a comment:


  • guile
    started a topic Simple yes/no radio button not working

    Simple yes/no radio button not working

    Hi, I have wasted quite some time trying to insert a very simple yes/no radio button on the page. Everything works fine except for that the default state of button is not being set in any of the browsers. I want the first button to be checked and am using name.checked=tr ue property for this but its not working. IE refuses to allow me to select either of them even when I manually click.
    Code:
      var newRadio = document.createElement('input');
    ...
    See more | Go to post

  • Finding out position of an item (not using its unique ID)

    hi,
    i have 2 tables: one for a package, and other for the items in that package.

    item table has item_id as primary key (set on auto_increment) , and a foriegn key package_id that links to the related package.

    if the order of items in a package is important, how do I find out the position of each item in a package? The position is gathered simply from the order in which items were entered, so item entered last would...
    See more | Go to post

  • guile
    started a topic PHP and Poetry
    in PHP

    PHP and Poetry

    Hi, I'm not gonna get your head into code. I want to know about the best practises and most efficient, as well as structurally flexible methods for a good website.

    I have built some stuff on php earlier, but I always thought it lacked grace. It was more of slogging hours in front of the maschine rather than picking up on something intuitive. I tried asking in my local circle, but people seem to have vague idea of things - even those...
    See more | Go to post
No activity results to display
Show More
Working...