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
V2ray VPN for Tunneling
hu KANNA
Updated:
Oct 22, 2026
FREE SEO Check & Google Maps Check for Sri Lankan Businesses | Web Design, Website Price Rs 14,900 |
LankaSolve
Updated:
Oct 20, 2026
ඕනම රටකට සෙට් වෙන CV එකක්
ErMurazor
Updated:
Oct 17, 2026
Hambantota
7 Acres Beachfront Land For Sell DownSouth , PerPerch Price 420 000
1024 Digital
Updated:
Oct 14, 2026
Baseus PI LITE INDOOR CAMERA
ErMurazor
Updated:
Oct 12, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
PHP
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="Arkham Knight" data-source="post: 16674648" data-attributes="member: 500755"><p>PHP Site එහෙකට ගියාම ඒකේ තියෙනවා දැකලා තියෙනවා නේ </p><p><strong>index.php?id=2</strong> වගේ URLs ඔය කිව්වා වගේ නමුත් ඒකේ ID විතරක් නෙවෙයි ඕන නමක් තියෙන්න පුලුවන්. ඒක තියෙන්නේ pairs වශයෙන් (යුගල් වශයෙන්) එතකොට variable එකක් සහා ඒ variable එකේ value එකක් තියෙනවා. මේ යුගල් එකක් හෝ ගොඩක් තියෙන්න පුලුවන් එකක් තියෙනවා නම් </p><p><strong>index.php?id=2</strong> එච්චරයි නමුත් ගොඩක් තියෙනවා නම් මේ පහළ වගේ & එකෙන් යුගල් වෙන් කරන්න ඕනේ.<strong> index.php?id=2&name=knight</strong></p><p></p><p>මේ URL එකේ PHP extension එකේ ? එකට පස්සේ තියෙන කොටසට කියන්නේ HTTP Query String කියලයි ඒකෙන් කරන්නේ PHP page එකට values pass කරන එකයි ඊට පස්සේ PHP Page එකේ මේ values process කරලා අදාළ result එක user ට දෙනවා. මෙතන තියෙන්නේ පොඩි දෙයක් variable, values උබ Programming basic දන්නවා නම් Variable ගැන දන්නවා නැත්නම් පොඩ්ඩක් programming basic ඉගෙන ගන්න. </p><p></p><p>Page එකට pass කරන variable වල values ගන්නේ</p><p>$_GET["variableName"] මගින් </p><p></p><p>උදාහරණයකට හිතන්න මේ වගේ. </p><p>URL එකක් තියෙනවා කියලා.</p><p></p><p><strong>index.php?id=1&name=userOne</strong></p><p><strong></strong></p><p><strong></strong>එතකොට PHP page එකේ මේ ID, Name කියන variables වල values ගන්න ඕනේ නම්.</p><p></p><p>echo "User ID" . $_GET["<strong>id</strong>"] . "<br/>";</p><p>echo "User Name" . $_GET["<strong>name</strong>"] . "<br/>";</p><p></p><p>මේක IF Else එහෙකට දාලා Database එහෙකට connect කරා නම් ID එක දුන්න ගමන් User ගේ ඔක්කොම තොරතුරු පෙන්වන්නත් හදන්න පුලුවන්.</p></blockquote><p></p>
[QUOTE="Arkham Knight, post: 16674648, member: 500755"] PHP Site එහෙකට ගියාම ඒකේ තියෙනවා දැකලා තියෙනවා නේ [B]index.php?id=2[/B] වගේ URLs ඔය කිව්වා වගේ නමුත් ඒකේ ID විතරක් නෙවෙයි ඕන නමක් තියෙන්න පුලුවන්. ඒක තියෙන්නේ pairs වශයෙන් (යුගල් වශයෙන්) එතකොට variable එකක් සහා ඒ variable එකේ value එකක් තියෙනවා. මේ යුගල් එකක් හෝ ගොඩක් තියෙන්න පුලුවන් එකක් තියෙනවා නම් [B]index.php?id=2[/B] එච්චරයි නමුත් ගොඩක් තියෙනවා නම් මේ පහළ වගේ & එකෙන් යුගල් වෙන් කරන්න ඕනේ.[B] index.php?id=2&name=knight[/B] මේ URL එකේ PHP extension එකේ ? එකට පස්සේ තියෙන කොටසට කියන්නේ HTTP Query String කියලයි ඒකෙන් කරන්නේ PHP page එකට values pass කරන එකයි ඊට පස්සේ PHP Page එකේ මේ values process කරලා අදාළ result එක user ට දෙනවා. මෙතන තියෙන්නේ පොඩි දෙයක් variable, values උබ Programming basic දන්නවා නම් Variable ගැන දන්නවා නැත්නම් පොඩ්ඩක් programming basic ඉගෙන ගන්න. Page එකට pass කරන variable වල values ගන්නේ $_GET["variableName"] මගින් උදාහරණයකට හිතන්න මේ වගේ. URL එකක් තියෙනවා කියලා. [B]index.php?id=1&name=userOne [/B]එතකොට PHP page එකේ මේ ID, Name කියන variables වල values ගන්න ඕනේ නම්. echo "User ID" . $_GET["[B]id[/B]"] . "<br/>"; echo "User Name" . $_GET["[B]name[/B]"] . "<br/>"; මේක IF Else එහෙකට දාලා Database එහෙකට connect කරා නම් ID එක දුන්න ගමන් User ගේ ඔක්කොම තොරතුරු පෙන්වන්නත් හදන්න පුලුවන්. [/QUOTE]
Insert quotes…
Verification
Dawasata paya keeyak thibeda?
Post reply
Top
Bottom