I make two php pages one contain all the values of the row in some variables and the other page to call that variables like below.
function students_table($students_table_row)
{
$select_db = "select * from students where p_username ='".$students_table_row."'";
$student_address_query= mysql_query($select_db);
$students_db = mysql_fetch_assoc($student_address_query);
$student_id_db = $students_db['student_id'];
$student_pet_name_db = $students_db['student_pet_name'];
$student_name_db = $students_db['student_name'];
$p_gender_db = $students_db['p_gender'];
}
On the other page I want to insert the value for $students_table_row and than I want to read any variables like $student_id_db or $student_pet_name_db on that page. I am not getting I used functions to do it than also. The other page I am writing as
students_table("someuserid");
echo $student_pet_name_db;
can any one please tell me know to do this. Thanks.