CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   PHP (http://www.codingforums.com/forumdisplay.php?f=6)
-   -   Could someone help me how to convert this to form action (http://www.codingforums.com/showthread.php?t=285169)

maici 01-02-2013 09:40 PM

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);
?>


maici 01-02-2013 10:43 PM

Solved :=). by myself


All times are GMT +1. The time now is 03:55 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.