Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2013
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Could someone help me how to convert this to form action

    So I have follow code. Which replace username "333" to "reer" in database.
    But I'm kinda lost how to make this code working follow method:

    There is field box where typing user's current username and second field where type new user's username and then just submit. If someone have time to help me I appreciate it very much.

    Code:
    <?php
    $con = mysql_connect("localhost","root","");
    if (!$con)
      {
      die('Could not connect: ' . mysql_error());
      }
    
    mysql_select_db("database", $con);
    
    mysql_query("UPDATE users SET username='reer'
    WHERE username='333'");
    
    mysql_close($con);
    ?>

  • #2
    New to the CF scene
    Join Date
    Jan 2013
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Solved :=). by myself


  •  

    Posting Permissions

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