Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





How Do I Edit A List Of Files Associated With A Product ?


-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




View Complete Forum Thread with Replies

Related Forum Messages:
Make The User Able To Edit The Quantity Of Each Product.
I am working on a shopping cart right now and I am trying to make the user able to edit the quantity of each product.

Currently, I have a table that shows the product name, price, quantity (which is in an input textfield) and final price (which is the quantity X price).

I was curious how I can make it so I can have them enter a new number in the quantity field and it will automatically update the final price.

View Replies !
PRODUCT LIST FORM
I have a form that loops out a list of products from a mySQL database. beside each product is 2 checkboxes. one is for deleting and another is for selecting a product to go into a storefront.

on the second page I have a implode() to seperate each product with commas. then it puts the list into a query and deletes them one by one.

my problem is the only way to use a implode is to use $_POST by itself without the element ($_POST['var'])

what if the user checks some boxes to put into the storefront and checks some boxes to delete. how can i filter the two so i wont get them mixed up and end up deleting something that probably was suppose to be stored in the storefron.

View Replies !
Creating A Product List Page!!!!
I was able to retrieve information from the database but I get an error message that says "Notice: Undefined variable: SubCatID "  and I can`t get my list to display right. I wanted my SmallIMG to be on the right and my and my ProductName to appear right beside it along with the UnitPrice.

Kinda like straight across because I want it to be a link to the individual product page. If I can get help on this part, I can get started on my shopping cart. Code:

View Replies !
Displaying A List Of Products And Link To A Product Page
I have site with products... I've been able to create a product template page that queries the product image, description, price etc...

But now I want to create an index page that a) queries the db for all the products in there and b) when they click the product link, it gets taken to the product page...

I'm just wondering how that linking relationship can be established?

For example, I know that the page name will be something like product.php?=id=223 or something like that but I don't know how to create that.

View Replies !
Generating Product Pages From Flat Files.
i need to write some php that will take a list of files and folders and generate a catalog product page based on the folder/file heirachy and have a maximum of 4 products per page but my php coding skills are extremely newbie-ish and i have no idea how or where to start on this..

i have used include() and requires() before but can anybody point me in the direction of a tutorial or script i can modify for this purpose?

View Replies !
Select List - Edit Form
For a couple of days I have been trying to make an edit form that remembers the initial values a user entered. The edit.php page has a few textboxes and a few dropdown/select boxes. The textbox part works fine and comes from a database. Code:

View Replies !
How Does Myadmin List Field Names To Edit?
I'm trying to setup an edit page so that the user can edit any data he entered earlier.
Say he entered all his stuff in and found a mistake and he wanted to go in and make a change. Simple UPDATE command. Code:

View Replies !
Dropdown List Which Selects A Post A Title (to Edit)
I want to have a dropdown list which selects a post a title (to edit), then when you click submit I want to use POST to submit the data for that post (post title, username, subject, content) so that the edit pages form fields will already be filled with the posts data.

View Replies !
Is .txt The Only Way To Edit Files?
When it has extension .php on my computer and I open it it goes to an apache prompt where I cannot type anything else in. When I change it to .txt it allows me to modify the code. Is this the only way I can modify .php coding?

View Replies !
PHP To Edit Files
I'm looking at creating a website that basically saves times and dates and emails specific people (all taken from a mysql database) when times have passed. I suppose something like a birthday reminder site, but not quite. All I'd like to know is: Is this possible and how much of an undertaking is it to get the emails out at specific times, instead of run as a batch at fixed times from a linux cron script.

View Replies !
Edit Files In A Textarea
I want to load existing CSS and/or PHP files in a directory on my server into a textarea as text and edit them, then save onto them.


View Replies !
Need To Somehow Mass Edit Files
Basically I was looking at my FTP and noticed that all accounts PHP files have been edited by a script. under the modified date/time stamp in my ftp I noticed that the files were all edited at a specific time: Code:

View Replies !
Edit Text Files &
I want to create a php script from which i want to call from a html file. What i want to happen is 2 things. Edit a text file and add data to it at the bottom of the file, once that has completed i want to reboot a linux service. Edit a text file and place a "#" before the first character in lines 205 & 298 in that text file I am a newbie to php scripting and i would like to learn.

View Replies !
Define Files For View/edit/delete
I am working on this little file manager project, I know, there's lots out there. However, I couldn't find one that paged the results that didn't use a DB. Now that I have it set up (works great),

I'm not sure how to define the files and not mess up the paging - so that if it's a folder you can open it and work with the files, a photo you can view or delete it and if it's a .txt, .php. etc. you can edit it. Code:

View Replies !
List Dir / List Files
Is there a fast way to read files/directory recursively? Instead of inspecting each file(s)/dir(s), is there a way to know that its a file or a directory from its hidden attribut both for windows or unix filesystem?

View Replies !
List Certain Files In A Dir
I am working on a news script were my members can post what they are currently working on. I have a dir were all of there images are going to be uploaded, and I need to know if the following is possable to do.

$username = the members name selected from the database
$projname = the projects name selected from the database

What I want to do is select only images with the filename containing the info. The filenames are like this:

TheBlackshinobi_3dmountain_1.jpg
TheBlackshinobi_3dmountain_2.jpg
TheBlackshinobi_3dmountain_3.jpg

View Replies !
List Dir And Files In Sub Dir
I am trying to make a script that list all of the files in a directory and then if the file in the directory is a sub Directory it will list the files in the subdirectory.

If anybody would have a clue how to do this or where to start, please tell.

Also in the end i want it to check file dates and delete them if they are older then 3 days, but i dont have a clue where to start on this.

View Replies !
List All Files
i want a file in the root to index all dirs, and subdirs, and subdirs of subdirs, etc.
i would like it to print the path to the file and the file size i just am not sure how to get it to index all subdirs that could strech 10 deep .

View Replies !
Jpg Files And List Them
I want to search through a specified directory and fetch the filenames of JPG's and create a text link to them, so upon click it opens the correct picture.

View Replies !
Php Foreach Dir List Files In Dir
I've got some code to loop through a directory and it's sub directories and bring back a list of files and folders. What im wanting to do is have this in a state where i can put all info into a database so i can quickly index and then see what files are in what folders. It's all my security camera triggerd avi files. The following code will loop through an give me an array of files and folders Code:

View Replies !
Get A List Of Files On A Website
I need to get a list of all files in a particular virtual directory on
a web site, such as -
http://www.myServer.com/FileStore

I tried using the directory functions, but this doesn't work.

if($dirHandle = opendir("http://www.myServer.com/FileStore/"))
{
while(false !== ($file = readdir($dirHandle)))
{
print($file."<br>");
}
}
closedir($handle);
}

Is there a way to do this?

View Replies !
How Does One Get A List Of All Files In A Folder?
need a list of all files (i have like 5k or so) in a folder, I need to add there names to a table

I am doing this so i can compare two tables

table 1. comments added to uploaded pics -finished pictures-
table 2. no comments added yet to uploaded pics (so they can be commented on GET IT?)  -unfinished pictures-

All the pictures are in a single folder for the time being i'm going to be making a form based on the pictures that are on table 2 so that they can have comments and titles and file name added to table 1 (to be done still) but i need to know all the file names for the folder in question, i guess i could do it via cmd line ls or something like that, i'll get back to you.

View Replies !
List Php Files In Directory.
I am creating a plugins folder that  I will use to store php files. I also store other folders within that "plugins" folder. The problem I have is getting the script to read only the  the .php files and skip subfolders.

Plugins[main folder]
    ->plugin1.php
    ->plugin2.php
    ->screenshot[folder]
    ->downloads[folder]

How to keep the script from checking the folders (screenshots, downloads..) This part of my script filters the main folder and parent but not subfolders

if ($file!= "." && $file!= "..") {

How do i get that code to not check subfolders.

View Replies !
Get A List Of Files In A Directory?
How do you get a list of files in a directory?

View Replies !
List Files In A Directory
I have a directory with PDF files. I need to be able display a list of the files in that directory and link their names to the actual files. The files keep changing so i need to have a script doing it, rather then adding links manually. The files are associated with a particular month which is reflected in their names:

filename_1105.pdf -- would be for Nov 2005

Is it possible while printing out a list of the files, have the name of the month spelled out, something like: PHP Code:

<a href="filename_1105.pdf">Filename November 2005</a><br>
<a href="filename_1205.pdf">Filename december 2005</a><br>

I suppose I need to run some sort of loop, but have never done anything similar.

View Replies !
Dropdown List Of Files In Folder
I am preparing a form that includes a drop-down list consisting of the names of files in a certain folder on the server.

I only need to trap the file name (jpg), not the path and I'm not trying to upload the files or anything - simply allow the user to select one of a number of different image files (they're actually location maps).

View Replies !
Display A List Of Files In A Folder
How do you display a list of files in a folder and then delete one by clicking on it?

View Replies !
Generating A List Of Files On Another Server
I have been messing about with the folder / file functions on the php.net website but they all seem to be for local folders.

All I am trying to do is generate a list of files on another servers folder - so my variable to generate a list from would be "www.tnauk.org.uk/bbs/daily" but the script would be running on nimmox.com. Is it possible?

View Replies !
List Of My Files Within A Folder / Directory
how can i create a dirlist.php file so i can view just a list of my files within a folder of my website?? So just the files are listed?

View Replies !
List Files On Remote Site ?
Recently our TiVos were upgraded to include a webserver. Is it possible for
me to run a PHP script from my machine and have it somehow retrieve a
listing of all the files in subdirectory that are on the TiVo ? Code:

View Replies !
List Box With Files, Then Preview Of Thumb
I want to create a listbox that displays all the files in a certain directory. Upon clicking on a file, a small thumbnail appears. I've seen a lot of "image viewers" or automatic thumbnail generators, but these don't suffice. Mine needs to preview a thumb only when I select the file in the listbox.

View Replies !
Directory List - Strip Files
I'm trying to create a script that lists out directories in a <select> dropdown. I've figured out how to list a complete directory (script below), but now I have to figure out how to remove all of the files (I only need the directories). Any tips? Code:

View Replies !
List Files On Network Drive
I have been tasked with attempting to list files on a network drive. if it can not be done, this is fine, however I figure I will ask. I have attempted many of the available directory list code, as well as my own, however none of it can handle network drives, or even if I map the network drive it doesn't work. Is there any method of doing this? If so, it would save me a big headache. I am running IIS on Win2k w/ PHP 5.2.0.

I attempted to setup a virtual directory, which does not work as the IIS User doesn't have rights to the network drive (even though I mapped it to sign in as a different user), that is a differnet issue all together of course, not for this thread. However if there is any way PHP can do this. it would help a lot.

View Replies !
List Files In Directory Excluding Directories
I have the following code which I require to get the list of files in a given directory. However in that given directory I have other directories as well. I thought the second if condition was taking care of excluding the directories, but its not. I get a bunch of directories listed along with the files. PHP Code:

View Replies !
List Of Files Fetched Via Include() Or Require()
I want to be able to, at the end of an executed file, summarize what files it
included and required (via include() and require()). I have a very dynamic
script that depending on the situation handles several different files and
scripts.

To aid in developing, listing them would be helpful, to troubleshooting
problems. Iss there a way to list all the files that have been included along
the way?

View Replies !
Create PHP Pages From List Of Files In Directory
this is probably easy for a php pro... but I cant figure it
out..

I have a directory of mp3 files named like this.
Chevy_Car_Commercial.mp3

There are about 150 files.

I am trying to find a script that will make php pages based on the file
names.
chevy_car_commercial.php

And also dump that variable title
Chevy Car Commercial into the <title> of the web page...

I have made dynamic pages before... but that was using a form..

View Replies !
Ereg, Read The Dir And Print List Of Files.
I have a dir of html files that link to websites, i would like to read the dir
and print a list of those files as a link. Which the script i have does. I
would like to take this one step further and replace the ".html" extension
with ".com" so it winds up being:

View Replies !
List Files In Directory For Apache Alias
I want to list the files in a given <dir> with a given file extension ...
opendir() or scandir() would seem to be my solution. BUT! those files are outside the root dir of the site ... accessed via an apache alias. so opendir() and similar functions do not seem to work as I cannot feed it a relative path.

is there a way to do this?

my page:
<http://myintranet/prodinfo/listdir.php>

http location of dir to be listed:
<http://myintranet/dailies/>
/dailies/ is an alias pointing elsewhere on the server.
indexing has been turned on for this alias in apache, so loading the above URL shows the dir contents by default.

so for example ...

this works because /images is in the root of the web dir:
$myDir = "../images/";
$scanFiles = scandir($myDir);
print_r($scanFiles);

this does not work as dailies is an alias and not a dir in the web root:
$myDir = "../dailies/";
$scanFiles = scandir($myDir);
print_r($scanFiles);

one option I see is to grab the html of that apache auto-generated index page and parse the content to grab the links out of it. but this seems rather roundabout, and with all the great php file tools, I'm hoping there's a much simpler way.

does anyone have any ideas, or is there some addtl info I can provide to make my question clearer?

View Replies !
Print A Dynamic List Of Files To Seperate Divs
I have a database table of files which fall into different categories. Each category has a numerical value.

I want to seperate the files into the correct <div> tags based on their category so I can then show and hide the <div> depending on which category is selected in a dropdown. It sounds easy enough but I can't seem to think right now and Im stuck.

So I would a have a string for each category. To this string I add the file information for each file in that category...and then print the strings..

View Replies !
List All The HTML Or PHP3 Or TXT Files In A Variable-defined Directory
What I need to be able to do is to list all the HTML or PHP3 or TXT files in a variable-defined directory, with a little icon next to each one and each one needs to be able to carry a link. Anyone got any ideas as to how to do that? The link that needs to be carried will contain the name of the file.

View Replies !
Product
i have a table `product` with structure like

productid productname catid
1 apple 1
2 pear 1
3 pork 2
4 beef 2
5 mutton 2
6 cake 3
7 bread 3


how can i get only one record from each catid &#391;' , &#392;' , &#393;' either randomly or most new one?

View Replies !
Retrieve Product ID
All i need is for the $productURL as shown below to recognise the product ID as set in my query.

PHP Code:

$result = mysql_query('SELECT  pd_name, MAX(pd_id), pd_thumbnail
                                        FROM tbl_product GROUP BY pd_id desc limit 1') or exit(mysql_error());
                        $row = mysql_fetch_assoc($result);
                        $productUrl = 'categories.php?c=17&p='. $_GET['pd_id'];?>
                        <a href="<?php echo $productUrl; ?>"><img src="<?php echo $row['pd_thumbnail']; ?>" border="0"></a>

View Replies !
Product Views
I am currentlyshowing the images on the site in order of date i added to my mysql database. How do i offer the punters different views for example.

Date issued
Name

and show in asending or decending. Is this possible.

View Replies !
Product Rental
I have tried lots of calendar scripts, and they all have nice functionality. But doesn't anyone know where I can find a simple script, just to book a product in and out on a calendar basis? I don't want to waste hours modifying huge scripts.

View Replies !
Product Searcher
I have a product database in MySQL. Some of the products are duplicated between different manufacturers e.g.

ID Manufacturer
HK 1212 SKF
HK1212 NSK
HK1212 RS NSK
HK 1212 ZZ SKF

As you can see the two codes are the same except for the spaces. I want people to be able to enter the search phrases with or without the spaces e.g.

"HK1212" or "HK 1212" would return all 4 results
"HK1212ZZ" or "HK 1212 ZZ" would return the 4th item

View Replies !
Product Configurator
I want to start writing a product configurator software with PHP like the one on Alienware web site:

http://www.alienware.com/Configurator_Pages/aurora_alx_r7.aspx?SysCode=PC-AURORA-ALX-R7&SubCode=SKU-DEFAULT

I know that everything runs on Javascript on this page. Based on which item is selected, some other items are being hidden and price is re-calculated. I want to use the PHP to write the back-end of this. It is about producs, product categories, defining pc models (with default components and free slots) etc. This looks like a big challenge for me, so I want to start somewhere.

View Replies !
Product Ordering
I need to setup a product ordering system. Currently I have a column in my products table which is called products_order. There is a number there and when I list my products (according to which category the product is in) it lists it ORDERED by the products_order column. I need to setup an easy way to edit the listing though and I was curious what the most logical way to do this would be. I need it to be simple enough so that anyone can do it.

View Replies !
Product Catalog
I'm looking for a good tutorial on building a Product Catalog. I will be using PHP and MySQL. I was hoping for a tutorial that got right into the code and not just gave you the code. It would be great as well if it had search capabilities and sub-categories.

View Replies !
Product Select
I have a table list of products and a text field at the end of every row which is the "amount". For example i would put "2" into the amount box and click the "add product" button. How would i go about adding the amount then it taking the product id from that row to be inserted into a database? This would include multiple amounts for multiple products at the same time. Of course afterwards it would list current products that have been selected.

View Replies !
Online Product Catalog
Can anyone suggest me a good and reasonably priced or free script for setting up an online product catalog. Like the other image library scripts the catalog can create its own thubnails and we can also input the details about the product.

View Replies !
Product Attributes Problem?
While trying to design a database for shopping cart i encountered few problems which i am mentioning here.

I had hierarchical level of categories for products for which i designed table as:

View Replies !
I Need A Product Review Script
I need a script for reviewing products (much like epinions.com)
written in either perl or php (can't use asp). i am very strapped for
time and need a functional script asap, which is why i dont have time
to write it myself. i would prefer if it used a mysql db. basically, i
just need for people to be able to have members write out how much
they paid, pros/cons, overall opinion, whether or not they would buy
again, and some sort of rating system (ex 1-5 stars)/ i would need to
have a master page for each product which would have msrp,
manufacterer description, pic, etc. under that would be my sites
review of the prouct (if available), and under that member reviews.
members would be able to browse products by category w/ one
sub-category level, or manufacturer, or all 3. inside this products
would need to be able to be sorted by: newest, highest rating, lowest
rating, and price.

i really, really, really need this soon. even if u know of a script
that is like this, but basic, it would really help as i could finish
it myself. if any of u have a script that u use on your site that is
still fine i can customize it myself.

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved