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



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
.



Relevant Pages

  • RE: problem with DBD::Oracle
    ... Next, if it runs from the command line, then you most likely have a permissions issue with either the Perl script itself, or the Oracle.so library. ... Oracle database that is on a different machine. ... sender of the delivery error by replying to this message, or notify us by ...
    (perl.dbi.users)
  • Re: mysql connection failing as CGI
    ... some new hosting which comes with a MySQL database but I'm struggling ... to get it working with any perl scripts; the hosting support are being ... The problem basically is that when the script is run as a CGI script it ... the command line it runs fine. ...
    (comp.lang.perl.misc)
  • mysql connection failing as CGI
    ... some new hosting which comes with a MySQL database but I'm struggling ... to get it working with any perl scripts; the hosting support are being ... The problem basically is that when the script is run as a CGI script it ... the command line it runs fine. ...
    (comp.lang.perl.misc)
  • Re: Oracle database not starting up after reboot on RedHat ES4 Linux !
    ... I have Oracle database enterprise edition 9.2.0.4 running on RedHat ... I am using dbstart command via a /etc/init.d/oracle file. ... When working with shell scripts that are executed by cron or on system startup, it is often useful to run those scripts in a manner that does not have your environment included in the execution of that script. ...
    (comp.databases.oracle.server)
  • Re: Problems trying to configure Linux laptop to print to Windows XP shared printer
    ... map to guest = Never ... check password script = ... enumports command = ... ldap delete dn = No ...
    (comp.os.linux.setup)