mATOK Posted August 14, 2006 Share Posted August 14, 2006 Hello out there!I have a DB that I am going to be populationg via a form that I am going to create in html/php.I have 4 fields in my DB that are of type mediumtxt. When I use MySQL consol manager i am prompted to save and name my txt files and then to apply so that the record is loaded from the file.How do I go about doing this via a form? I have a naming convention so I'm hoping that I can submit some mysql command...please help ??? Quote Link to comment Share on other sites More sharing options...
mATOK Posted August 14, 2006 Author Share Posted August 14, 2006 **BUMP**pleasr help ??? Quote Link to comment Share on other sites More sharing options...
mATOK Posted August 15, 2006 Author Share Posted August 15, 2006 **BUMP** Quote Link to comment Share on other sites More sharing options...
AndyB Posted August 15, 2006 Share Posted August 15, 2006 Look at any of the tutorials here that use databases. Typically you need two parts - a form to gather informnation; a form processing part to receive it and stick it in the database.form method=post action=form_processor_script.phpfields for each item/form[code]processor scriptretrieve POSTed variables from the $_POST arraycheck inputs as valid (strip_tags(), addslashes(), trim() whatever)make database connectioncreate MySQL INSERT query$query = "INSERT into your_tablename (fields) VALUES (values)execute query$result = mysql_query($query);[/code]Give something based on the tutorials a try. If it isn't working post again and show us your code explaining the problems. Quote Link to comment Share on other sites More sharing options...
mATOK Posted August 15, 2006 Author Share Posted August 15, 2006 Thanx AndyB,I have created forms and updated tables no problem, my concern here comes from using the medium txt data type and how to name the files I am creating / apply the link to the db.Would it be best for me to simply create a txt file using php and then store a link to said file in the db?I will look through the tutorials again to see if there is something there that deals with mediumtext. Quote Link to comment 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.