Help

Started on the old forum in March 2011 · view the original in the archive · old links redirect here

6 replies · 451 views · started 15 years ago · 1 min read

3 participants
De_Viper Newbie · 7 posts #1

Hey Friends Im New To this stuff (php etc) i want learn php.. plzz help i want loging and register script etc.. plzz bro

funtowap Developer · 59 posts #2

Here i made one i m nt sure abt it bt ask some experts if this got any ERROR

This to header.php

<?
$connect=mysql_connect("localhost","username",
	"password");
mysql_select_db("userdata",$connect) or 
   die (mysql_errno().":<b> ".mysql_error()."</b>");
?>

This is Sql Query to run

CREATE TABLE  'userdata' (

'id_user' INT NOT NULL AUTO_INCREMENT ,
'name' VARCHAR( 128 ) NOT NULL ,
'email' VARCHAR( 64 ) NOT NULL ,
'phone_number' VARCHAR( 16 ) NOT NULL ,
'username' VARCHAR( 16 ) NOT NULL ,
'pass' VARCHAR( 32 ) NOT NULL ,
PRIMARY KEY ( 'id_user' ) 
)

This to login.php

<?
include('header.php');

$login = mysql_fetch_assoc(mysql_query('SELECT * FROM users;'));

echo '<div class=menu>Login Admin:</div><div class=a>
<form method="post" action="login.php?">
Password :<br>
<input class="enter" type="password" name="pass"><br>
<input class="buttom" type="submit" value="Submit">
</form></div>';
if(($_POST['pass'] ==  $login['password']))
{
header('Location: home.php');
exit;
}
else{
echo 'Wrong Password. Please Try Again';
}
?>

This to register.php

<?
include('header.php);

echo'<form name="registration_page" method="post" action="register.php">
	<input type="text" name="name">
	<input type="text" name="email">
	<input type="text" name="username">
	<input type="password" name="pass">
	<input type="password" name="password_confirmation">
	<input type="text" name="phone_number">
	<input type="submit" value="Register">
	</form>';
	
$insert_query = 'insert into 	userdata (
					name,
					email,
					phone_number,
					username,
					password
					) 
					values
					(
					"' . $_POST['name'] . '", 
					"' . $_POST['email'] . '",
					"' . $_POST['phone_number'] . '",
					"' . $_POST['username'] . '",
					"' . md5($_POST['pass']) . '"
					)';

mysql_query($insert_query);

echo'<script language = "Javascript">
  
function Validate()
{
    if (document.registration_page.name.value == '') 
    {
        alert('Please fill in your name!');
        return false;
    }
    if (document.registration_page.email.value == '') 
    {
       alert('Please fill in your email address!');
       return false;
    }
    if (document.registration_page.username.value == '') 
    {
        alert('Please fill in your desired username!');
        return false;
    }
    if (document.registration_page.password.value == '') 
    {
       alert('Please fill in your desired password!');
      return false;
    }
    if (document.registration_page.password_confirmation.value == '') 
    {
       alert('Please fill in your password again for confirmation!');
      return false;
    }
    if (document.registration_page.password.value != 
    document.registration_page.password_confirmation.value) 
    {
        alert("The two passwords are not identical! "+
        "Please enter the same password again for confirmation");
        return false;
    }
    if (document.registration_page.phone_number.value == '') 
    {
        alert('Please fill in your phone number!');
        return false;
    }
    return true;
}
</script>
Include this piece of code on your page, and change the <form> tag to trigger the execution of the Validate() function on form submit:

<form name="registration_page" method="post" action="register.php 
	onsubmit="return Validate();">';
	
?>

Aw i found Some error in it ! Experts its my first try to make own codes please tell me my faults ! 😀

Was Just Out of site WORLD ..... Coming BACkkkkkkk.....

De_Viper Newbie · 7 posts #3

hmmm i want a full script! im new to these stuffs.. Thanks For Helping bro

funtowap Developer · 59 posts #4

u mean u want full community script?

Was Just Out of site WORLD ..... Coming BACkkkkkkk.....

subzero Super moderator Fellow · 3,954 posts #5

i don't know ...

i guest he didn't search the forum for scripts like this is download-able lol

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

De_Viper Newbie · 7 posts #6

yea i want a full community script

subzero Super moderator Fellow · 3,954 posts #7

Open Search type Lavalair then click search.

Find a zip then download done..

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close