473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

how to upload a file location from a php form to a varchar table in mysql

3
I am trying to load an image file location to a mysql table via php
I can type the location into the form but wish to browse for the file then submit into the varchar table.
Apr 16 '10 #1
4 1567
dlite922
1,584 Expert 1GB
If you have the mysql module loaded with PHP, then you can use the mysql functions to connect and update a table.


Dan
Apr 16 '10 #2
mcare
3
@dlite922
Thanks Dan
I am using a cms type of interface to allow administrators to run an events calendar which works well with the exception of loading an image location with the event info..hence the need to browse for the file first.
Kind Regards
Melvyn
Apr 16 '10 #3
Atli
5,058 Expert 4TB
Hey.

One thing I'm not clear on. Where exactly is the file you want inserted into the table, and what exactly do you want to be placed in the table?

I mean:
  • Is the file on your PC, and you want it uploaded to the server and the location saved in the database. (Most commonly done.)
  • Is the file already on the server, and you just need to put the location into the database?
  • Is it on another website, and you need the URL place inside the database?
  • Is it on your PC, and you need it uploaded into the database?
  • Something else entirely?
Apr 16 '10 #4
mcare
3
@Atli
Thanks for your reply
the image is on the server and i want to be able to browse the images and send the url to the database . if i use an html form to browse for the image i then dont seem able to upload to the database. I am sure i am mnissing something here.
Apr 16 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Pugi! | last post by:
Hi, I would like to upload office-document (doc, xls, ...) using a form to a website (apache, php, mysql) in a specific directory and if possible insert it into a table (MySQL-db). Is this...
3
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
1
by: John Thompson | last post by:
We're sooo close. When we load the page to upload the image, all of the prms go through except the binary image data. Using SQL server with the data type set to "image". Please help! Thanks-...
0
by: SEMIH DEMIR | last post by:
Sitelerden birinde verilen yabancı kaynakli bir scriptti duzenledim yanlız birseyin içinden bir turlu cıkamadım işin aslı ilk defa persistin upload componentini kullanacam yanlız suanki haliyle...
9
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web...
6
by: fpcreator2000 | last post by:
Hello everyone. I'm having problems with a page I've created that is used to insert data into a database. It uploads two files into two distinct folder, and it takes the filenames and inserts...
2
by: hotflash | last post by:
Hi All, I found the best pure ASP code to upload a file to either server and/or MS Access Database. It works fine for me however, there is one thing that I don't like and have tried to fix but...
8
johngault
by: johngault | last post by:
I've been working with this PHP page for several days now and I'm stumped. The page is supposed to allow the user to upload up to six images for their profile. When the user adds an image it (the...
1
by: ririe | last post by:
Hi. I have a problem here. I want to upload a file together with its semester. So I create two field. One for the semester and one for the file to be uploaded. But the script doesn't work. I don't...
1
by: chennaibala | last post by:
can any one send me mutiple image upload program and save the file name with extension in mysql table.we must cheak uploaded file type like bmp or any image file while uploading. i develop...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.