php - Why do I get "Null" in MySQL database? Flash pro cs6 -
i'm trying update flash film quiz records names , question answers - did not write original application. quiz works, except replaces name null when recording data. other records work fine. have deleted out res2 - res12
shorten up, work well.
thanks in advance lite can shed on this.
from name input page of quiz. participname
text field input:
stop(); btn1.addeventlistener(mouseevent.mouse_up,function():void { var name:string=participname.text.tostring(); gotoandplay(3); });
from lastly page of quiz
senddata(); function senddata(){ var messages:urlrequest = new urlrequest("./insertresult.php") messages.method = urlrequestmethod.post
var posts:urlvariables = new urlvariables() posts.name = name posts.datecurrent = dtformatted posts.res01 = res01 messages.data = posts trace(posts); var loader:urlloader = new urlloader() loader.dataformat = urlloaderdataformat.text // loader.addeventlistener(event.complete, dataonload) loader.load(messages) trace(messages);
from insertresult.php:
<?php //capture info $_post array $name = $_post['name']; $date = $_post['datecurrent']; $res1 = $_post['res01']; /* if(!$name ) { echo "no input using default values <br>"; $name = 'deleteme'; }*/ $connect = mysql_connect("mydatabase"); mysql_select_db ("palogindatabase", $connect); $result = mysql_query("insert rhymeoddity1 (name,date,res1) values ('$name','$date','$res1')"); if($result) echo "writing=ok&"; else echo "writing=error"; ?>
can check actionscript reading , setting name before posting data?
php flash flash-cs6
No comments:
Post a Comment