Using Post tData?

JOHN PATTEN johnpatten at me.com
Sun Sep 22 23:42:13 EDT 2013


Hi All…

I would like to be able to pull data into a livecode project from an on-rev mysql database. It currently works in a  browser as a simple web app and is built all on in php. 

I thought I may be able to just use the post command, however when I try to post some data to a php url that executes a query on the database and then echoes back the results all I get in an "answer it" is the first header line, "Assigned Resources," and no array results. Here is the abbreviated php code:

mysql_connect;
$result = mysql_query("SELECT urladdress, urltitle FROM urllist WHERE docid = '$doccode'");

echo "<table border='1'>
<tr>
<th>Assigned Resources</th>
</tr>";

while($row = mysql_fetch_array($result))
  {
  echo "<tr>";

  echo "<td><. $row['urladdress'] . </td>";
  echo "</tr>";
  }
echo "</td></table>";

This works fine in the browser, but I was hoping to use all these php database connections in the web app within a stack and an iOS app. Any recommendations, or should I abandon ship, and go in a different direction to access the mysql data from within a lc stack?

Thanks in advance!

John Patten
SUSD



More information about the use-livecode mailing list