Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Insert/Update File Path difficulty

Engaged ,
Jan 22, 2007 Jan 22, 2007

Copy link to clipboard

Copied

I am trying to Insert into a VARCHAR field a file path as text that I can then transform into a hyperlink. This is held on an intranet site and I need the complete physical path within the network (not just on the server). I do NOT want to upload the file to a server folder.

ie: \\Mainserver\intranet\Referencefiles\Quote.xls
or
\\SomeoneelsesPC\temp\test.doc

I have put in a file input section
<input name="FILEREF" type="file" id="FILEREF" size="70">

and set the input behaviour to include the value as text.
GetSQLValueString($HTTP_POST_VARS['FILEREF'], "text"));

When I go to update or insert, it does not appear to be entering any value. This is part of a bigger insert/update statement and everything alse seems to work fine but this part doesn't.

What am I doing wrong?
TOPICS
Server side applications

Views

286
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 22, 2007 Jan 22, 2007

Copy link to clipboard

Copied

RichardODreamweaver wrote:
> I have put in a file input section
> <input name="FILEREF" type="file" id="FILEREF" size="70">

Using type="file" uploads the file itself, not just the name of the
file. The name of the file will be in $_FILES['FILEREF']['name'], but
unless you actually want to upload the file, doing it this was is a
waste of time and resources.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 22, 2007 Jan 22, 2007

Copy link to clipboard

Copied

Thanks for this David

to be honest, I have been able to store the file path correctly but this requires each user to correctly understand the path and type it in (or copy from windows explorer address bar).

What I was hoping for was a "browse" button (similar to an upload format) - placing just the path as text in the field.

Is this possible to acheive without the upload function?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 22, 2007 Jan 22, 2007

Copy link to clipboard

Copied

RichardODreamweaver wrote:
> What I was hoping for was a "browse" button (similar to an upload format) but
> that only stores the path in the field.
>
> Is this possible to acheive without the upload function?

You can't do it with a browse button, but you can create a function to
query the file system and display a drop-down menu of available files. I
show how it's done in both "Foundation PHP for Dreamweaver 8" and "PHP
Solutions". If you want to roll your own, look up Filesystem functions
in the PHP online manual.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 22, 2007 Jan 22, 2007

Copy link to clipboard

Copied

LATEST
Thanks David

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines