[RELEASE] Simple register (Works 100%)

Page 2 of 2 FirstFirst 12
Results 16 to 27 of 27
  1. #16
    Member Rbit is offline
    MemberRank
    Mar 2008 Join Date
    EstoniaLocation
    59Posts

    Re: [RELEASE] Simple register (Works 100%)

    Quote Originally Posted by Jaycub View Post
    IS THEIR A WAY TO RE-GET MY PASSWORD FOR MYSQL BACK ? COZ I DONT THINK I CAN REMEMBER IT !

    Error :
    Code:
     Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in C:\wamp\www\index.php on line 5
    Couldn't connect to the database, we're sorry...

    In index :
    Code:
    <?php 
    $dns="GunZDB";
    $user="Jacob\SQLEXPRESS";
    $pass="";
    $connect=odbc_connect($dns, $user, $pass) or die ("Couldn't connect to the database, we're sorry...");
    odbc_exec($connect,"use GunzDB");
     
    function antisql($bericht){
    $bericht = stripslashes($bericht); 
    $bericht = htmlspecialchars($bericht); 
    $bericht = nl2br($bericht); 
    return $bericht;
    }
     
    if(isset($_GET['action']) AND $_GET['action'] == "register"){
     
    if(empty($_POST['username'])){
    $error.="No username filled!<br>";
    }
     
    if(empty($_POST['password'])){
    $error.="No password filled!<br>";
    }
     
    if(empty($_POST['email'])){
    $error.="No e-mail filled!<br>";
    }
     
    if(empty($_POST['name'])){
    $error.="No name filled!<br>";
    }
     
    if(empty($_POST['age'])){
    $error.="No age filled!<br>";
    }
     
    if($error == TRUE){
    echo "<br><br><center>There are some troubles while registering your account:<br>".$error."</center><br>";
    die();
    }
     
    else
    {
    $regdate = date("Y-m-d H:i:s");
    $email = antisql($_POST['email']);
    $reg = "INSERT INTO Account (UserID, UGradeID, PGradeID, RegDate, Email, Age, Name) VALUES ('".antisql($_POST['username'])."', '1', '1', '$regdate', '$email', '".antisql($_POST['age'])."', '".antisql($_POST['name'])."')";
    $query = odbc_exec($connect,$reg);
    $gebruiker1 = "SELECT AID FROM Account WHERE UserID='".antisql($_POST['username'])."'";
    $gebruiker = odbc_exec($connect,$gebruiker1);
    $i=1;
    while (odbc_fetch_row($gebruiker, $i)){
    $aid = odbc_result($gebruiker, 'AID');
    $i++;
    }
    if (!$aid)
    {
    die ("Oeps, something's wrong with the database");
    }
    $reg2 = "INSERT INTO Login (UserID, AID, Password) VALUES ('".antisql($_POST['username'])."', '$aid', '".antisql($_POST['password'])."')";
    $query = odbc_exec($connect,$reg2);
    print ("<center>Your account is succesfully created!</center>");
    }
    }
    ?>
    <center><b>You can register a IMP Gunz account right here:</b><br><br>
    <?php echo "<form action='".$_SERVER['PHP_SELF']."?action=register' method='POST'>"; ?>
    <tr>
    <td align=center height='24'>Username</td>
    <td align=center height='24'><input type='text' name='username'></td>
    </tr>
    <br>
    <tr>
    <td align=center height='24'>Password</td>
    <td align=center height='24'><input type='password' name='password'></td>
    </tr>
    <br>
    <tr>
    <td align=center height='24'>E-mail&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
    <td align=center height='24'><input type='text' name='email'></td>
    </tr>
    <br>
    <tr>
    <td align=center height='24'>Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
    <td align=center height='24'><input type='text' name='name'></td>
    </tr>
    <br>
    <tr>
    <td align=center height='24'>Age&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
    <td align=center height='24'><input type='text' name='age'></td>
    </tr>
    <br>
    <tr>
    <td align=center height='24'></td>
    <td align=center height='24'><input type='submit' value='Register!'></td>
    </tr>
    </form>


    Dude! Just reinstall SQL!

  2. #17
    Proficient Member Jaycub is offline
    MemberRank
    Nov 2007 Join Date
    162Posts

    Re: [RELEASE] Simple register (Works 100%)

    SQL = MYSql ??

    Does it depend on which version ?

  3. #18
    Apprentice xXPointBlankxXx is offline
    MemberRank
    Mar 2008 Join Date
    23Posts

    Re: [RELEASE] Simple register (Works 100%)

    Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in C:\AppServ\www\index.php on line 5
    Couldn't connect to the database, we're sorry...

    i use my ip address when i go into the html and thats what it shows, i use my ip address on my servers instead of 127.0.0.1, what am i doing wrong?

    i have dns: GunzDB
    user: sa
    pass: my pass (i dont want to release it to every1) so what am i doing wrong?

  4. #19
    Banned MAXTRAXv3 is offline
    BannedRank
    Jan 2007 Join Date
    Perth, WesternLocation
    2,252Posts

    Re: [RELEASE] Simple register (Works 100%)

    JayNub you need to reinstall MSSQL (not MYSQL)...

    xXPointBlankxXx you forgot to do part of the tut

  5. #20
    Who is the cow! sari4ever is offline
    MemberRank
    Apr 2007 Join Date
    Holy LandLocation
    790Posts

    Re: [RELEASE] Simple register (Works 100%)

    same problem like xxpointblackxxx

  6. #21
    Proficient Member Jaycub is offline
    MemberRank
    Nov 2007 Join Date
    162Posts

    Re: [RELEASE] Simple register (Works 100%)

    Quote Originally Posted by MAXTRAXv3 View Post
    JayNub

    Im sorry.. im sure that YOU Asked questions aswell...


    I dont waste money on taking classes like coding so i dont know what some of these terms r

    Im only learning so get the Hell of my Back !!!

    Question : Is MYSQL Needed at all ?

    Ok Now seriously.. THERE IS NO.. NO !!! PASSWORD !!

    Last edited by Jaycub; 05-04-08 at 02:25 PM.

  7. #22
    Apprentice Uzi910 is offline
    MemberRank
    Apr 2007 Join Date
    17Posts

    Re: [RELEASE] Simple register (Works 100%)

    Quote Originally Posted by Jaycub View Post
    Im sorry.. im sure that YOU Asked questions aswell...


    I dont waste money on taking classes like coding so i dont know what some of these terms r

    Im only learning so get the Hell of my Back !!!

    Question : Is MYSQL Needed at all ?

    Ok Now seriously.. THERE IS NO.. NO !!! PASSWORD !!

    he means you should of chose the other option not windows authentication

  8. #23
    Proficient Member Jaycub is offline
    MemberRank
    Nov 2007 Join Date
    162Posts

    Re: [RELEASE] Simple register (Works 100%)

    Quote Originally Posted by Uzi910 View Post
    he means you should of chose the other option not windows authentication

    Why didnt he just say that :)

    Now. THAT I understand ! :sweatdrop

  9. #24
    Enthusiast killerbros2 is offline
    MemberRank
    Oct 2007 Join Date
    31Posts

    Re: [RELEASE] Simple register (Works 100%)

    yea u shoulda chose other option. and i thoaght pw is supposed 2 b ur computer name lol

  10. #25
    Apprentice SilentVoice is offline
    MemberRank
    Jun 2008 Join Date
    RussiaLocation
    9Posts

    Re: [RELEASE] Simple register (Works 100%)

    Code:
    Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in C:\AppServ\www\index.php on line 5
    Couldn't connect to the database, we're sorry...
    if you got this problem - make sure that you created SYSTEM DNS, not USER DNS

    and sorry if my english bad -_-

  11. #26
    Novice ChildProdigy is offline
    MemberRank
    Jun 2008 Join Date
    2Posts

    Re: [RELEASE] Simple register (Works 100%)

    My installer didn't ask if i wanted a username or password, ill reinstall again and see if it did...
    EDIT: It didn't ask if i wanted a password or a username >.>

  12. #27
    Alpha Member gregon13 is offline
    MemberRank
    Nov 2007 Join Date
    CanadaLocation
    1,945Posts

    Re: [RELEASE] Simple register (Works 100%)

    It doesn't require classes in scripting to learn the difference between ms sql, mysql and how to read!
    p.s who the fuck pays for that shit any ways? it's absolutley free if you search the net and you do not need to know scripting to set-up a server oor read.... go back to school



Page 2 of 2 FirstFirst 12

Advertisement