با سلام
این خط ها هستن:
این خط ها هستن:
کد:
page1:
<form name="form1" action="test2.php" method="post">
<input type="text" name="username">
<input type="submit" name="submit" value="submit">
page2:
<?php
$username = $_POST["username"];
include 'db.php';
$query = "SELECT * FROM user where username='$username'";
$result = mysql_query($query) or die('no connect to db');
$row=mysql_fetch_assoc($result);
?>
<input type="text" name="username" size="20" value="<?php echo $row['username']; ?>" ><br>
<input type="text" name="phone" size="20" value="<?php echo $row['phone']; ?>" >