Jump to content

Tandem

Members
  • Posts

    251
  • Joined

  • Last visited

    Never

Posts posted by Tandem

  1. I just recently moved to a different server. When i use the variable $PHP_SELF on the new server, it is coming up with the direct page rather than including the GET info. For example if the url is: www.blahblah.com/page.php?id=100, $PHP_SELF (if echoed) will be just www.blahblah.com/page.php.

    I was wondering if there is an alternative, or a fix for this? and if any could tell me why it's happening that would be cool too.

    Any help appreciated.
  2. I'm trying to move my databases to a different server. My original server (local) version is 5.0, but the new server is 4.1.2 and my host says that they cannot restore the database with the dump file i gave them because of this. What's the best way to remedy this?

    Would it be possible to download 4.1.2 and move my database to that version and then create a dump file from that server?
  3. I'm moving my site from a local test server to a 'real' server, and i want to import a database to my new mysql server. I understand that i have to create dump text files to re-create the database and tables in the new server but i don't know how to do it. Btw i only ever used the command line client on my local server, and the new server i must use phpmyadmin, and all the google searches i can find are for phpmy admin.

    Could someone please tell me how to do this?

    Any help is appreciated
  4. On my site i have made a sort of messaging sytem for users. I want users to be able to select the messages that they want to delete via checkbox. Can anyone explain how to retrieve mutliple checkbox values?

    If i'm not making sense or you need more details, just say.

    Thanks for any help.
  5. If i want to order some query results by a factor that has no sort of reasonable order, but i know which order they should be in e.g

    1. Dog
    2. Cat
    3. Lion

    or something like that, how would i go about doing that?

    If you need more information or i don't make sense, please ask/say.

    Thanks in advance for any help.
  6. On my site i have a profile editor where members can edit their profiles and if they want to, add music.
    Whenever anybody views a profile that has music on it, a pop-up appears saying: Click to run a active-x control on this webpage.

    How, if possible, can i stop this pop-up from appearing?
  7. I'm trying to make a timer for part of a game that i am making. If i member does a certain thing it puts them a 'jail'. For this particular instance, i want the timer to start at 40 and countdown, and once the time has passed, they be removed from the jail. Here's what i've got so far.

    [code]
    <?php
    if ($got_inmates[1] == 40){
    $jail_time = mysql_query("SELECT * FROM JAIL WHERE TIME > DATE_SUB(NOW(), INTERVAL 40 SECOND) AND USERNAME='$got_inmates[0]'");
    $jail_time_check = mysql_num_rows($jail_time);
    $get_sentence_time = mysql_query("SELECT ADDTIME(TIME, '00:00:40') FROM JAIL WHERE USERNAME='$got_inmates[0]'");
    if ($jail_time_check < 1) {
    $remove_from_jail = mysql_query("DELETE FROM JAIL WHERE USERNAME='$got_inmates[0]'");
    }
    if ($jail_time_check > 0) {
    $got_sentence_time = mysql_result($get_sentence_time, 0);
    $timer1 = date('Y-m-d H:i:s');
    $timer2 = strtotime($timer1);
    $timer3 = strtotime($got_sentence_timer);
    $timer4 = $timer3 - $timer2;
    $timer5 = date("s", $timer4);
    }
    if (empty($timer5)){
    $timer5 = "0";
    }
    }
    ?>[/code]

    The problem is that the timer starts at random places, when i want it to start at 40. Can anyone help me out and tell me how to fix it?

    Thanks in advance for any help. If you need more info just ask.
  8. I'm getting kinda confused here. Check this out.


    $time5 = "2006-07-27 05:05:51";
    $time4= date('Y-m-d H:i:s');
    $time = $time5 - $time4;
    echo "$time";

    The output i'm getting is: 0
    Just a zero by itself!
    How come?
  9. How do i subtract the date from a variable date using single quotes?

    Both are in the same format, i just don't know the syntax of single quotes and periods very well and am not sure how to use it in this situation.

    e.g echo 'today '. $time2 .' - '. date('Y-m-d H:i:s') ."\n";

    What should i change this to to make it actually calcualte the answer?
  10. *please skip to my latest reply*

    Ok, i'm tryin to calculate the difference between two times. One is a small distance into the future and is in the format(0000-00-00 00:00:00). Lets call this x.

    The other is the current time, lets call this y.

    I want to calculate how long it will be until y = x.

    How should i go about doing this?

    If you need more info just ask.
  11. I've been trying to implement bbcode onto my website, but it's not working out. I just don't understand how to do it, and just about all the tutorials i come across are terribly written/wrong.

    I did find a custom made file that parses tags, but the if you miss off a closing tag or make a similar mistake, it would destroy the page's layout, and i don't want to user input pages to be able to do that.

    Can somebody point me towards some good documentation for using the PEAR bbcode parser or possibly explain how i go about using it themselves?

    Thankyou for any help.
  12. It returns:

    mysql> repair table users;
    +-----------+--------+----------+---------------------------------------------------------+
    | Table    | Op    | Msg_type | Msg_text  |
    +-----------+--------+----------+---------------------------------------------------------+
    | gng.users | repair | note    | The storage engine for the table doesn't support repair|
    +-----------+--------+----------+---------------------------------------------------------+
    1 row in set (0.00 sec)
×
×
  • 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.