Search the Community
Showing results for tags 'insert into'.
I'm inserting into my MYSQL database via a PHP page. For some reason it keeps losing the formatting and line breaks. What do I need to change to retain these? It's inserting into a MEDIUMTEXT field. Current Code: mysql_query("INSERT INTO projects (UserID, Title, Description, CreateDate) VALUES ('$userid', '$ProjectName', '$ProjectDescription', '$Date')"); This data is coming from the page before where the user enters the data in a <textarea> field from a html form.
This following will allow you to upload a .csv file via a web form then insert that data into a MYSQL database. I had a request for it this morning and so now that I have it created I figured I would share. Let me know if you see anything that would be an improvement. Step 1 - Create Web Form <form enctype="multipart/form-data" action="uploader.php" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="100000" /> Choose a file to upload: <input name="uploadedfile" type="file" /><br /> <input type="submit" value="Upload File" /> </form>