Jump to content

Jocka

Members
  • Posts

    344
  • Joined

  • Last visited

Posts posted by Jocka

  1. try to change this section:
    member_id='" . $member_id . '"

    And if that doesn't work then my usual debug thing to do is use die() to determine if $member_id has any value. So if this doesn't work add die($member_id); above the unset session area.

    You might want to try using $_SESSION['member_id']; instead too
  2. OOOOHHHHHHHHH gotcha

    Ok this:
    echo "<img src=\"http://image.fpsbanana.com/ico/del.gif\"></a>";

    to this:
    echo "<a href='yourpagename.php?act=del&id=" . $MESSAGE_ID . "' title='Delete'><img src=\"http://image.fpsbanana.com/ico/del.gif\"></a>";

    now on that page (can be anywhere on the page above the output of the messages):
    if(isset($_GET['act']) && $_GET['act'] == 'del'){
    // Do your checks to make sure this is THIS users message
    $sql = "DELETE FROM table WHERE id='" . $_GET['id'];
    mysql_query($sql) or die(mysql_error()); // gives errors
    }
  3. Humor me .. lol. Can you just change this:
    echo "<input name=\"id[]\" type=\"hidden\" value=\"{$row[imageid]}\" />\n";
    echo "<input name=\"order[]\" type=\"text\" value=\"{$row[order]}\" size=\"5\" />\n";

    To this:
    echo "<input name=\"order[$row[imageid]]\" type=\"text\" value=\"{$row[order]}\" size=\"5\" />\n";

    and then in the php file to sort it:
    $order = $_POST['order'];
    $i = 0;
    foreach($order as $id => $ord){
      $update[$i] = "UPDATE oak_images SET order='" . $ord . "' WHERE id='".$id."'";
      $i++;
    }

    then query.. ?

    ::EDIT:: forgot the $i++
  4. what I do is set a few things in the online table.

    id, user_id, user_ip, user_time (and sometimes user_sesid)

    When they log in, add all this information into the database. And make sure when they log out that this gets deleted or you have a field like "user_online enum('on','off')" and then when they log out turn it 'off' but u can keep the online info for "Online Today" tables maybe.

    You can save the time with UNIX_TIMESTAMP() and figure up 20 minutes in unix time. it's something like 1200 I think (but i'm probably wrong) so to check you can do something like:

    if((time() - $user_time) < 1200){
    // if time now minus time when logged in is less than 20 minutes

    // DO WHAT YOU WANT

    }

    now that may not be exactly right but it's close lol.. gives u an idea

  5. change the sql string to this:

    $sql = "INSERT INTO `tblBlogComments` ('CommentID', 'BlogID', 'UserID', 'Active', 'Username', 'Comment') VALUES (NULL, '1', '1', '1', 'James', 'test')";

    if CommentID is auto_increment however, don't use null. Use LAST_INSERT_ID()
  6. lol yea I saw that but like I said, I don't want to use premade scripts (anyone else's scripts). It might be a good script to look at to get an idea of how to do it with images but i'd prefer to do it without images right now. I found some things on google using CSS and it looked fairly easy to do so I think I'll go with it for now (easier is faster). After the competition is over i'll check out the scripts and see what they wrote that made them look so good.
  7. right after you start that function, try adding this:

    global $errorhandler;

    ALSO, you always want to return the function either true or false. So if the email doesn't validate (in any of those if statements) then do return false;
    And then under all the if statements put return true; . That tells the function that everything went ok.
  8. whats the best way to do this? I'm not sure I want to use premade scripts on a site I'm building.

    I was considering the possibility of being able to create graphs without images, just css. Would this be possible?

    Say I save information in the database such as hit counts, registered (how many registered), etc. Could I pull that down and create a graph with css to stretch a div field to a certain length according to how many hits there are ?

    Or is there a better way to do this? I looked into JpGraph but it's just a tad bit slow for what I need. I need the graph done in at least 1 second, JpGraph was taking up to 30. I figure if I didn't create images then this would be easiest on the load time. Again though, if you have any other suggestions on a better way, then please let me know.
  9. nice.

    Right now my only worries is the usb adaptor. It's my only way to get online besides dial up and I HATE dialup. I'll look into that though. As far as I recall the usb came with a self install tool but I'll got to their website and see if it is supported by linux as well. See if I can find a way to install it.

    If I can't find a way to install it (or anything else for that matter) do you recommend any good sites I can browse to find drivers for it?
  10. if you do use other peoples code then don't call it yours. Give them their credit. I myself started learning after downloading a News application. I cracked it open and started reading but even after I made my changes, I left their name on it. That's just respect.

    But yes, you can use other peoples code to learn. But I HIGHLY suggest studying. You can learn the basics from free codes but you'll  never learn  how to build your own site from scratch if you don't make an attempt to learn everything you need first.
  11. I'm not sure what phpDocumentor is but after looking it up, it creates html chm and other files, correct?

    Would it be better to just write readme files with each script to let the user know where to look and what does what? That way it doesn't actually take up space in the application..
×
×
  • 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.