I apologize for not knowing how else to do this. I went to add to my other question, and I could not figure out how to append this to it.
I am trying to apply your answer to the previous question in another place.
In this instance I have a bit more going on but thought I could do the same thing as above -with the adjustment of changing id for user_name, since the ids would not match table to table, but the user_name does. I know I am biting off a lot for my first project but I really like this coding stuff. Hope I am not pulling on too many shirt tails. Thanks for your help.
Heres the code. Its placing the same user_name in every row(like the previous question was)
<?php
$Var1 =$_POST['Var1'];
require("connection.php");
mysql_query("UPDATE table1 SET actor = '$Var1'");
$result = mysql_query("SELECT * FROM table2 WHERE subject ='$Var1'");
while($row = mysql_fetch_array($result))
{ $un = $row['user_name'];
$a =$row['subject'];
$a_val = $row['subject_val'];
$sql=mysql_query("UPDATE table3 SET user_name='$un', subject='$', subject_val= $a_val WHERE user_name=".$row['user_name']);
}
mysql_close($connection);
?>