Re: flash/php problem

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

 



how can i update my DB through Flash, using PHP.

The easy way...

Flash:
var info:String = "YoMama";
var id:Number = 12;
getURL("http://myserver.com/my_db_update_page.php";, "_self", "GET");

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);
}
?>

This won't tell you if there has been an error during the update. If you need
confirmation use AMFPHP.

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