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
Pure VPN - Up to 27 Months
vgp
Updated:
Friday at 8:10 AM
එක පැකේජ් එකයි මාසෙටම Unlimited Internet. තාමත් DATA CARD දාන්න සල්ලි වියදම් කරනවද? අඩුම මිලට අපෙන්.
sayuru bandara
Updated:
Tuesday at 12:30 PM
Ad icon
ඉන්ටර්නෙට් එකෙන් හරියටම සල්ලි හොයන්න සහ Success වෙන්න කැමතිද? 🚀 (E-Money & Success Stories)
siri sumana
Updated:
May 30, 2026
Gemini AI PRO 18 months Offer
Hawaka
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
php waddo.....
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="indi8305" data-source="post: 23452830" data-attributes="member: 58128"><p><?php</p><p> mysql_connect("localhost", "lanka83_inc", "paba832205") or die("Error connecting to database: ".mysql_error());</p><p> /*</p><p> localhost - it's location of the mysql server, usually localhost</p><p> root - your username</p><p> third is your password</p><p> </p><p> if connection fails it will stop loading the page and display an error</p><p> */</p><p> </p><p> mysql_select_db("lanka83_pnts") or die(mysql_error());</p><p> /* tutorial_search is the name of database we've created */</p><p>?></p><p></p><p></p><p></p><p></p><p></p><p><?php</p><p> </p><p> $query = $_GET['customerid']; </p><p> $query = $_GET['username'];</p><p></p><p></p><p> // gets value sent over search form</p><p> </p><p> $min_length = 1;</p><p> // you can set minimum length of the query if you want</p><p> </p><p> if(strlen($query) >= $min_length){ // if query length is more or equal minimum length then</p><p> </p><p> $query = htmlspecialchars($query); </p><p> // changes characters used in html to their equivalents, for example: < to ></p><p> </p><p> $query = mysql_real_escape_string($query);</p><p> // makes sure nobody uses SQL injection</p><p> </p><p> $raw_results = mysql_query("SELECT * FROM loyalty</p><p> WHERE (`customerid` LIKE '%".$query."%') and (`username` LIKE '%".$username."%')") or die(mysql_error());</p><p> </p><p> // * means that it selects all fields, you can also write: `id`, `title`, `text`</p><p> // articles is the name of our table</p><p> </p><p> // '%$query%' is what we're looking for, % means anything, for example if $query is Hello</p><p> // it will match "hello", "Hello man", "gogohello", if you want exact match use `title`='$query'</p><p> // or if you want to match just full word so "gogohello" is out use '% $query %' ...OR ... '$query %' ... OR ... '% $query'</p><p> </p><p> if(mysql_num_rows($raw_results) > 0){ // if one or more rows are returned do following</p><p> </p><p> while($results = mysql_fetch_array($raw_results)){</p><p> // $results = mysql_fetch_array($raw_results) puts data from database into array, while it's valid it does the loop</p><p> </p><p> echo "<p>Your Points Balance and Details<h3>".$results['name']."</h3><p>Points Balance -".$results['points']."<p>Customer ID -".$results['customerid']."</p><hr>";</p><p> // posts results gotten from database(title and text) you can also show id ($results['id'])</p><p> }</p><p> </p><p> }</p><p> else{ // if there is no matching rows do following</p><p> echo "No results";</p><p> }</p><p> </p><p> }</p><p> else{ // if query length is less than minimum</p><p> echo ""; </p><p> }</p><p>?></p><p></p><p></p><p></p><p></p><p></p><p></p><p>mata ona customer id ekai username or pass word gahuwama customer ge points data base eken search karala bala ganna ..kauru hari php waddek meka balanawada</p></blockquote><p></p>
[QUOTE="indi8305, post: 23452830, member: 58128"] <?php mysql_connect("localhost", "lanka83_inc", "paba832205") or die("Error connecting to database: ".mysql_error()); /* localhost - it's location of the mysql server, usually localhost root - your username third is your password if connection fails it will stop loading the page and display an error */ mysql_select_db("lanka83_pnts") or die(mysql_error()); /* tutorial_search is the name of database we've created */ ?> <?php $query = $_GET['customerid']; $query = $_GET['username']; // gets value sent over search form $min_length = 1; // you can set minimum length of the query if you want if(strlen($query) >= $min_length){ // if query length is more or equal minimum length then $query = htmlspecialchars($query); // changes characters used in html to their equivalents, for example: < to > $query = mysql_real_escape_string($query); // makes sure nobody uses SQL injection $raw_results = mysql_query("SELECT * FROM loyalty WHERE (`customerid` LIKE '%".$query."%') and (`username` LIKE '%".$username."%')") or die(mysql_error()); // * means that it selects all fields, you can also write: `id`, `title`, `text` // articles is the name of our table // '%$query%' is what we're looking for, % means anything, for example if $query is Hello // it will match "hello", "Hello man", "gogohello", if you want exact match use `title`='$query' // or if you want to match just full word so "gogohello" is out use '% $query %' ...OR ... '$query %' ... OR ... '% $query' if(mysql_num_rows($raw_results) > 0){ // if one or more rows are returned do following while($results = mysql_fetch_array($raw_results)){ // $results = mysql_fetch_array($raw_results) puts data from database into array, while it's valid it does the loop echo "<p>Your Points Balance and Details<h3>".$results['name']."</h3><p>Points Balance -".$results['points']."<p>Customer ID -".$results['customerid']."</p><hr>"; // posts results gotten from database(title and text) you can also show id ($results['id']) } } else{ // if there is no matching rows do following echo "No results"; } } else{ // if query length is less than minimum echo ""; } ?> mata ona customer id ekai username or pass word gahuwama customer ge points data base eken search karala bala ganna ..kauru hari php waddek meka balanawada [/QUOTE]
Insert quotes…
Verification
Asuwa dahayen wadi kalama keeyada?
Post reply
Top
Bottom