0
Engaged
,
/t5/dreamweaver-discussions/insert-update-file-path-difficulty/td-p/679607
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?
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
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
LEGEND
,
Jan 22, 2007
Jan 22, 2007
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 function...
> 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 function...
LEGEND
,
/t5/dreamweaver-discussions/insert-update-file-path-difficulty/m-p/679608#M145507
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/
> 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/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
RichardODreamweaver
AUTHOR
Engaged
,
/t5/dreamweaver-discussions/insert-update-file-path-difficulty/m-p/679609#M145508
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?
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?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/insert-update-file-path-difficulty/m-p/679610#M145509
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/
> 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/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
RichardODreamweaver
AUTHOR
Engaged
,
LATEST
/t5/dreamweaver-discussions/insert-update-file-path-difficulty/m-p/679611#M145510
Jan 22, 2007
Jan 22, 2007
Copy link to clipboard
Copied
Thanks David
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

