PDA

View Full Version : writing to mysql



slickeye
October 24th, 2004, 12:48 AM
ok i understand how to display msql data in flash using php and xml

what i dont get is how to write to mysql.

i just want an html form to write to it. i understand no one can just tell me how to do this, but will someone please point me to somewhere that will tell me how to do something similar???

thanks in advance

Yeldarb
October 24th, 2004, 01:10 AM
$query = "INSERT INTO files VALUES ($column1, $column2)";
mysql_query($query);

That will put $column1 and $column2 into the first and second columns of your database in a new row.

To get the data to them, you need input fields with the name of column1 and column2 and then you submit them to the page with this code in it. (After connecting to your db of course.

slickeye
October 25th, 2004, 01:00 AM
haha thanks man. but see that is so far over my head. i dont want just someone to tell me unless they want to. i dont know anything about mysql or writing to it. i can make a form in htm no problem. after that, i have no idea.

any tuts or tips you can point me too??

CyanBlue
October 25th, 2004, 12:12 PM
There is no easy way but to get your hands dirty and fiddle with it... :)

Here are some...
http://www.freewebmasterhelp.com/tutorials/phpmysql/1
http://www.createafreewebsite.net/phpmysql/phpmysql_introduction.html
http://webmonkey.wired.com/webmonkey/99/21/index2a_page5.html?tw=programming

and there are whole lot more if you google around... But make sure you get the PHP manual and MySQL manual handy... They have great information in them... :)