PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
// Only run this script if the sendRequest is from our flash application
if ($_POST['sendRequest'] == "parse") {
// Access the value of the dynamic text field variable sent from flash
$uname = $_POST['uname'];
//*** hidden for security but connection has been established successfully
$link = mysql_connect("***","***","***") or die ("Could not connect to mysql because ".mysql_error());;
mysql_select_db("****");
$results = mysql_query("SELECT price FROM partno WHERE partnum = '$uname'");
$row = mysql_fetch_assoc($results);
// Print two vars back to flash, you can also use "echo" in place of print
print "var1=The name field with a variable of $uname has been sent to PHP and is back.";
print "&var2=$row";
}
I am using this template as a guide for communicating flash <> php
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.