473,386 Members | 1,973 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,386 software developers and data experts.

Existing file name

Hi

I am retrieving a fielname for a picture in PHP/MySQL and would like the
existing filename that is being retrieved from the database to be shown in a
file input. How do I do this please?

If I simply use a value statement nothing is shown even though I know the
variable holds the correct value.

The code I am using is
$picture1filename = $myrow[4] ;
echo " myrow[4] in form " . $myrow[4] . "<br>";
echo " picture1filename in form " . $picture1filename ;
echo ("<td colspan='2'><input name='picture1' type= 'file' size='80'
value= '$picture1filename'>");

The echos are just there to show that the correct value has been found.

Any help would be appreciated.
Many thanks
Derek

Jul 12 '06 #1
3 1236
Rik
Derek @ Blueyonder wrote:
Hi

I am retrieving a fielname for a picture in PHP/MySQL and would like
the existing filename that is being retrieved from the database to be
shown in a file input. How do I do this please?
It's a security issue, you can't set the value of the file input.
What would stop you to make it a hidden input and enter a name usually found
in an OS containing private information?

If it's a file that's on your server, just use a text-input, and act
accordingly after posting the form.

Grtz,
--
Rik Wasmus
Jul 12 '06 #2
>I am retrieving a fielname for a picture in PHP/MySQL and would like
the existing filename that is being retrieved from the database to be
shown in a file input. How do I do this please?

It's a security issue, you can't set the value of the file input.
What would stop you to make it a hidden input and enter a name usually
found
in an OS containing private information?

If it's a file that's on your server, just use a text-input, and act
accordingly after posting the form.

Grtz,
--
Rik Wasmus

Hi

Thank you for your reply.

I have done as you suggested and it works fine.

Many thanks
Derek
Jul 12 '06 #3
*** Derek @ Blueyonder escribió/wrote (Wed, 12 Jul 2006 09:32:49 GMT):
I am retrieving a fielname for a picture in PHP/MySQL and would like the
existing filename that is being retrieved from the database to be shown in a
file input. How do I do this please?
Most browsers won't allow that. There's a famous one that does but I cannot
recall which one (Konkeror maybe?).

--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--
Jul 12 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Mahesha | last post by:
Hello, I'm new to C++ and I have requirement to open a existing text file in write mode and write 2 new lines of text in the beginning of the file. I'm working with fstream standard library. If...
2
by: sm | last post by:
How to "Insert" (not append) new text segment to an existing text file? Assume that we have text file as shown below; Elvis Sofia Kylix BCB--> How to insert here? Atten BuilderX Roma
8
by: yinjennytam | last post by:
Hi all, I'm new to .NET and XML and I have a question. Given an XML file, I want to navigate its content and look for one or two particular elements to get their values. At this point, it...
2
by: Anne Sachleben via AccessMonster.com | last post by:
I am using the TransferSpreadsheet function to export a query result to a specific worksheet in an Excel file titled "report". I want the result to be exported to the worksheet titled "facts". ...
13
by: Dixie | last post by:
How do I, in VBA from an access form module, add 5 rows to the top of a spreadsheet called MySpreadsheet.xls. The worksheet is called MyWorksheet and there is already data in the first 5 rows. I...
8
by: phobos7 | last post by:
I am trying to create a single .EXE that will upgrade a product by the doing the following: 1) Detect the location of the current installation (DONE) 2) Upgrade the existing config file (DONE)...
2
by: KingoftheKings | last post by:
I'm new here. I want a help with VB codes that will import text or excel files from a specified directory in to an existing or new Access table. I have written some codes, but when I click the...
1
by: ofuuzo1 | last post by:
Hi, Is there anyway I can append a new element to an existing xml without first loading the existing file into a variable, adding the new element into the variable and saving it by overwriting the...
8
by: =?Utf-8?B?QnJ5YW4=?= | last post by:
Hello group. I have some code (given to me), but I don't know alot about ASP, so I was hoping someone here can help. Running on Win 2008 server. The code below will scan a folder and subfolder...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.