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 ??? Link to comment https://forums.phpfreaks.com/topic/17538-creating-and-editing-mediumtxt-via-php/ Share on other sites More sharing options...
mATOK Posted August 14, 2006 Author Share Posted August 14, 2006 **BUMP**pleasr help ??? Link to comment https://forums.phpfreaks.com/topic/17538-creating-and-editing-mediumtxt-via-php/#findComment-74721 Share on other sites More sharing options...
mATOK Posted August 15, 2006 Author Share Posted August 15, 2006 **BUMP** Link to comment https://forums.phpfreaks.com/topic/17538-creating-and-editing-mediumtxt-via-php/#findComment-75066 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. Link to comment https://forums.phpfreaks.com/topic/17538-creating-and-editing-mediumtxt-via-php/#findComment-75073 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. Link to comment https://forums.phpfreaks.com/topic/17538-creating-and-editing-mediumtxt-via-php/#findComment-75080 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.