Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
- <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
- <meta name="ProgId" content="FrontPage.Editor.Document">
- <title>Meridian 59 - News</title>
- </head>
- <body background="images/m59_website_09.jpg">
- <font size="2" face="Arial" color="#FFFFFF">
- <h2>Checking username...</h2><br />
- <?php
- if ($_POST['password1'] == $_POST['password2']) {
- $user = strtolower($_POST['username']);
- $pw = $_POST['password1'];
- $datecreated = date("y-m-d H:i:s");
- $dbh = mysql_connect ("localhost", "meridian_333", "m59stillrocking")
- or die ('I cannot connect to the database because: ' . mysql_error());
- mysql_select_db ("meridian_333");
- $query = "select * from xxxx where user = '$user'";
- $result = mysql_query($query)
- or die ('I cannot connect to the database because: ' . mysql_error());
- $num_rows = mysql_num_rows($result);
- if ($num_rows == "0") {
- $data ="create automated $user $pw";
- $fp = fsockopen("127.0.0.1", "5374", $errno, $errstr, 2);
- if (!$fp) {
- echo "$errstr ($errno)<br />\n";
- } else {
- fwrite($fp, $data . "\r");
- stream_set_timeout($fp, 2);
- $results = array();
- $status = socket_get_status($fp);
- while (!feof($fp) && !$status['timed_out'])
- {
- $results[] = fgets($fp);
- $status = socket_get_status($fp);
- }
- fclose($fp);
- /*print_r($results);*/
- $query = "insert into xxxx(user,ip,date,pw)";
- $query = $query . "values('".$user."','".$_SERVER["REMOTE_ADDR"]."','".$datecreated."','".$pw."')";
- $result = mysql_query($query)
- or die ('I cannot connect to the database because: ' . mysql_error());
- mysql_close($dbh);
- echo "Account $user created sucesfully! <br />";
- }
- }
- else {
- echo "Username already exist, please pick another one";
- }
- }
- else {
- echo "Mismatch passwords";
- }
- ?>
- </tr>
- </table>
- </center>
- </div>
- </body>
Add Comment
Please, Sign In to add comment