Show DevBest [NOOB] Newbie Registration (PHP) [NOOB]

BR4DLEY

Web Developer
Jan 2, 2012
328
23
Hello there DevBest and today ill be giving out my register that have coded myself, i did this last nigh from 9Pm to 1:30AM and its Just a noob Register, Feel free to Edit the Register and You may need to change Som of the Info, Other than that, Thanks for Reading, and i Hope i helped some people :p


Download Link:


Please NOTE, this is a Noob Version, i will release a professional looking one Soon.
 

Deion

Posting Freak
Jul 3, 2010
1,273
300
Hello there DevBest and today ill be giving out my register that have coded myself, i did this last nigh from 9Pm to 1:30AM and its Just a noob Register, Feel free to Edit the Register and You may need to change Som of the Info, Other than that, Thanks for Reading, and i Hope i helped some people

Just a copy off of a site;
You removed a couple of lines, big deal?

If you were going to do this, you could have at the least wrote a tutorial about rather than taking credit for something you copied and pasted.
 

Brought

更加努力
Jan 14, 2013
593
203
Just a copy off of a site;
You removed a couple of lines, big deal?

If you were going to do this, you could have at the least wrote a tutorial about rather than taking credit for something you copied and pasted.

Awkward when.
/close thread
 

Khalil

IDK
Dec 6, 2011
1,642
786
This...this is just so wrong in many ways!

First of all, you forgot the semicolons in your mysql configuration.
PHP:
$db_name="user";// Database name
$tbl_name="user";// Table name

Your mysql connection script is pretty fucked, so heres the fix:

PHP:
mysql_connect($host, $username, $password)or die("cannot connect");
mysql_select_db($db_name)or die("cannot select DB");

Your login page is fucked:

HTML:
<table> width="300" border="0"
align="center" cellpadding="0"
cellspacing="1" bgcolor=#CCCCCC>
    <tr>
        <form name="form1" method="post"
              action="checklogin.php">
            <td>
                <table width="100%" border="0"
                       cellpaddng="3" cellspacing="1"
bgcolor="#FFFFFF">
                    <tr>
                        <td> width="78">Username</td>
                        <td>width="6">:</td>
                        <td> width="294"><input
                        name="Bradley" type="text"
                        id="Bradley"></td>
                    </tr>
                    <tr>
                        <td>Password</td>
                        <td>:</td>
                        <td><input name="brad123"
                        type="text" id=brad123</td>
                    </tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td><input type ="submit"
                    name="Submit" value="Login"></td>
                    </tr>
                </table>
                        </td>
        </form>
        </tr>
</table>

Fix:

HTML:
<table width="300" border="0"
align="center" cellpadding="0"
cellspacing="1" bgcolor=#CCCCCC>
    <tr>
        <form name="form1" method="post"
              action="checklogin.php">
            <td>
                <table width="100%" border="0"
                       cellpaddng="3" cellspacing="1"
bgcolor="#FFFFFF">
                    <tr>
                        <td width="78">Username</td>
                        <td width="6">:</td>
                        <td width="294"><input
                        name="Bradley" type="text"
                        id="Bradley"></td>
                    </tr>
                    <tr>
                        <td>Password</td>
                        <td>:</td>
                        <td><input name="brad123"
                        type="text" id=brad123</td>
                    </tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td><input type ="submit"
                    name="Submit" value="Login"></td>
                    </tr>
                </table>
                        </td>
        </form>
        </tr>
</table>

In the checklogin.php, two lines are pretty fucked up and that would ruin the rest of the script, there are the lines and under them is the fix:

Fucked up line:
PHP:
$myusername="_POST['myusername']

Fix:
PHP:
$myusername=$_POST['myusername'];

And, the the name in the username input is "Bradley" and in the pass input is "brad123", they should be "myusername" and "mypassword" for this script to function.

