Jump to content

Centurion_13

WFG Retired
  • Posts

    1.326
  • Joined

  • Last visited

Posts posted by Centurion_13

  1. I forgot to copy the part with the form tags.

    I copied the wrong part. I ment this part

    Registration has failed. Please ensure you have filled in the entire form. and try again.
    Registration Script written by Shan Coster [AKA Centurion_13]

    EDIT: nevermind, I dont know what I did but its started working.

    Although This part:

    //*****************check if form is complete
    if ($clan == '' || $nick == '' || $email == '')
    {
    $result = 'fail';
    }
    else
    {
    $result = 'pass';
    }

    always makes $result=pas

    But its good enough for me.

  2. Well its not the $result variable cause I have tried that already.

    my html should be fine, I dont see anything wrong with it.

            <td width="147" height="33"  valign="top">Nick Name</td>
           <td width="562" height="34" colspan="3"  valign="top"><input type="text" name="nick" size="20"></td>
         </tr>
         <tr  valign="top">
           <td width="147" height="34"  valign="top">Clan Name</td>
           <td width="562" height="34" colspan="3  valign=" top""><input type="text" name="clan" size="20"></td>
         </tr>
         <tr  valign="top">
           <td width="147" height="33"  valign="top">Email</td>
           <td width="562" height="35" colspan="3"  valign="top"><input type="text" name="email" size="20"></td>
         </tr>

  3. Well now I get some output but its always the same

    Registration has failed. Please make sure you have entered data intoall of  the fields.

    Registration Script written by Shan Coster [AKA Centurion_13]

    No email is sent so the only part that would possibly be causing this is the mailing part.

     if(mail("centurion13@gmail.com", "$nick - LAN Tournament", "$contents")) {
    echo ("Registration Complete. \n Your Information has been sent to ZeZar.<br //>
    Registration Script written by Shan Coster [AKA Centurion_13]");
    }
    else {
    echo ('Registration has failed. Please ensure you have filled in the
    entire form. and try again.<br //>
    Registration Script written by Shan Coster [AKA Centurion_13]');
    }
    }

  4. I always get the / and \ mixed up. They're just too similar for a begginer. I just made my <br> tags without the closing part, im not doing anything complicated with the site so it doesnt really matter.

    Yeah I noticed that. I just forgot to update that part.

    But its still not working, I even got a friend to upload it incase it was my server for some reason but still the same problem. although it came up with this error:

    Parse error: parse error in /friendsserver/test.php on line 39

    which is

    if(mail("centurion13@gmail.com", "$namef - LAN Tournament", "$contents",))

  5. About the post, thing I dont know why it made the s lowercase but I have already fixed that. I also did this bit:

    //formprocessing
    $clan=$_POsT['clan'];
    $nick=$_POsT['nick'];
    $email=$_POsT['email'];

    Because I got sick of typing

    POST['whatever']

    all the time.

    I did my comments like that to make them stand out more, I might change them to a different character to people thinking Im mixing them up.

    I already have made all the else and if things into lowercase.

    I didnt know how to do 'or's in php yet. thanks

    Ill finish this post when I geet on the computers at school. bye and thanks

    EDIT: Im back on a computer at school so Ill finish my post now.

    Actually I cant be bothered replying to much more but I will just say one thing:

    Thanks for all your help. with all the good people here I can learn to do php properly.

    This should be all fixed up. I have posted it so I dont have to email it to myself so I can get it and test it at home.


    <?php

    /*  Registration script written By Shan Coster AkA Centurion_13 */

    //formprocessing
    $clan=$_POST['clan'];
    $nick=$_POST['nick'];
    $email=$_POST['email'];

    //*****************check if form is complete
    if ($clan == '' || $nick == '' || $email == '')
    {
    $result = 'fail';
    }
    else
    {
    $result = 'pass';
    }

    //*****************actions to take
    //incomplete form
    if($result=='fail')
    {
    echo("
    Registration has failed. Please make sure you have entered data into
    all of  the fields.\n
    Registration Script written by Shan Coster [AKA Centurion_13]
    ");
    }

    //*******complete form
    elseif($result=='pass')
    {
    //mail variables
    $contents ="Nick Name: $nick\nClan Name: $clan\nEmail: $email\n
    \n\n\nThis Registration script was written by Shan Coster AKA Centurion_13.";

    //mail script
    if(mail("centurion13@gmail.com", "$nick - LAN Tournament", "$contents",
    )) {
    echo ("Registration Complete. \n Your Information has been sent to ZeZar.<br //>
    Registration Script written by Shan Coster [AKA Centurion_13]");
    } else {
    echo ('Registration has failed. Please ensure you have filled in the
    entire form. and try again.<br //>
    Registration Script written by Shan Coster [AKA Centurion_13]');}
    //error in processing
    else
    //put full URL in this
    header("form.html");
    }

    /*  Registration script written By Shan Coster AkA Centurion_13 */
    ?>

×
×
  • Create New...