[UPHPU] Storing & Retrieving Invoices

jtaber jtaber at johntaber.net
Fri Nov 10 11:20:13 MST 2006


for getting nice url's , there's several how-to articles on the web - 
search "php pretty urls" - I used a tutorial off the apache site about 
sports.  It's pretty easy - even a caveman can do it :)  note:  you 
don't want to do "invoice.date" in the url, rather use a php 
concatenation string to make the url something like
<a href=<? echo('www.foo.com/invoices/'.(invoice.date)); ?> > mylink</a>

Daniel C. wrote:
> Hello group,
>
> How do you all store and retrieve customer invoices?  I don't see any
> reason to keep them in the database since once they're generated,
> they're static.  And I'd like a way for the customer to get their
> invoices without having a hideous URL.  i.e.
> foo.com/invoices/2006/10/26 is prefferable to
> foo.com/invoices.php?y=2006&m=10&d=26.  So I'm thinking of doing a
> rewrite rule for that, which is fine if I can get it to work (having
> trouble currently).
>
> As for storing them, I'm thinking of just writing a static file that
> will be retrieved (with safety measures in place to prevent people
> accessing invoices/../../../etc/passwd and things like that) when the
> page is hit.  Which begs the question of how the directory structure
> will work.  I'm thinking of doing it like this:
>
> storage directory/customer's id/year/month/date.invoice
>
> so customer id 1 would have their 2006/10/26 invoice in this file:
>
> storage directory/1/2006/10/26.invoice
>
> Thoughts?  Suggestions?
>
> Thanks,
> Dan
>
> _______________________________________________
>
> UPHPU mailing list
> UPHPU at uphpu.org
> http://uphpu.org/mailman/listinfo/uphpu
> IRC: #uphpu on irc.freenode.net
>
>



More information about the UPHPU mailing list