Jump to content

only one

Members
  • Posts

    437
  • Joined

  • Last visited

    Never

Posts posted by only one

  1. Hi, im building a forum system, i was using cookies too log people in, but obviously some of them want too be able to be logged out when they close their browser, so i thought I'd integrate it with sessions, but on the second page of being logged in the session expires.

     

    Do i need to redeclare the session?

  2. A variable is always secure.. And as far as i know the only way for people to be able to get variables from you site is by using cURL.

     

    Just make sure that whenever you use a form action of post, set your variable as $_POST['variable'] etc.

  3. hi, i had an idea of craking md5

    i thought this might work..

    but my comp froze

    any1 got an idea??

     

    <?php
    $query = mysql_query("SELECT pass FROM users WHERE user='$_GET[user]'"); 
    while(!$quey = md5($randkey)){
    $torand = "1234567890abcdefghijklmnopqrstuvwxyz";
    $randkey = $torand{ rand(0,36) };
    }else{
    echo "$randkey";
    }
    ?>
    

     

  4. where are the feild1, feild2 variables set??

     

    if (isset($_POST['one'])) { $fld1 = $_POST['one']; } else { $fld1 = ""; }

    if (isset($_POST['two'])) { $fld2 = $_POST['two']; } else { $fld2 = ""; }

     

    is that not meant to be

     

    if (isset($_POST['one'])) { $feild1 = $_POST['one']; } else { $feild1 = ""; }

    if (isset($_POST['two'])) { $feild2 = $_POST['two']; } else { $feild2 = ""; }

  5. soz i just realised you wanted to let it be editable... just use the fopen function

    <?php 
    $file = 'path to php.ini' ; 
    $content = file_get_contents($file); 
    //edit some of this
    echo "
    <form action='file update.php'>
    <textarea name='new_content'>$content</texarea><br />
    <input type='submit' value='submit' />
    </form>
    ";
    ?>
    

     

    now you need to update the file contents to the textarea variable

     

    <?php
    $file = 'path to php.ini' ; 
    fopen ($file);
    fwrite($file, $_POST[new_content]);
    fcolse($file);
    ?>
    

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