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
Video Content Creator
pramukag
Updated:
Yesterday at 6:10 AM
Ad icon
QA Engineer Intern
pramukag
Updated:
Yesterday at 6:07 AM
Ad icon
Sell your Land, House on idamata.lk for FREE
sajith.xp.pk
Updated:
Thursday at 9:03 AM
Handmade Character Soft Toys
anil1961
Updated:
Tuesday at 2:11 PM
Bodim.lk out now !
Manoj Suranga Bandara
Updated:
Jun 21, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
Mysql database eke Data form ekak Textbox wala display karana widiya(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="praveendpa" data-source="post: 17822369" data-attributes="member: 16142"><p>yanthan hadagaththa</p><p></p><p>test7.php</p><p></p><p></p><p></p><p></p><p><?php</p><p>// Start the session</p><p>session_start();</p><p>?></p><p></p><p><form method="post" action=""></p><p>First Name:</p><p><input type="text" value="<?php echo $_SESSION["first_name"]; ?>"><br></p><p>Last Name:</p><p><input type="text" value="<?php echo $_SESSION["last_name"]; ?>"><br></p><p>Tel No:</p><p><input type="text" value="<?php echo $_SESSION["tel"]; ?>"><br></p><p>Marks:</p><p><input type="text" value="<?php echo $_SESSION["marks"]; ?>"><br></p><p>Grade :</p><p><input type="text" value="<?php echo $_SESSION["grade"]; ?>"><br></p><p></form></p><p></p><p><?php</p><p></p><p>$db=new mysqli('localhost','root','','test2');</p><p></p><p>$nm = "";</p><p>if ($_SERVER["REQUEST_METHOD"] == "POST") </p><p></p><p>{</p><p> $nm = htmlspecialchars(trim(stripslashes($_POST["first_name"])));</p><p></p><p> if($result=$db->query("SELECT * FROM people m INNER JOIN marks n </p><p> ON (m.first_name = n.first_name) WHERE m.first_name='$nm'"))</p><p></p><p>{</p><p>if($count=$result->num_rows)</p><p>{</p><p>//echo '<p>',$count, '</p>';</p><p></p><p>echo "Student Details",'<br>';</p><p></p><p>while($row = $result->fetch_object())</p><p>{</p><p></p><p></p><p>$_SESSION["first_name"] = $row->first_name;</p><p>//$lnm = $row->last_name;</p><p></p><p></p><p></p><p>$_SESSION["last_name"] = $row->last_name;</p><p></p><p>$_SESSION["tel"] = $row->tel;</p><p>$_SESSION["marks"] = $row->marks;</p><p>$_SESSION["grade"] = $row->grade;</p><p></p><p></p><p></p><p>}</p><p>}</p><p>} </p><p></p><p>include ("form3.php");</p><p></p><p></p><p>}</p><p>else</p><p>{</p><p>include ("form5.php");</p><p>echo "please Enter Your Name";</p><p>}</p><p></p><p></p><p></p><p></p><p>//$nm="roshan";</p><p></p><p></p><p></p><p>?></p><p></p><p>form7.php</p><p></p><p><?php</p><p>// Start the session</p><p>session_start();</p><p>?></p><p><form action="test7.php" method="POST"></p><p>Name: <input type="text" name="first_name"><br></p><p><input type="submit" value="Search"></p><p></form></p><p></p><p><?php</p><p>function test_input($data) {</p><p> $data = trim($data);</p><p> $data = stripslashes($data);</p><p> $data = htmlspecialchars($data);</p><p> return $data;</p><p>}</p><p>?></p></blockquote><p></p>
[QUOTE="praveendpa, post: 17822369, member: 16142"] yanthan hadagaththa test7.php <?php // Start the session session_start(); ?> <form method="post" action=""> First Name: <input type="text" value="<?php echo $_SESSION["first_name"]; ?>"><br> Last Name: <input type="text" value="<?php echo $_SESSION["last_name"]; ?>"><br> Tel No: <input type="text" value="<?php echo $_SESSION["tel"]; ?>"><br> Marks: <input type="text" value="<?php echo $_SESSION["marks"]; ?>"><br> Grade : <input type="text" value="<?php echo $_SESSION["grade"]; ?>"><br> </form> <?php $db=new mysqli('localhost','root','','test2'); $nm = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { $nm = htmlspecialchars(trim(stripslashes($_POST["first_name"]))); if($result=$db->query("SELECT * FROM people m INNER JOIN marks n ON (m.first_name = n.first_name) WHERE m.first_name='$nm'")) { if($count=$result->num_rows) { //echo '<p>',$count, '</p>'; echo "Student Details",'<br>'; while($row = $result->fetch_object()) { $_SESSION["first_name"] = $row->first_name; //$lnm = $row->last_name; $_SESSION["last_name"] = $row->last_name; $_SESSION["tel"] = $row->tel; $_SESSION["marks"] = $row->marks; $_SESSION["grade"] = $row->grade; } } } include ("form3.php"); } else { include ("form5.php"); echo "please Enter Your Name"; } //$nm="roshan"; ?> form7.php <?php // Start the session session_start(); ?> <form action="test7.php" method="POST"> Name: <input type="text" name="first_name"><br> <input type="submit" value="Search"> </form> <?php function test_input($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; } ?> [/QUOTE]
Insert quotes…
Verification
Dawasata paya keeyak thibeda?
Post reply
Top
Bottom