Jump to content

hansolo

Members
  • Posts

    214
  • Joined

  • Last visited

Everything posted by hansolo

  1. sorry the above should be in the php forum
  2. im unsure but i think i have the id incorrect. If I want to select the username and the password by the id number. I seem to have this incorrect as the id number is also gone up in value for the password and name. should be the same number for all of the colomns and the 2nd username and password should have id of 2 and the 3rd username and password should have the value of 3 see screen shot for explantionhttp://fav.me/d5wdqo1
  3. to my understanding the asterisk gives all the rows in a datbase table. How do get 1 the st row $result = mysql_query("SELECT * FROM $table"); while($row = mysql_fetch_array($result)) {echo$row['1st_name '] . " " .$row['2nd_namel'];} thankyou
  4. using fire bug and the network tabyesis working the value is being sent. I didnt need to embed the file as localhost seem to already have completed that for me. I think as chose the swf on the page . The value is being sent as shows up on the network. I still need to create the error file though as i will be testing the main file which is more complicated than this file. As it need to update my sql and that were the error started as there was no update iin the database......I start by updating mysql from php rather than flash first. cheersshows link being posted and respondedhttp://fav.me/d5w1uhw
  5. How can i change the php.ini file to turn off the orange borders. I have seen its possible. I want to keep all errors on as i am a begginner .I would rather the orange border and grey border removed . I dont fin it easier to read my error. When he border is removed i can see my error better [xdebug]xdebug.remote_enable = offxdebug.profiler_enable = offxdebug.profiler_enable_trigger = offxdebug.profiler_output_name = cachegrind.out.%t.%pxdebug.profiler_output_dir = "c:/wamp/tmp"
  6. ok ive got the name sending in flash now the value was sent . I am going to try embed the file and try this network tab in fire bug. The trail andl and error trace process was not a good way .If can trace it in network tab that is best method. That does make sensei do have firebug installed. now. Open the browser's developer tools, there are links in my signature if you don't know how to use"Im not sure what a signature ....
  7. ive been using the output panel in flash. i set up some simple if statement in the php file . If the value was true or false returned and loaded the varaible . thiswas working successfully until the input text. I Ive never used an error log so i am confused
  8. 2nd wayHowever when i use the input text box this doesnt run the script above...... Will i be able to trace this in an error log. As i already can see not being sent. ok how do i verify what flash is sending to phpmy current method of what i ve been usngive been programming if staments i wether they return true or false. If the value sent is true the php file loads the varaible into flash . This has been working fine until the input text failed. The if statements have been simple to check whether the value is true or false. The posted varaible was called player name and sent the value of "a" im actualy confused as ive never used an error log. I am used to using the output panel in flash
  9. this value is traced in flash . It returrns the value in the output panel. If i type any name it retursin the output panel "newplayer = then the name typed", i set up the echo to trace te php file. Does fire bug trace all values incuding flash values as i use the output panel in flash btn1.onPress = function(){newPlayer = newPlayerBox.text;trace("flash newplayer="+ nameOfPlayer);}
  10. thats what the echo statement traced. thats why hard coded the value of a as the stement runs traced the name in the flash panel and its in gives thename the flash panel returns the name yes flash does have the name traced
  11. I dont know how to do that use error logging in PHP to create a debugging log. Were should i start with this. what are browser developer tools . I have to google this browser developer tools. Should i be using fire bug
  12. hansolo

    updating database

    ok ive located the ini file were mentioned to check for errors. I cant seem to locate were to make the changes as the ini error file. Does contain a large amount of text
  13. i post the value of "a" which is just to check the value is sent back. I want to send a name from th input text in flash. Input text in flashyou writing like a form in php . were a user can write there name. I am trying to send the name back and i am checking if the user has wrote the value of a. send_lv.newPlayer = "a";
  14. hansolo

    updating database

    hi trying to update the my sql database i am getting the following error unexpected t varaible i guess its refering the variable my name. as it mnetions it on this line <?phpmysql_connect("root","localhost","");mysql_select_db("name_db")$newname = "danny";$lastname = "smith";$insertName = "INSERT INTO tbl (first_name, last_name) VALUES('$newname','$lastname')";mysql_query($insertName);}?>
  15. ive made the code smaller to locate my error. Its the input text box flash traces the value. Like i have said if i write the exact name of the value to post to the php file. That works fine. When i use the inupt text box and type the value. Php doesnt seem to recieve the value.... // works send_lv.newPlayer = "a"; // input text box not working send_lv.newPlayer = newPlayerBox.text; actionscript//_____________________________________________________________________________________ var result_lv:LoadVars = new LoadVars(); result_lv.onLoad = function(ok){ if (ok) {trace(result_lv.working);} } btn1.onPress = function(){ newPlayer = newPlayerBox.text; trace("flash newplayer="+ nameOfPlayer); } send_lv = new LoadVars(); send_lv.newPlayer = newPlayerBox.text; send_lv.sendAndLoad("http://localhost/playerName.php",result_lv,"POST"); //_________________________________________________________________________________ <?php $name1 = "player name recieved"; $newPlayer = $_POST['newPlayer']; if($newPlayer == "a"){ echo"&working=".$name1;} ?>
  16. wonder if this is possibleok thanks if saved an id number in a varaible . I could possibly use this to search automatically . If user had an id and number and stored it in global varaible i could post this back to my sql and this could be used to make the search on the users information global posted varaible from flash $userid=[_postUserId] // this could send the id number from flash $UserId = $_POST["flashid"]; // in thoery icould use the global varabile to make a search based upon the store varaible with user idas an example SELECT FROM 'table', $UserId
  17. can i load a users information from my sql by there id number .is that possible. I am currnlty loading all the users . i like to seect on and information while(result = mysql_fetchArray(SELECT * FROM 'table')) i currenyly using the asterisk which select all i like to select o user and there information
  18. can i login as user in flash with a score from a database .
  19. The names are item of clothess in a database and that mean me e having to give the all the exact names as instances in flash....... I was placing the string data into an array and then nnaming the movieclips on stage by the instant names in the array ......My puzzle i have i wanting the user to have selection of clothes which is based upon points . So if user has say for example has 10 points ... then set clothes but when the user gains points thhey can select from an extra two items of clothes. The clothes names are loaded extenal soem how going to have to udate the datta base. Then tell flash that the user has two new clothes which will be instant names can change the instant names by actionscript(dynamic) rather than in the properties box that could solve part of the puzzle.
  20. ive loaded text as name value pairs and ive placed the names from the external file into an empty array in flash . I hae given the graphics known as movieclips in flash instant names. The same names as the array.I cant access Ive tried tom ake the movieclip transparent. By refering to the to the index of the array. The array seem to be seeing the values as text(string) not graphics(object) Can i make the name value pairs an object before i bring them into flash is this method used when working with strings.
  21. hi i have two textboxes on stag they have the instance name"subjectTxt". and returnTextBox.The subjectTxt is were th name is inputted. i am checking for the name "dan" in he php file. Just to see if my result from flash has been posted. Im not getting any results in returnTextBoxcheerssend_btn.onRelease = function() {my_vars = new LoadVars();//input text boxmy_vars.subject = subjectTxt.text;my_vars.sendAndLoad("http://localhost/file.php", my_vars, "POST");//trace th name subbmitedtrace(subjectTxt.text);}// return results from php filereturnTextBox.text = this.returnResposeFromPhp<?php$fromFlash = $_POST["subject"];if($fromFlash == "name"){echo "&returnResposeFromPhp=welldone";}?>
  22. I keep getting this error when creating a table in mysql in my admin....I can add the values now to the table MySQL returned an empty result set (i.e. zero rows). ( Query took 0.0004 sec see image attached
  23. i want echo the first row all columns . Then echo the second row and all the columns ect. What is the syntax to get the first row then all the columns of the first row ? I will the n repeat the process by echo out each row at a time and all the columns in the row My reason i belive this will help me organise the loaded variable in flash better . In theory $result = mysql_query("SELECT * FROM clothes_table") ;$result = mysql_query("SELECT * FROM clothes_table"); while ($row = mysql_fetch_array($result)) { // selecting in all the items in thein the database // selecting all the results echo$row['id'].$row['user'].$row['shirts'].$row['trousers']; echo "<br />";}
  24. i dont think its the php code which is the problem but the flash file is not sending the file. The issue before was such a minor issue and it was a simple ampersand in front when i was trying to load the vairaibles. The tutorial i have followed does not load the php file it cant be a good example. It doesnt ask to load the file which seems odd. well the code below at this link doesnt seem to load the file which is not correct .Ive put mmy path and file name and nothing loads http://forums.creativecow.net/thread/190/862189 result_lv.onLoad = function(success:Boolean) {// If the PHP returned a valueif (success) {//Output that value result_ta.text = result_lv.myVariable;} else {// Else, return an error. result_ta.text = "Error connecting to server.";}};// Create another loadVars object to store the variables that you// will be sending to PHP.var send_lv:LoadVars = new LoadVars();// Store the values from the textfields in here.send_lv.username = username_txt.text;send_lv.password = password_txt.text;// Send the variables to your php script using the POST method and// store the results in the result_lv loadVars object.send_lv.sendAndLoad("http://www.myweb.com/login.php", result_lv, "POST");
  25. <?php$myname ="I am loaded variable";echo "&myname" ."=" .$myname ;// post the varaible _____________________________________$secondName = "work";$whatTodo = $_POST['whatTodo'];if($whatTodo == "submit_name"){echo "&secondName"."=".$secondName;}ini_set('error_log', dirname(__FILE__) . DIRECTORY_SEPARATOR . 'error.log'); ?>
×
×
  • Create New...