emma2288 Posted January 18, 2011 Share Posted January 18, 2011 Hi everyone.. I am extrememly new to all things related to PHP.. to be honest I dont know anything about it! One of my projects at uni though it to create an online game with a leader board. So far I have created my game (which includes scores in a dynamic text field) and I have used phpMyAdmin to create a table/database. What I would like to know is how to I make it so the scores from my flash game go into this table? I have spent about 8 hours today viewing tutorials online but most of them are aimed at people who know a little about php so I dont have a clue whats going on! so far I have created this small form that can be filled in online html> <head><title>Form</title> </head> <body> <form action="inputdata.php" method="post" > <p> What's your first name? <input type="text" name="myname"> </p> <p> What's your last name? <input name="mycity" type="text" id="mycity"> </p> <p> <input type="submit" name="Submit" value="Submit"> </p> </form> </body> </html> this links to this: <?php include('connect.php'); $myname = $_POST["myname"]; $mycity = $_POST["mycity"]; if (!@mysql_select_db($dbName)) { print ("Could not select database..."); exit; } if (($myname != "")&&($mycity != "")) { $query = "INSERT INTO test3 (score,firstname,lastname) VALUES ('0','$myname', '$mycity')"; $result = @mysql_query($query); if (!$result) { print ("Could not insert data \n"); } else { print ("Data added sucessfully \n"); } }else{ print ("Please fill in both fields and <a href='form.html'>try again</a>."); } mysql_close(); ?> So now how to I get this into my flash game? The name of my table is 'test 3' if that helps? I'm sorry but I dont know anything about this stuff so it will have to be explained in detail Any help appreciated Emma (stressed) Quote Link to comment https://forums.phpfreaks.com/topic/224879-connect-table-in-phpmyadmin-with-flash/ Share on other sites More sharing options...
Maq Posted January 18, 2011 Share Posted January 18, 2011 I added tags for you this time, please use them next time. Quote Link to comment https://forums.phpfreaks.com/topic/224879-connect-table-in-phpmyadmin-with-flash/#findComment-1161535 Share on other sites More sharing options...
jdavidbakr Posted January 19, 2011 Share Posted January 19, 2011 Probably the best way is to use XML in your Flash app, and have it call a PHP page that returns the info you need. Then you just process the info in your flash app however you need to. I've done this once or twice but am not fluent enough it how to do it to give you any pointers. Quote Link to comment https://forums.phpfreaks.com/topic/224879-connect-table-in-phpmyadmin-with-flash/#findComment-1162071 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.