Jump to content

Ink

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Posts posted by Ink

  1. Hey I got some problems with this logginscript, I dont know how to get the loginform to disapare when the bloggform apars... and when i try to use the wrong password it wont tell me that its wrong...
    try it at [url=http://munchmoller.com/ink/blogg.php]http://munchmoller.com/ink/blogg.php[/url] (it wont blogg on my page as that obyusly would be a bit dumb:P anny one that can help me?

    here is the code:
    [code]<?php

    $username = "ink";
    $password = "pass";
    $realdate  = date("d.m.Y");
    $username2 = $_POST['userlog'];
    $password2 = $_POST['passlog'];
    ?>

    <form name="form" method="post" action="<?php $_SERVER['PHP_SELF']; ?>">
        <label for="userlog">Username:</label><br />
        <input type="text" name="userlog">
        <br /><label for="passlog">Password:</label><br />
        <input type="password" name="passlog">
        <br /><input type="submit" name="Submit" value="Login"><br />
    </form>

    <?php

    if($username2 != $username and $password2 != $password){ 
    if(($username != $username2) and ($password != $password2)){
      echo "Wrong.<br /><a href=index?side=blogg>Back</a>"; 
      exit;
    }else{

    ?>

    <div align="center"><h2>Nytt blogginnlegg.</h2></div>
    <form name="form2" action="index.php?side=bloggsend" method="post" class="style1">
    <label for="date">Dato:</label><br /> 
        <input type="text" name="date" class="text2" value="<?php echo $realdate;?>"><br />
    <label for="headline">Overskrift</label><br />
        <input type="text" name="headline" class="text2"> <br />
    Innlegg:<br />
        <textarea cols="75" rows="25" name="mld" class="text2"></textarea>
        <br /><div align="right">-Ink</div>
        <input name="submit" type="submit" class="knapp" value="Send">
        <input name="reset" type="reset" class="knapp" value="Reset">
        <br />
    </form>
    Gamle innlegg: <br /><br />

    <?php
    $fil=fopen("news.txt", "r");
    $innhold=fread($fil, filesize("news.txt"));
    fclose($fil);
    echo("$innhold");
    }
    }
    ?>[/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.