What is the best way to send a variable to a remote php file and receive the rest of the data in the MySQL row in seperate variables (Only one variable will be sent). I already have the variable to send saved as 'name' This is my PHP
<?php
// Make a MySQL Connection
mysql_connect("mysql8.000webhost.com", "a6811170_NTUDB", "?????") or die(mysql_error());
// Select the database
mysql_select_db("a6811170_NTUDB") or die(mysql_error());
//Get Name
$name=name; //Whatever is sent
// Get data from the table
$result = mysql_query("SELECT * FROM SocietyDatabase WHERE Name=$name") or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
print(json_encode($row['Name']));
print(json_encode($row['President']));
print(json_encode($row['Description']));
}
?>