Oh and this line is fucked up too:
PHP:
session_register("myusername);

Fix:
PHP:
session_register("myusername");

And next time, if you want to comment a line, don't forget the slashes in the start otheriwse it'll output that line in the page:
PHP:
// and redirect to file "login_succcess.php"

Oh and your login_success page, you forgot to comment the three first lines:
By the looks of it, you wanted the user of this script to read those lines but not output them in the page or show them in the code source, you could have just included them between the php tags and added the two slashes to the start of the second line.
PHP:
//Check if session is not registered,
//redirect back to main page.
//Put this code in first line of web page.

P.S: Next time, secure the info with hashing or encryption.
 
Last edited:

BR4DLEY

Web Developer
Jan 2, 2012
328
23
This...this is just so wrong in many ways!

First of all, you forgot the semicolons in your mysql configuration.
PHP:
$db_name="user";// Database name
$tbl_name="user";// Table name

Your mysql connection script is pretty fucked, so heres the fix:

PHP:
mysql_connect($host, $username, $password)or die("cannot connect");
mysql_select_db($db_name)or die("cannot select DB");

Your login page is fucked:

HTML:
<table> width="300" border="0"
align="center" cellpadding="0"
cellspacing="1" bgcolor=#CCCCCC>
    <tr>
        <form name="form1" method="post"
              action="checklogin.php">
            <td>
                <table width="100%" border="0"
                       cellpaddng="3" cellspacing="1"
bgcolor="#FFFFFF">
                    <tr>
                        <td> width="78">Username</td>
                        <td>width="6">:</td>
                        <td> width="294"><input
                        name="Bradley" type="text"
                        id="Bradley"></td>
                    </tr>
                    <tr>
                        <td>Password</td>
                        <td>:</td>
                        <td><input name="brad123"
                        type="text" id=brad123</td>
                    </tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td><input type ="submit"
                    name="Submit" value="Login"></td>
                    </tr>
                </table>
                        </td>
        </form>
        </tr>
</table>

Fix:

HTML:
<table width="300" border="0"
align="center" cellpadding="0"
cellspacing="1" bgcolor=#CCCCCC>
    <tr>
        <form name="form1" method="post"
              action="checklogin.php">
            <td>
                <table width="100%" border="0"
                       cellpaddng="3" cellspacing="1"
bgcolor="#FFFFFF">
                    <tr>
                        <td width="78">Username</td>
                        <td width="6">:</td>
                        <td width="294"><input
                        name="Bradley" type="text"
                        id="Bradley"></td>
                    </tr>
                    <tr>
                        <td>Password</td>
                        <td>:</td>
                        <td><input name="brad123"
                        type="text" id=brad123</td>
                    </tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td><input type ="submit"
                    name="Submit" value="Login"></td>
                    </tr>
                </table>
                        </td>
        </form>
        </tr>
</table>

In the checklogin.php, two lines are pretty fucked up and that would ruin the rest of the script, there are the lines and under them is the fix:

Fucked up line:
PHP:
$myusername="_POST['myusername']

Fix:
PHP:
$myusername=$_POST['myusername'];

And, the the name in the username input is "Bradley" and in the pass input is "brad123", they should be "myusername" and "mypassword" for this script to function.

Oh and this line is fucked up too:
PHP:
session_register("myusername);

Fix:
PHP:
session_register("myusername");

And next time, if you want to comment a line, don't forget the slashes in the start otheriwse it'll output that line in the page:
PHP:
// and redirect to file "login_succcess.php"

Oh and your login_success page, you forgot to comment the three first lines:
By the looks of it, you wanted the user of this script to read those lines but not output them in the page or show them in the code source, you could have just included them between the php tags and added the two slashes to the start of the second line.
PHP:
//Check if session is not registered,
//redirect back to main page.
//Put this code in first line of web page.

P.S: Next time, secure the info with hashing or encryption.



I did say you may have to re edit to to fit your DB


Just a copy off of a site;
You removed a couple of lines, big deal?

If you were going to do this, you could have at the least wrote a tutorial about rather than taking credit for something you copied and pasted.


No, i sat there doing it for 3 Hours straight.
 

Khalil

IDK
Dec 6, 2011
1,642
786
I did say you may have to re edit to to fit your DB

I get from your quote that you didn't read my entire reply, your "script" is fucked up is many ways!
I stated that you forgot the semicolon in your mysql configuration and you tell me i have to edit the info for it to fit my db? Unless you of couse mean a person has to fix the script himself to use it...

Read what i stated in my reply, and fix the errors dude...
 

BR4DLEY

Web Developer
Jan 2, 2012
328
23
I get from your quote that you didn't read my entire reply, your "script" is fucked up is many ways!
I stated that you forgot the semicolon in your mysql configuration and you tell me i have to edit the info for it to fit my db? Unless you of couse mean a person has to fix the script himself to use it...

Read what i stated in my reply, and fix the errors dude...


Tbh, im just a noob at PHP and still learning, Its quite easy to re script
 

BR4DLEY

Web Developer
Jan 2, 2012
328
23
You must be an idiot, one does not simply have all the same comments within their files as on a tutorial. I would understand the code being nearly the same, but not the comments too..
Yes i know, Now, enough hate :D i tried my best -_-
 

Users who are viewing this thread

Top