Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Ad icon
Sell your Land, House on idamata.lk for FREE
sajith.xp.pk
Updated:
Yesterday at 9:03 AM
Handmade Character Soft Toys
anil1961
Updated:
Tuesday at 2:11 PM
Bodim.lk out now !
Manoj Suranga Bandara
Updated:
Sunday at 3:05 AM
Power Lifting Lever Belt
SkullVamp
Updated:
Jun 13, 2026
Ad icon
port.lk Domain for sale
Lankan-Tech
Updated:
Jun 13, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
PHP danna kenek poddak ennako :)
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="Dilshankgc" data-source="post: 17078353" data-attributes="member: 458219"><p>[CODE]<?php</p><p>include('config.php');</p><p>?></p><p><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></p><p><html xmlns="http://www.w3.org/1999/xhtml"></p><p> <head></p><p> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></p><p> <link href="<?php echo $design; ?>/style.css" rel="stylesheet" title="Style" /></p><p> <title>Sign up</title></p><p> </head></p><p> <body></p><p> <div class="header"></p><p> <a href="<?php echo $url_home; ?>"><img src="<?php echo $design; ?>/images/logo.png" alt="Members Area" /></a></p><p> </div></p><p><?php</p><p>//We check if the form has been sent</p><p>if(isset($_POST['username'], $_POST['password'], $_POST['passverif'], $_POST['email'], $_POST['avatar']) and $_POST['username']!='')</p><p>{</p><p> //We remove slashes depending on the configuration</p><p> if(get_magic_quotes_gpc())</p><p> {</p><p> $_POST['username'] = stripslashes($_POST['username']);</p><p> $_POST['password'] = stripslashes($_POST['password']);</p><p> $_POST['passverif'] = stripslashes($_POST['passverif']);</p><p> $_POST['email'] = stripslashes($_POST['email']);</p><p> $_POST['avatar'] = stripslashes($_POST['avatar']);</p><p> }</p><p> //We check if the two passwords are identical</p><p> if($_POST['password']==$_POST['passverif'])</p><p> {</p><p> //We check if the password has 6 or more characters</p><p> if(strlen($_POST['password'])>=6)</p><p> {</p><p> //We check if the email form is valid</p><p> if(preg_match('#^(([a-z0-9!\#$%&\\\'*+/=?^_`{|}~-]+\.?)*[a-z0-9!\#$%&\\\'*+/=?^_`{|}~-]+)@(([a-z0-9-_]+\.?)*[a-z0-9-_]+)\.[a-z]{2,}$#i',$_POST['email']))</p><p> {</p><p> //We protect the variables</p><p> $username = mysqli_real_escape_string($my_connection, $_POST['username']);</p><p> $password = mysqli_real_escape_string($my_connection, $_POST['password']);</p><p> $email = mysqli_real_escape_string($my_connection, $_POST['email']);</p><p> $avatar = mysql_real_escape_string($my_connection, $_POST['avatar']);</p><p> //We check if there is no other user using the same username</p><p> $dn = mysql_num_rows(mysql_query('select id from users where username="'.$username.'"'));</p><p> if($dn==0)</p><p> {</p><p> //We count the number of users to give an ID to this one</p><p> $dn2 = mysqli_num_rows(mysql_query('select id from users'));</p><p> $id = $dn2+1;</p><p> //We save the informations to the databse</p><p> if(mysql_query('insert into users(id, username, password, email, avatar, signup_date) values ('.$id.', "'.$username.'", "'.$password.'", "'.$email.'", "'.$avatar.'", "'.time().'")'))</p><p> {</p><p> //We dont display the form</p><p> $form = false;</p><p>?></p><p><div class="message">You have successfuly been signed up. You can log in.<br /></p><p><a href="connexion.php">Log in</a></div></p><p><?php</p><p> }</p><p> else</p><p> {</p><p> //Otherwise, we say that an error occured</p><p> $form = true;</p><p> $message = 'An error occurred while signing up.';</p><p> }</p><p> }</p><p> else</p><p> {</p><p> //Otherwise, we say the username is not available</p><p> $form = true;</p><p> $message = 'The username you want to use is not available, please choose another one.';</p><p> }</p><p> }</p><p> else</p><p> {</p><p> //Otherwise, we say the email is not valid</p><p> $form = true;</p><p> $message = 'The email you entered is not valid.';</p><p> }</p><p> }</p><p> else</p><p> {</p><p> //Otherwise, we say the password is too short</p><p> $form = true;</p><p> $message = 'Your password must contain at least 6 characters.';</p><p> }</p><p> }</p><p> else</p><p> {</p><p> //Otherwise, we say the passwords are not identical</p><p> $form = true;</p><p> $message = 'The passwords you entered are not identical.';</p><p> }</p><p>}</p><p>else</p><p>{</p><p> $form = true;</p><p>}</p><p>if($form)</p><p>{</p><p> //We display a message if necessary</p><p> if(isset($message))</p><p> {</p><p> echo '<div class="message">'.$message.'</div>';</p><p> }</p><p> //We display the form</p><p>?></p><p><div class="content"></p><p> <form action="sign_up.php" method="post"></p><p> Please fill the following form to sign up:<br /></p><p> <div class="center"></p><p> <label for="username">Username</label><input type="text" name="username" value="<?php if(isset($_POST['username'])){echo htmlentities($_POST['username'], ENT_QUOTES, 'UTF-8');} ?>" /><br /></p><p> <label for="password">Password<span class="small">(6 characters min.)</span></label><input type="password" name="password" /><br /></p><p> <label for="passverif">Password<span class="small">(verification)</span></label><input type="password" name="passverif" /><br /></p><p> <label for="email">Email</label><input type="text" name="email" value="<?php if(isset($_POST['email'])){echo htmlentities($_POST['email'], ENT_QUOTES, 'UTF-8');} ?>" /><br /></p><p> <label for="avatar">Avatar<span class="small">(optional)</span></label><input type="text" name="avatar" value="<?php if(isset($_POST['avatar'])){echo htmlentities($_POST['avatar'], ENT_QUOTES, 'UTF-8');} ?>" /><br /></p><p> <input type="submit" value="Sign up" /></p><p> </div></p><p> </form></p><p></div></p><p><?php</p><p>}</p><p>?></p><p> <div class="foot"><a href="<?php echo $url_home; ?>">Go Home</a> - <a href=""></a></div></p><p> </body></p><p></html>[/CODE]</p><p></p><p>onna okai code eka. oka run weddi me warnings enawa. mama php walata aluth. ekai <img src="/styles/default/xenforo/smilies/default/oo.gif" class="smilie" loading="lazy" alt=":oo:" title="Oo :oo:" data-shortname=":oo:" /> <img src="http://i57.tinypic.com/34o9e7m.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p></blockquote><p></p>
[QUOTE="Dilshankgc, post: 17078353, member: 458219"] [CODE]<?php include('config.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="<?php echo $design; ?>/style.css" rel="stylesheet" title="Style" /> <title>Sign up</title> </head> <body> <div class="header"> <a href="<?php echo $url_home; ?>"><img src="<?php echo $design; ?>/images/logo.png" alt="Members Area" /></a> </div> <?php //We check if the form has been sent if(isset($_POST['username'], $_POST['password'], $_POST['passverif'], $_POST['email'], $_POST['avatar']) and $_POST['username']!='') { //We remove slashes depending on the configuration if(get_magic_quotes_gpc()) { $_POST['username'] = stripslashes($_POST['username']); $_POST['password'] = stripslashes($_POST['password']); $_POST['passverif'] = stripslashes($_POST['passverif']); $_POST['email'] = stripslashes($_POST['email']); $_POST['avatar'] = stripslashes($_POST['avatar']); } //We check if the two passwords are identical if($_POST['password']==$_POST['passverif']) { //We check if the password has 6 or more characters if(strlen($_POST['password'])>=6) { //We check if the email form is valid if(preg_match('#^(([a-z0-9!\#$%&\\\'*+/=?^_`{|}~-]+\.?)*[a-z0-9!\#$%&\\\'*+/=?^_`{|}~-]+)@(([a-z0-9-_]+\.?)*[a-z0-9-_]+)\.[a-z]{2,}$#i',$_POST['email'])) { //We protect the variables $username = mysqli_real_escape_string($my_connection, $_POST['username']); $password = mysqli_real_escape_string($my_connection, $_POST['password']); $email = mysqli_real_escape_string($my_connection, $_POST['email']); $avatar = mysql_real_escape_string($my_connection, $_POST['avatar']); //We check if there is no other user using the same username $dn = mysql_num_rows(mysql_query('select id from users where username="'.$username.'"')); if($dn==0) { //We count the number of users to give an ID to this one $dn2 = mysqli_num_rows(mysql_query('select id from users')); $id = $dn2+1; //We save the informations to the databse if(mysql_query('insert into users(id, username, password, email, avatar, signup_date) values ('.$id.', "'.$username.'", "'.$password.'", "'.$email.'", "'.$avatar.'", "'.time().'")')) { //We dont display the form $form = false; ?> <div class="message">You have successfuly been signed up. You can log in.<br /> <a href="connexion.php">Log in</a></div> <?php } else { //Otherwise, we say that an error occured $form = true; $message = 'An error occurred while signing up.'; } } else { //Otherwise, we say the username is not available $form = true; $message = 'The username you want to use is not available, please choose another one.'; } } else { //Otherwise, we say the email is not valid $form = true; $message = 'The email you entered is not valid.'; } } else { //Otherwise, we say the password is too short $form = true; $message = 'Your password must contain at least 6 characters.'; } } else { //Otherwise, we say the passwords are not identical $form = true; $message = 'The passwords you entered are not identical.'; } } else { $form = true; } if($form) { //We display a message if necessary if(isset($message)) { echo '<div class="message">'.$message.'</div>'; } //We display the form ?> <div class="content"> <form action="sign_up.php" method="post"> Please fill the following form to sign up:<br /> <div class="center"> <label for="username">Username</label><input type="text" name="username" value="<?php if(isset($_POST['username'])){echo htmlentities($_POST['username'], ENT_QUOTES, 'UTF-8');} ?>" /><br /> <label for="password">Password<span class="small">(6 characters min.)</span></label><input type="password" name="password" /><br /> <label for="passverif">Password<span class="small">(verification)</span></label><input type="password" name="passverif" /><br /> <label for="email">Email</label><input type="text" name="email" value="<?php if(isset($_POST['email'])){echo htmlentities($_POST['email'], ENT_QUOTES, 'UTF-8');} ?>" /><br /> <label for="avatar">Avatar<span class="small">(optional)</span></label><input type="text" name="avatar" value="<?php if(isset($_POST['avatar'])){echo htmlentities($_POST['avatar'], ENT_QUOTES, 'UTF-8');} ?>" /><br /> <input type="submit" value="Sign up" /> </div> </form> </div> <?php } ?> <div class="foot"><a href="<?php echo $url_home; ?>">Go Home</a> - <a href=""></a></div> </body> </html>[/CODE] onna okai code eka. oka run weddi me warnings enawa. mama php walata aluth. ekai :oo: [IMG]http://i57.tinypic.com/34o9e7m.png[/IMG] [/QUOTE]
Insert quotes…
Verification
Haya warak paha keeyada? (haya wadi kireema paha)
Post reply
Top
Bottom