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
Premium Land with House for Sale
anil1961
Updated:
Friday at 10:15 AM
AWS Certified Solutions Architect-Associate + AWS Certified Cloud Practitioner
Sanjeewani95
Updated:
Wednesday at 8:16 PM
🚀 එක පැකේජ් එකයි - මාසෙටම Unlimited Internet! 🌐
sayuru bandara
Updated:
Aug 18, 2026
🎬 CapCut Pro 1 Month Access! LKR 600
sayuru bandara
Updated:
Aug 18, 2026
🚀 Google One AI PRO Plan (Gemini Pro Activation) – 18 Months Access! LKR 2200
sayuru bandara
Updated:
Aug 18, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
web site help
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="bonney777" data-source="post: 11975355" data-attributes="member: 133200"><p>Insert the following codes in your script.</p><p></p><p><?php</p><p>$username = "root";</p><p>$password = "";</p><p>$hostname = "localhost";</p><p>$con=mysql_connect($hostname,$username,$password) ;</p><p>$select = mysql_select_db("shopping cart", $con);</p><p>$result = mysql_query("select email,Password FROM register");</p><p>while ($row = mysql_fetch_array($result)) {</p><p></p><p>$u1= $row{'email'};</p><p>$p1=$row{'Password'};</p><p></p><p>}</p><p>$user=$_POST['txtemail'];</p><p>$pass=$_POST['txtPassword'];</p><p>if ($user == $u1 && $pass ==$p1 )</p><p>{</p><p>echo "Welcome " . $user;</p><p><span style="color: Red">session_start();</span></p><p><span style="color: Red">$_SESSION['username'] = $user;</span></p><p>}</p><p>else</p><p>{</p><p>header( 'Location: Login error.php' ) ;</p><p>}</p><p></p><p>?></p><p></p><p>Thats all..</p><p></p><p>In your other pages add this code in the place you want to get show the username</p><p></p><p><span style="color: Red"><?php </span></p><p><span style="color: Red">session_start() ;</span></p><p><span style="color: Red">echo "Welcome : ".$_SESSION['username'];</span></p><p><span style="color: Red">?></span></p></blockquote><p></p>
[QUOTE="bonney777, post: 11975355, member: 133200"] Insert the following codes in your script. <?php $username = "root"; $password = ""; $hostname = "localhost"; $con=mysql_connect($hostname,$username,$password) ; $select = mysql_select_db("shopping cart", $con); $result = mysql_query("select email,Password FROM register"); while ($row = mysql_fetch_array($result)) { $u1= $row{'email'}; $p1=$row{'Password'}; } $user=$_POST['txtemail']; $pass=$_POST['txtPassword']; if ($user == $u1 && $pass ==$p1 ) { echo "Welcome " . $user; [COLOR=Red]session_start(); $_SESSION['username'] = $user;[/COLOR] } else { header( 'Location: Login error.php' ) ; } ?> Thats all.. In your other pages add this code in the place you want to get show the username [COLOR=Red]<?php session_start() ; echo "Welcome : ".$_SESSION['username']; ?>[/COLOR] [/QUOTE]
Insert quotes…
Verification
Dawasata paya keeyak thibeda?
Post reply
Top
Bottom