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

How do I Edit a list of files associated with a product ?

Hello,
-I wrote a script that you use it to add products in the database.
-Each product is associated with files.
-In the Form to add the product you have to enter the product name in a
textfield and below there are $no_of_add_file filefields.
$no_of_add_file is an integer that determines the Maximum number of
filefields that you want to associate/add for each product.

So it succesfully adds the product and the files in a database and the
filesystem.

The problem I am trying to solve is how am I going to edit those files in
the product.
If you know what I mean... and you have done something like that or you know
a url or script that does that, pls let me know.
What I need mostly, is not the PHP code but the logic and what are the
possible ways of doing something like that.

In the database i have two tables that this script needs:
One is the products and the other the files.

Products : product_id, product_name
Files : file_id, file_name, product_id

I hope that helps.
Jul 27 '05 #1
1 1368
Angelos wrote:
Hello,
-I wrote a script that you use it to add products in the database.
-Each product is associated with files.
-In the Form to add the product you have to enter the product name in a
textfield and below there are $no_of_add_file filefields.
$no_of_add_file is an integer that determines the Maximum number of
filefields that you want to associate/add for each product.

So it succesfully adds the product and the files in a database and the
filesystem.

The problem I am trying to solve is how am I going to edit those files in
the product.
If you know what I mean... and you have done something like that or you know
a url or script that does that, pls let me know.
What I need mostly, is not the PHP code but the logic and what are the
possible ways of doing something like that.

In the database i have two tables that this script needs:
One is the products and the other the files.

Products : product_id, product_name
Files : file_id, file_name, product_id

I hope that helps.

Angelos,
Just build an edit command with the selected file name and
execute it. Haven't tried it, but something along the lines of:

exec ( "vi" $filename )

This example would assume you are using the vi editor and that
you have stored the full path and name of the file to bne edited
in $filename.

Oh, you better check out the syntax for the exec command since
it has additional parameters. Also check out the system and
back tick commands.

HTH
Jerry
Jul 27 '05 #2

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

Similar topics

8
by: tom | last post by:
I am new to SQL administration. >From a list of IDs that are the primary key in one table (i.e. Customer Table), I want to make changes in tables that use those IDs as a foreign key. ...
6
by: F-13 | last post by:
I'm working on a BOM in Access 200 from an example downloaded from from the web. The sample database contains three tables, Assemblies (the list of items needed to assemble any assembly),...
4
by: aaj | last post by:
Hi all I have a group of files that I store independently in a temporary folder on the c: drive. Typical things are ini files, bitmaps, icons etc. All access to the files is hardcoded within my...
2
by: Cy Huckaba | last post by:
I am writing a program that will search xml files for some of our dev team here and list the files in a list box. I would like to be able to double-click on the file name and have the file open...
2
by: Sin | last post by:
Hello everyone, I'm totally stumped at how little info I can find in MSDN or on the web concerning this. It's almost as if only microsoft personel hold the key to these secrets or something!!! ...
0
by: dbuchanan | last post by:
Hello, The actions pane locks up after selecting a listbox. I have tried all kinds of things and have narrowed it down to this. If I click in the listbox the action pane locks up. Neither a...
7
by: pbd22 | last post by:
Hi. Can somebody tell me how I would go about allowing the user to click on a link to put content in text box A and then another link to put different content in text box A and so on. Finally,...
1
by: ollielaroo | last post by:
Hi guys, Firstly I did do a search for this one first but I couldn't find anything related in this forum. I am using Dreamweaver MX and trying to build admin pages for an ASP site. My problem is...
8
by: dmp | last post by:
What are Linked list? Please somebody show some ready made programs of linked list
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:
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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.