Sturm Posted May 27, 2007 Share Posted May 27, 2007 hello everybody.i have a couple of problems that need urgent solving.first of all- I AM A TOTAL NOOB at PHP! how can i make information from a submit button e.g. | 0123456789 | test1| 2007-99-99| |SUBMIT| get written in a table that is in my MySQL.Please write the code and where i have to replace stuff. Quote Link to comment https://forums.phpfreaks.com/topic/53164-problemplease-help/ Share on other sites More sharing options...
trq Posted May 27, 2007 Share Posted May 27, 2007 You question is pretty vague (You dont tell us any database structure), and were not really here to supply code, but to help with your code. You need to look at the mysql_query and its related functions. Failing that... search for some tutorials. There is a good one in my signiture that covers PHP basics. Quote Link to comment https://forums.phpfreaks.com/topic/53164-problemplease-help/#findComment-262643 Share on other sites More sharing options...
chronister Posted May 27, 2007 Share Posted May 27, 2007 As thorpe said, we're not here to write code for you. We are more than happy to help, as that is what this forum is for. You have to walk before you can run. Here is a sample snippet of code. I use this to insert 2 fields into a db <?php $testname=$_POST['testname']; // get field named testname $number_questions=$_POST['number_questions']; //get filed named number_questions connectdb(); // initiate a connection to the db $query="INSERT INTO tests (testname,questions)VALUES('$testname','$number_questions')"; //set up the query $result=mysql_query($query); //run the query ?> Take a look at the manual, and look over some tutorials. Start writing some code. If you run into problems, post in this forum and your sure to get help. Quote Link to comment https://forums.phpfreaks.com/topic/53164-problemplease-help/#findComment-262791 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.