두 개의 다른 서버에서 정보를 가져 오는 것과 관련된 프로젝트를 진행하고 있습니다. 내가 뭘 계획은 사용자가 자신의 사용자 이름 비밀 번호를 입력하는 데 다음 PHP 이름을 성 등 아래 필드의 나머지 부분에 기입 스크립트를 가지고 내가 몇 가지 검색을 수행하고 내가 가진 데이터의 일부가 발견 서버 내의 2 개의 다른 테이블. 아래는 내가 지금까지 가지고있는 코딩이다. 두 개의 테이블이 공통 요인에 따라 두 개의 테이블을 조인 왼쪽 수있는 동일한 데이터베이스에있는 경우두 개의 다른 MySQL 테이블에서 데이터 가져 오기
<?php
$connect = mysql_connect("localhost","**************","**********") or die ("Couldn't Connect"); //host,username,password
mysql_select_db("*******") or die ("Could not find database");
$query = mysql_query("SELECT * FROM jos_users WHERE username='$username'");
?>
<html>
<form action="populate.php" method='post'>
<table>
<tr>
<td>VAE Username:</td>
<td><input type='text' name='username' value=''></td>
</tr>
<tr>
<td>VAE Password:</td>
<td><input type='password' name='password' value=''></td>
</tr>
</table>
<p><input type='submit' name='submit' value='Search & Populate!'></p>
</form>
//below is the information i want filled in from the MYSQL tables
<hr>
$query = mysql_query("SELECT * FROM jos_users WHERE username='$username'");
<form action="dafreg.php" method='post'>
<table>
<tr>
<td>Fristname:</td>
<td><input type='text' name='firstname' value='<?php echo $firstname; ?>'></td>
</tr>
<tr><td>Lastname:</td>
<td><input type='text' name='lastname' value='<?php echo $lastname; ?>'></td>
</tr>
<tr>
<td>Login:</td>
<td><input type='text' name='login' value='<?php echo $username; ?>'></td>
</tr>
<tr><td>Password:</td>
<td><input type='text' name='pass' value=''></td>
</tr>
<tr><td>Country:</td>
<td><input type='text' name='country' value=''></td>
</tr>
<tr><td>Pilot:</td>
<td><input type='checkbox' name='pilot' value=''></td>
</tr>
<tr><td>ATC:</td>
<td><input type='checkbox' name='atc' value=''></td>
</tr>
<tr><td>Email:</td>
<td><input type='text' name='email' value=''></td>
</tr>
</table>
<p><input type='submit' name='submit' value='Register'></p>
</form>
</form>
</html>
당신은별로 의미가 없습니다. 두 개의 서로 다른 서버, 데이터베이스 또는 테이블에 있습니까? – FMCorz
불필요한 html을 제거하고 문제와 관련된 부분 만 게시 할 수 있다면 도움이 될 것입니다. – masnun