Jump to content

ejaboneta

Members
  • Posts

    168
  • Joined

  • Last visited

Posts posted by ejaboneta

  1. We have Apache installed on a centOS server. I wrote a script to create a file. When i run the script as root, the file is made, however when crontab runs the file, it can't open the file to write. I tried setting the the permissions to 755, and changing the owner to 'nobody' as I saw suggested somewhere but it's still not working. Does anyone know how I can get this to work?

  2.  

    thats the best suggestion i've read for the OP yet.  i remember when I was looking for a new job just recently, i was looking at paid internship positions but didnt apply to any as im not an intern caliber coder.  so i only applied for those that were not internships

     

    Wouldn't internships expect less than a regular employee? I thought there were some kind of requirements for handling internships? This is definitely a great idea nonetheless.

  3. To the OP, if you're interested in hiring college students, put up fliers at your local colleges, especially in and around their computer science departments.  Also, put the job up on Craigslist.  The students off for the summer will be found there looking for temp jobs and places to live next semester.

     

    $10/hr for the rest of the summer plus professional work experience and references is a pretty sweet deal for a college student.

     

    That's really what I was looking for. Someone with at least some knowledge of PHP who might not have the qualifications of a full blown PHP Developer. Like college student who's still learning. Last time, we tried craigslist and I informed a couple local colleges of the opening. Despite our posts saying $10/hr, we got alot of people with bachelors and masters(most of whom who we decided were overqualified) from craigslist and nothing from the colleges.  We ended up hiring a graphic designer/general tech instead so I could focus more on programming.

     

    Oh and when I say overqualified, i mean they were asking for too much, which they probably deserved, or they were advanced programmers and we didn't think it'd be a good idea to hire them at $10/hr. We want someone kinda long term to grow with the company. We didn't want to someone looking for a temp job until they got a "real job". I mean I don't expect to be here forever but I know this is the right place for me to be right now, not just a stop on the way.

  4. I'm not looking for someone to hire... just curious what your opinions are. I was hired by a small insurance agency and i've used my self-taught php skills to develop web applications for our agents. Now I'm getting overwhelmed with the projects and updates that we're considering hiring another person. The problem is that everyone in our company starts at $10/hr. I know, I know... lol... but pay raises come often and its a really good place to work. I've gotten 3 raises in the past 10 months that I've been here. Everyone I find with any PHP knowledge at all, is an expert programmer with a high salary demand. I really wish I could find a young college student with at least some php/mysql skills. We don't mind people still learning.

     

    Do you think what I am looking for is possible? We do not want telecommuters or outsourcing.

  5. That's because you're using GROUP BY -- and you don't need to.  And that's not joining to the table to itself.  Don't have time at the moment to write the query for you, though.

     

    Well i also need it to count by agent. IE. Agent 1 had 30 new clients in May... Agent 2 had 25 new clients in May. How do i join the table to itself and would it be better to run an individual query for each agent? Thanks for you help. I really appreciate this.

  6. <?php
    // Connect to MySQL
    
    // Delete Bobby from the "example" MySQL table
    $query = mysql_query("SELECT email_add_public FROM members WHERE login='{$_SESSION['SESS_LOGON_NAME']}'") 
    or die(mysql_error());  
    $fetch = mysql_fetch_array($query);
    if ($fetch[email_add_public] == 'NO') {
    
    
    
    echo"[make public]";
    
    
    
    }else if ($fetch[email_add_public] == 'YES') {
    
    
    
    echo"[make private]";
    
    
    
    }
    ?>

  7. Ok, well can you give the query you are currently using? what are you trying to do exactly? Are you trying to get a list of parts with details about which make, model and year they belong to?

  8. Maybe you are making it too complicated. Are you trying to make a database of parts? If you are, you can make one table called 'auto_parts', and have have id, part, make, model, and year as columns.

  9. I've found that a good way to troubleshoot such a problem is by printing the script you are trying to run.

     

    what I mean is using this line

    <?php
    $percent = round((($rankp-$old)/($max-$old))*100, 2);
    ?>

     

    and printing what its actually doing

    <?php
    echo "$percent = round((($rankp-$old)/($max-$old))*100, 2);";
    ?> 

  10. Whenever you see an error that contains a line number, then you should look at that line for a problem. Most of the time, in my experience at least, it can be a misplaced quotation mark or some other character.  Can you tell me what that line says?

    And yes, you can change the column or table names to fit your script.

  11. Alright so first of all, you want to use sessions for user information. At the top of each script, you should use session_start().

    <?php 
    session_start(); 
    
    // the rest of your code below....
    ?>
    

     

    When a user logs in, store their user id and probably their username in the session

    <?php
    //after your login script...
    $fetch = mysql_fetch_row($query);
    $_SESSION[user_id] = $fetch[user_id];
    $_SESSION[username] = $fetch[username];
    ?>
    

     

    This will work for the user who is logged in..... Now I'm assuming you dont want users to give themselves points, so you have to have some way of selecting a user on the form that only you see. I'd put this in a form with the points you want to add.

    <?php
    $sql = "SELECT * FROM user_table";
    $query = mysql_query($sql);
    while ($fetch = mysql_fetch_array($query)) {
        $users[] = "<option value=\"$fetch[user_id]\">$fetch[username]</option>\n";
    }
    $options = implode('',$users);
    
    echo "
    <form method=\"get\">
        User:
        <select name=\"user\">
            $options
        </select><br />
        
        Points:
        <input type=\"text\" name=\"points\" /><br />
    
        <input type=\"submit\" value=\"Change Points\">
    </form>
    ";
    ?>
    

     

     

    then have a script that recieves this information and sends it to the database

    <?php
    if ($_GET[user_id]) {
    $sql = "UPDATE user_table SET points = (points + $_GET[points]) WHERE user_id = '$_GET[user_id]";
    mysql_query($sql);
    }
    ?>
    

     

     

    I haven't actually tested this code but I hope it can point you in the right direction.

  12. Well if it is just one number for each user, i would add a column to the user table called 'points' or whatever.

     

    If you want detailed information about points, then use another table. For example, why each point was given and when.

     

    But if you just want to get it working, i did notice that your code doesn't specify which user to give or subtract points from. You have $user coming from $_GET[user], but your increase/decrease links don't have the 'user' in the url.

  13. I'd use a column type 'DECIMAL( 10, 2 ) UNSIGNED'. Its a number type that will allow you to include cents. Unsigned because unless you want to pay the customer to take your products, your prices will probably always be positive values($4.99, not $-4.99). But I'm not an expert so yea... This is just what I've picked up.

×
×
  • 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.