Jump to content

chantown

Members
  • Posts

    134
  • Joined

  • Last visited

    Never

Posts posted by chantown

  1. For example.

     

    In my index.php, I have a simple text box. I put in a word, and click Submit.

     

    I want to have my C++ script analyze this word, and do some calculations.

    Then, I want to pass this back to my PHP, and spit out the length, etc. to the audience.

     

    The question is: How can I use both PHP and C++ to do things??

     

    Thank you!

  2. Hi, is there anyway to set limits within ONE select query?

     

    SELECT * FROM my_table WHERE

    (date = '123') <<< SET A LIMIT of 4 here.

    OR

    (name = 'sun') << SET A LIMIT of 3 here.

     

    I know that it's possible to break this into 2 SELECTS and UNION them. But is there a way to keep 1 query, and set limits between the "ORs"?

     

    thank you!

     

     

  3. Hello there,

     

    I have a mod rewrite that doesn't seem to work  :(

     

    Options +FollowSymLinks  (optional)
    Options +Indexes (optional)
    
    RewriteEngine On
    RewriteRule ^/([0-9a-z])$ /?code=$1 [L]

     

    Basically, I would like

    www.domain.com/stuff123    ------>    www.domain.com/?code=stuff123

     

    Can someone find anything wrong with my code?

     

    Thanks!

     

     

     

  4. What is the maximum size of php sessions?

     

    For example, this has been a really weird problem lately.

     

    I have a form which a user types a Question. This question is then stored in a Session.

    Then I Header("Location: ") To redirect to another page, then echo the Session.

     

    The weird thing is, sometimes, it works, sometimes it doesn't!!

    It's really really weird.  If I click around my site (logged into my site), then it works.

     

    If I just enter my site and post the Question (logged in), it won't work.

  5. Hi,

     

    I'd like to know if anyone knows how to do this:

     

    Suppose I have a form where people submit stuff through a textbox. Each time they submit something, their score +1. Their timestamp is recorded.

     

    How can I make a list of "This week's top submitters"?

     

  6. Hi,

     

    Let's say I have a string:

     

    abc = "The fox's tail & legs were big!!!@";

     

    How do make abc so that it removes EVERY symbol but the alphabets and the spaces?

    to "The foxs tail legs were big"

     

    Thanks!

  7. With "IN"

     

    SELECT * FROM users WHERE username IN ('%gal','%saa');

     

    ^^ that doesn't work.

     

    But this works:

     

    SELECT * FROM users WHERE username LIKE '%gal' OR username LIKE '%saa';

     

    Is there any way I can make it work the first way? Because it saves space + convenicency  a lot.

     

    thanks!

  8. My website is really weird:

    I log in, and the username session holds.

     

    But that's the only thing that holds. Other sessions gets erased! I try to set

     

    //test.php

    <?php

    $_SESSION['test'] = "yessss";

    print_r($_SESSION);

    ?>

     

    When I go to test.php, I see my sessions for my username and my test. But when I go out of the "test.php", my username session holds but my "test" session doesn't hold anymore.

    Does anyone know whats wrong?

     

    Is there any way to "reset" the Sessions? (in php.ini, there's a thing called session handler = files or something?)

    I'm really super confused.

     

    I transferred all my files to another server, and all sessions work fine. They all hold. But for some reason this server I have keep erases the session after I leave the page.

     

    Can someone help me please? Thanks!

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