Re: flash/php problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On second thoughts you probably better off with load variables.

Flash:
var info:String = "YoMama";
var id:Number = 12;
loadVariables("http://myserver.com/my_db_update_page.php?id="+id+"&info="+info+"";,
this);

PHP [my_db_update_page.php]:
<?php
include_once('db_connection_script.php');

if ($_GET['info'] && $_GET['id']){
$id = addslashes($_GET['id']);
$info = addslashes($_GET['info']);
$sql = "update table_name set info='$info' where id='$id'";
mysql_query($sql);
if (!mysql_errno()) {
  print 'result="good"';
  exit;
}
}
print 'result="bad"';
?>

The function for checking the result is in the flash manual:
Actionscript Language Reference >> loadVariables()

Tony

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux