SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Threaded View

  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2012
    Location
    BD
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unable to generate random password for a database

    Hello everybody,
    I am facing problem for create random unique password for every row. My idea is : I have a button and when i will click on that button then all password will be reseted and create unique password for every row. By my recent script all password is reset but all password is same but i want different password for every row. Please help me. I am providing you my code here :

    HTML Code:
    <form action='ques-mng.php?do=submit&for=reset-all' method='post'>
    <input type='submit' name='submit' value='Reset all password' class='btn btn-danger'>
    </form>
    PHP Code:

    if($do=='submit' and $for=='reset-all'){
    $reset=rand();
    mysql_query("UPDATE ques_ans_data SET rec_restriction='$reset
    WHERE qa_id!=''"
    );
    echo 
    "<meta http-equiv='refresh' content='0;url=ques-mng.php'>";
    exit();

    I want when that reset button will be pressed then all password will be reseted and all password will be different than another . Please help me if you know about this.

    Thanks in advance
    Last edited by anturj; Aug 17, 2013 at 23:22. Reason: spelling mistake


Tags for this Thread

Bookmarks

Posting Permissions

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