|
Well Marc I have it. This what I have finished up with. I am adding this as I believe you deserve an account as to what purpose your help has been put to. I will now over the next few weeks fully populate my site at My Online Garage Sale
STRUCTURE
Root
index.html |
catergories.html |-------Item folder
item_descriptions.html| item.txt
sorry.html | item.php----------These items are auto created
itemu.php I created a simple basic program
How it works
A person comes to the site, goes to a catergory and makes a selection where they have a chance to "Buy Now". That takes them to checkout. After they are sent to itemu.php which removes item.txt and then sends them to index.html. Selecting the item again will send them to the sorry page. Any attempt to buy the same item twice stopped. I may create a couple of links to sorry as people may think the site is selling. I'm a sneeky bugger. I have dozens of computer books so I will have heaps to sell. One thing, at going on 67 this certainly exercises the brain. I get that Eureca moment everytime a program works and I believe you probably experiance that too. That at least is one thing I have in common with Archimedes.
For interest I use the Blue Voda web site builder which makes quick pleasing sites. I use a program I created to convert the output to my requirements.
Basic I can do with ease PHP may take a little longer
I feel almost too embarrised to say but I found my problem:
I had >?php instead of Terry
modified on Thursday, June 18, 2009 6:36 PM
|
|
|
|
|
Congratulations. Looks like it works a charm.
Member 3739910 wrote: I get that Eureca moment everytime a program works and I believe you probably experiance that too.
Definitely. That's why I now do it for a living.
|
|
|
|
|
The next task I am setting out on is the auto uploading and syncronising of the site
so you may hear more of my plea's here.
Now with a glass of red in hand I am now about to take pictures and fill the pages with my goodies.
I have the php creation program working. Strange I use one language to produce another. I shall eventually make the page creation semi automatic. Like most of us I seem destined to make a better mouse trap.
I have the ability of using my limited resources to create some usefull utilities. One such is A Universal Ink Monitor.
I think I said this is a hobby and I make it pay for itself.
Terry
|
|
|
|
|
How can i upload the images with various extension in folder using php
|
|
|
|
|
http://lmgtfy.com/?q=php+file+upload
|
|
|
|
|
Put all the image extensions in an array then use the in_array() function to check if the mime type of the file is in the array.
Uploading of file exposes your application to lots of security vulnerabilities, checking mime type is not a good method of filtering certain files as the mime type is determined by the browser.
You should read about the security of file uploading.
|
|
|
|
|
I have a PHP program that is needed to run an external program (using proc_open() )and display its output as it's updated, as the program takes a long time to run , I have to wait for that long for PHP to display the message 100% complete,( The original program displays the output as 1% 2% 3% .... )
Can anyone please help me ?
Thank You
~Salil
|
|
|
|
|
write your external program so that it writes it's progress to a text file. The read that text file with PHP.
|
|
|
|
|
Hi All,
I have been poking my nose into PyS60 since few months now and finally today I am releasing my first game - PyJumble.
PyJumble is a simple word game. It is based on the popular game Jumble - which is a word puzzle in which a player is given a set of letters which, when arranged in the correct order, give the un-jumbled word. A simple example would be the set of letters "lbujme," which can then be rearranged to spell "jumble".
The most compelling feature of the game is Highscore. The game has two types of highscores - Offline and Online. The user can always update his/her score by enabling online highscore in the game settings. The top online highscores can also be retrieved through the game on mobile; otherwise it can be viewed here.
To download this game click here Download PyJumble[^]
Njoy
Pavan Pareta
|
|
|
|
|
Hi all. I'm writing a web app for personal business use. It's a big job and will handle invoicing, payments, time scheduling and so on. I expect it will take the better part of 6 months or a year to finish in my spare time.
I've made a couple of false starts but seem always to end up with spaghetti code. My major obstacle is keeping the program aware of what it's current status is.
For example, there's a page to add a new customer, or a new supplier and they work fine. sometimes while entering an invoice it happens that the supplier or the customer or work location or something that does not exist. The app. needs to divert to the "New customer" page, get the data and return to the original point. While entering the new customer it might happen that the customer uses a bank that's never been entered before and so it needs to divert to the "New Bank" page and then backtrack to where it started.
To make the problem clearer - please consider the web-interface my bank uses. I have to log in to do anything at all. If I'm half way through a transaction and the session times out, I'm taken to the log-in page again, but after entering the login details I don't go to the main menu again ... it takes me to where I left off with the transaction. Somewhere behind the scenes a clever programmer kept track of what I was doing, so the log-in page can be re-used over and over at different points in a session. That's the kind of thing I need to do.
I've been using session variables and some hidden variables in the pages to assist but as the program grows it becomes cumbersome and confusing. There's an endless list of if's or's and's - rules and exceptions to rules.
Can anybody give some good generic advice about how to integrate and track all the various sub-components of a large application like this?
Thanks in advance.
Angus
|
|
|
|
|
Good Question. There are many ways you can do this.
I would use an array stored in a session variable ("$tasks" - see below). I'd also have each page save data as you go along and refer to everything using a Unique ID - so that if you get halfway through and realise you need to do something else you can go off and do something else and the data will be stored.
I also suggest putting the code that stores a page's data to the database into a function so that you can reference it from any other file. This way, if your form has 5 possible exit points - you only need to write the code that stores the data once.
When you reach a point where they will be redirected to a new page add the current page to the tasks array:
$tasks = $_SESSION['tasks'];
$tasks[] = "/editInvoice.php?id=$invoiceid";
$_SESSION['tasks']= $tasks;
....
(on the next page: )
$tasks = $_SESSION['tasks'];
$tasks[] = "/editCustomer.php?id=$custid";
$_SESSION['tasks']= $tasks;
Then when a task is complete you can pop the array and redirect to the popped item:
$redirect = array_pop($tasks);
$_SESSION['tasks']= $tasks;
header("Location: $redirect");
|
|
|
|
|
Just pointing out that:
$tasks = $_SESSION['tasks'];
$tasks[] = "/editInvoice.php?id=$invoiceid";
$_SESSION['tasks']= $tasks;
Is exactly the same as:
$_SESSION['tasks'][] = "/editInvoice.php?id=$invoiceid";
|
|
|
|
|
Thanks Marc for the ideas. I like the idea of popping and array...I can sort of make a breadcrumb trail that way.
I've taken your advice also to see how others have done this. Finding lots of hidden fields, and useful data embedded into URL's.
I think I will keep analyzing this for a few weeks before starting in earnest. I'd rather get it right first time, not have to patch up an imperfect solution.
And AtliThor - I'm constantly amazed how people can write one line of code when I need half a dozen to do the same thing. Thanks also.
Angus
|
|
|
|
|
Hi guys.
I am TOTALLY new on Linux and we just bought a new Linux server at the office and I have to install some application on it. I need to install and other applcations but unfortunately it does not recognize the exe files as installable files. How do I go about installing them.
Your assistance will be appreciated guys.
kagiso
|
|
|
|
|
Exe files are programs that are compiled for Windows. You need programs that are compiled to run on Linux, simply taking an exe and trying to run it on Linux won't work. Wherever you got the applications from that you're trying to install, you need to go back there and get different versions.
Different Linux distributions have different ways to help you install software. Most have some sort of online repository for software and you use a nice GUI to select the apps you want to install, click a button and viola, the apps are installed. Another common thing is that different distributions have their own installer packages - kind of like Microsoft's MSI files. The idea is that everything you need to install an app is packaged in one file and all you have to do is launch that file. Red Hat's ".rpm" files and Debian's ".deb" files are two types that are pretty standard nowadays.
If you're TOTALLY new on Linux then I strongly suggest you try to find a mentor in your company or get some kind of beginners book to help you.
Last modified: 6hrs 16mins after originally posted --
|
|
|
|
|
matjame wrote: I need to install and other applcations but unfortunately it does not recognize the exe files as installable files. How do I go about installing them.
Some of the EXE files can be executed using wine[^] but not all. Since you are new to LINUX world, I would suggest to start with UBUNTU. It has got simple UI and almost easy to configure. You will get frequent updates and the synaptic package manager makes software installations painless.
|
|
|
|
|
Yeah..I have went through all that.....I now know how to install packages in Linux (CentOS Red Hat)....The problem is that..I have packages already on my desktop and want to install them
kagiso
|
|
|
|
|
matjame wrote: .The problem is that..I have packages already on my desktop and want to install them
Is that in a RPM format? When you install packaged manually, you will run into dependency issues. The package you are installing may be dependent on several other packages and you need to install the dependencies first.
|
|
|
|
|
Thanx Navaneeth..I just went to the CentOS site and got the RPMs and the other applications and they got installed automatically. Now I can install again but I am trying now to install from my desktop.
Which is still giving me a problem by the way..you can help me with that if you know how.
Thank you again for your assistance. Appreciated
kagiso
|
|
|
|
|
First of all, Windows executables (.exe) won't natively run on Linux. Contrary to what others said, WINE isn't the only way of running Windows binaries. If the binaries are .NET-programs, they might actually run if you have the MONO runtimes properly installed. This is mostly limited to console apps, though.
However, you can always install Windows into a virtual machine and run your software there.
If the software is popular, there might be a Linux version, as a binary package or source code. Source code is mostly offered as tarballs (.tar.gz) and requires a compilation after extraction. Under linux, extracting the source-code, changing into the source dir and executing the commands
./configure
make
make install
should configure the toolchain, build the software and install it for you. If you are missing compononents necessary for the build, the output of configure and make will tell you.
Binary packages are usually suitable for one or more distributions. The most famous formats are .deb (Debian-based) and .rpm (Redhat-Package-Manager). DEBs are usually installed with synaptic, aptitude or dpkg, RPMs with yast or another redhat package manager. On Debian-based systems, "apt-get install product" will try to retrieve and install a binary package by the name of "product", resolving dependencies and showing the results for you.
Cheers,
Sebastian
--
"If it was two men, the non-driver would have challenged the driver to simply crash through the gates. The macho image thing, you know." - Marc Clifton
|
|
|
|
|
Hi,
I am new to php, I am using magento tool in windows,in that currency symbol "Rs" is not displayed.Instead "RP" is displayed. What to do, help me.
Thanx in advance.
|
|
|
|
|
Do a find on all the files of magneto looking for one that has "RP"?
|
|
|
|
|
Hello Everybody,
I have a problem getting parameters from url in php. I am using this code:
if(isset($_GET["Letter"]))
{
$Letter = $_GET["Letter"];
}
else
{
$Letter = "";
}
if(isset($_GET["Industry"]))
{
$IndustryID = $_GET["Industry"];
}
else
{
$IndustryID = "0";
}
The code would get the parameter first time I run the page but if I want to reload the page with different parameters it would not get them and would use the parameters from the previous load instead.
I run this code on a joomla web-site through the Sourcerer plugin. However when I try running the same code on my local machine everything works just fine.
Does anybody know what’s causing this problem? Would it be a joomla issue? Any help would be appreciated. Thanks in advance!
|
|
|
|
|
so long as the page you are on has a query string like:
http://yoursite.com/yourpage.php?Letter=abc&Industry=efg
Your code should work fine.
Note, you can shorten your code to:
if($_GET['Letter'])
{
$Letter = $_GET['Letter'];
}
else
{
$Letter = "";
}
if($_GET['Industry'])
{
$IndustryID = $_GET['Industry'];
}
else
{
$IndustryID = "0";
}
|
|
|
|
|
platinum1912 wrote:
if(isset($_GET["Letter"]))
{
$Letter = $_GET["Letter"];
}
else
{
$Letter = "";
}
if(isset($_GET["Industry"]))
{
$IndustryID = $_GET["Industry"];
}
else
{
$IndustryID = "0";
}
This could also be written like this:
$Letter = isset($_GET["Letter"]) ? $_GET["Letter"] : "" ;
$IndustryID = isset($_GET["Industry"]) ? $_GET["Industry"] : "0" ;
I like saving space with my code.
My failometer has shot off the end of the scale!
I seem to have misplaced my ban button.. no wait... found it!
|
|
|
|