TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Abdurrahman Yaşar
NA
6
761
taking information from database and display on textbox
May 7 2016 7:29 PM
I am trying to fix it for 2 hours,but cannot see the informations on textbox. Can you tell me what is wrong ?
<?php
$con = mysqli_connect("localhost","root","root");
if (!$con)
{
die('Could not connect: ' . mysqli_error());
}
mysqli_select_db("banka", $con);
$con = mysqli_connect("localhost","root","root");
if (!$con)
{
die('Could not connect: ' . mysqli_error());
}
mysqli_select_db("banka", $con);
$result = mysqli_query( "SELECT * FROM customer WHERE cusid='$_POST[name]'" );
while( $rowval= mysqli_fetch_array( $result ) ){
$cusid= $rowval['cusid'];
$cusname= $rowval['cusname'];
$cussurname= $rowval['cussurname'];
$cususername= $rowval['cususername'];
$cuspassword= $rowval['cuspassword'];
$adress= $rowval['adress'];
$tel= $rowval['tel'];
$trmoney= $rowval['trmoney'];
$dolarmoney= $rowval['dolarmoney'];
}
mysqli_close($con);
?>
<html>
<center><body style = "background-color:yellow;">
<div>
<form action="admin.php" method="post">
<table style="color:purple;border-style:groove; height:150px;width:350px" background="backimage.jpg">
<tr>
<td style=" height:25px; font-family:'Copperplate Gothic Bold'"> </td>
</tr>
<tr>
<td style="color:red;background-color:aqua;height:25px">Enter Account no
<input name="name" id="name" type="text"/></td>
</tr>
<tr>
<td style="height:25px">
<input type="submit" value="Submit" style="color:white;background-color:brown; height:30px" /></td>
</tr>
</table>
</form>
</div>
<div>
<form >
<table style="color:purple;border-style:groove; height:150px;width:350px">
<tr>
<td style="font-family:Copperplate Gothic Bold"> </td>
</tr>
<tr>
<td style="color:red;background-color:aqua;" class="auto-style3">Id:</td>
<td class="auto-style4">
<input id="Text1" name="cusid" type="text" value='<?php echo $cusid; ?>'/></td>
</tr>
<tr>
<td style="color:red;background-color:aqua;" class="auto-style3">Name</td>
<td class="auto-style4">
<input id="Text2" name="cusname" type="text" value='<?php echo $cusname; ?>'/></td>
</tr>
<tr>
<td style="color:red;background-color:aqua;" class="auto-style3">Surname:</td>
<td class="auto-style4">
<input id="Text3" name="cussurname"type="text" value='<?php echo $cussurname; ?>' /></td>
</tr>
<tr>
<td style="color:red;background-color:aqua;" class="auto-style3">Username:</td>
<td class="auto-style4">
<input id="Text4" type="text" value='<?php echo $cususername; ?>' /></td>
</tr>
<tr>
<td style="color:red;background-color:aqua;" class="auto-style3">Password:</td>
<td class="auto-style4">
<input id="Text5" type="text" value='<?php echo $cuspassword; ?>' /></td>
</tr>
<tr>
<td style="color:red;background-color:aqua;" class="auto-style3">Address:</td>
<td class="auto-style4">
<input id="Text6" type="text" value='<?php echo $adress; ?>' ></td>
</tr>
<tr>
<td style="color:red;background-color:aqua;" class="auto-style3">Telephone:</td>
<td class="auto-style4">
<input id="Text7" type="text" value='<?php echo $tel; ?>'/></td>
</tr>
<tr>
<td style="color:red;background-color:aqua;" class="auto-style3">TL amount:</td>
<td class="auto-style4">
<input id="Text8" type="text" value='<?php echo $trmoney; ?>' /></td>
</tr>
<tr>
<td style="color:red;background-color:aqua;" class="auto-style3">Dolar amount:</td>
<td class="auto-style4">
<input id="Text8" type="text" value='<?php echo $dolarmoney; ?>' /></td>
</tr>
<tr>
<td style="height:25px">
<input type="submit" value="Submit" style="color:white;background-color:brown; height:30px" /></td>
</tr>
</form>
</div><center>
</body>
</html>
Reply
Answers (
1
)
How to get values from multiselected check list values?
how to populate data from mysql into dropdown using php