Re: [PHP] Creating alphanumeric id for a table

2009-09-10 Thread Phpster
Note that this approach has risks around race conditions. Anytime you have a construct for the id you run the risk of having it create duplicate ids. You will need to handle that. Bastien Sent from my iPod On Sep 10, 2009, at 6:49 PM, Ben Dunlap wrote: I assume that I can get increment

Re: [PHP] Hoping for a hand with a login script

2009-09-10 Thread Paul M Foster
On Thu, Sep 10, 2009 at 01:00:19PM -0400, Bob McConnell wrote: > From: Ben Dunlap > > > > http://codeigniter.com/ > > http://framework.zend.com/ > > http://www.solarphp.com/ > > While I have not looked at the last two, there is one thing that bothers > me about your recommendation of codeigni

Re: [PHP] String scrambling

2009-09-10 Thread Eddie Drapkin
On Thu, Sep 10, 2009 at 8:57 PM, Ron Piggott wrote: > Is there a function in PHP which scrambles strings? > > Example: > > $string = "Hello"; > > Output might be: ehlol > > Ron http://www.php.net/manual/en/function.str-shuffle.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] Reading files in PHP 5.3.0

2009-09-10 Thread Tommy Pham
--- On Thu, 9/10/09, Steve Brown wrote: > From: Steve Brown > Subject: [PHP] Reading files in PHP 5.3.0 > To: php-general@lists.php.net > Date: Thursday, September 10, 2009, 4:13 PM > I've been beating my head against a > wall all day and can't figure this > one out.  The code below worked perfe

Re: [PHP] Creating alphanumeric id for a table

2009-09-10 Thread Ben Dunlap
> I assume that I can get increment value/sequence from db  (I used harcoded > increment value  in the code above (generate_id(1))), > but I don't know how I can get this incremental value from db.I use mysql > 5.0. If you're thinking of retrieving the newest value of an AUTO_INCREMENT column, imm

[PHP] Creating alphanumeric id for a table

2009-09-10 Thread aveev
I want to create user generated id like this : AAA0001 AAA0002 ... AAA0009 AAA0010 where the id consists of 3 alphanumeric characters and 4 numerical digits in the beginning (for numerical digit, it can grow like this AAA10001). I try to use php script to generate id like this, where I use the fo

[PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger

2009-09-10 Thread Andrea Giammarchi
Being something nobody thought before I was expecting some comment ... zero Ajax developers here? Anyway, to make things even more simple I have released the Zero Config client side file, which works with most known browsers, IE included, and it does not require a single change in existent code

[PHP] Reading files in PHP 5.3.0

2009-09-10 Thread Steve Brown
I've been beating my head against a wall all day and can't figure this one out. The code below worked perfectly in PHP5.2.4. However, I recently upgraded to PHP5.3.0 and this code no longer works. The function below accepts the path to a text file containing headers from a cUrl session (example

Re: [PHP] Hoping for a hand with a login script

2009-09-10 Thread Ben Dunlap
> I would recommend this to anyone looking to build any sort of web app. > Could be that nothing out there will end up serving your purposes, but ... and, on further investigation, it looks like CI, surprisingly enough, doesn't actually have pre-built authentication and access control (although it

Re: [PHP] Hoping for a hand with a login script

2009-09-10 Thread Ben Dunlap
> several packages available to provide it. But I believe that telling > someone to adopt a complete portal system like CI just to get basic > authentication is gross overkill. There has to be a better way to > provide this core functionality without installing a monster package > that will be 95%

Re: [PHP] Performance of while(true) loop

2009-09-10 Thread Jim Lucas
APseudoUtopia wrote: > Hey list, > > I have a php cli script that listens on a UDP socket and, when data is > sent to the socket, the script inserts it into a database. I'm using > the real BSD socket functions, not fsock. > > The script runs socket_create(), then socket_bind(). Then it starts a

Re: [PHP] Hoping for a hand with a login script

2009-09-10 Thread Bastien Koert
On Thu, Sep 10, 2009 at 12:21 PM, Ben Dunlap wrote: >> So I'm trying to set up a small website that includes a store ( >> www.rareintaglio.com), i have all of my HTML hammed out and now I'm working >> on creating an admin login for the sites owner to input data from a back simple folder protectio

RE: [PHP] Hoping for a hand with a login script

2009-09-10 Thread Bob McConnell
From: Ben Dunlap > >> So I'm trying to set up a small website that includes a store ( >> www.rareintaglio.com), i have all of my HTML hammed out and now I'm working >> on creating an admin login for the sites owner to input data from a back > > I would really strongly advise against building your

Re: [PHP] Hoping for a hand with a login script

2009-09-10 Thread Robert Cummings
Ben Dunlap wrote: So I'm trying to set up a small website that includes a store ( www.rareintaglio.com), i have all of my HTML hammed out and now I'm working on creating an admin login for the sites owner to input data from a back I would really strongly advise against building your own authe

Re: [PHP] Hoping for a hand with a login script

2009-09-10 Thread Ben Dunlap
> So I'm trying to set up a small website that includes a store ( > www.rareintaglio.com), i have all of my HTML hammed out and now I'm working > on creating an admin login for the sites owner to input data from a back I would really strongly advise against building your own authentication system.

Re: [PHP] Hoping for a hand with a login script

2009-09-10 Thread Tommy Pham
-- On Thu, 9/10/09, Watson Blair wrote: > From: Watson Blair > Subject: Re: [PHP] Hoping for a hand with a login script > To: "Tommy Pham" > Cc: php-general@lists.php.net > Date: Thursday, September 10, 2009, 4:31 AM > Hey Tommy,Thanks for the link, I found > a few typos in my variables, and Qu

Re: [PHP] Hoping for a hand with a login script

2009-09-10 Thread Watson Blair
Hey Tommy,Thanks for the link, I found a few typos in my variables, and Query. but now it's returning: Results: Resource id #2 *Warning*: Cannot modify header information - headers already sent by (output started at /home/content/i/n/t/intag/html/session.php:16) in * /home/content/i/n/t/intag/html

[PHP] Re: Hoping for a hand with a login script

2009-09-10 Thread Tony Marston
You are constructing your query in "$qury" yet you are trying to read it from "$query". Because they have different spellings they are treated as different variables. -- Tony Marston http://www.tonymarston.net http://www.radicore.org "Watson Blair" wrote in message news:28f3c0b00909100206o2

Re: [PHP] Hoping for a hand with a login script

2009-09-10 Thread Tommy Pham
--- On Thu, 9/10/09, Tommy Pham wrote: > From: Tommy Pham > Subject: Re: [PHP] Hoping for a hand with a login script > To: php-general@lists.php.net > Date: Thursday, September 10, 2009, 4:13 AM > --- On Thu, 9/10/09, Watson Blair > > wrote: > > > From: Watson Blair > > Subject: [PHP] Hoping

Re: [PHP] Hoping for a hand with a login script

2009-09-10 Thread Tommy Pham
--- On Thu, 9/10/09, Watson Blair wrote: > From: Watson Blair > Subject: [PHP] Hoping for a hand with a login script > To: php-general@lists.php.net > Date: Thursday, September 10, 2009, 4:06 AM > Hey guys,This is a simple issue I'm > sure, however I'm having one hell of a > time seeing my way c

[PHP] Hoping for a hand with a login script

2009-09-10 Thread Watson Blair
Hey guys,This is a simple issue I'm sure, however I'm having one hell of a time seeing my way clear of it. I appreciate any support you guys could throw my way. So I'm trying to set up a small website that includes a store ( www.rareintaglio.com), i have all of my HTML hammed out and now I'm worki

RE: [PHP] header problem

2009-09-10 Thread Arno Kuhl
-Original Message- From: A.a.k [mailto:blue...@gmail.com] Sent: 10 September 2009 08:27 AM To: php-general@lists.php.net Subject: [PHP] header problem hello I recentrly uploaded my project from localhost to a hosting and found many errors and warnings which didnt have in local. one of the

Re: [PHP] header problem

2009-09-10 Thread Ashley Sheridan
On Thu, 2009-09-10 at 09:04 +0200, Sándor Tamás (HostWare Kft.) wrote: > Usually, when I have to redirect the user AFTER headers has been sent (like > showing an error message), I write this: > > location=page_to_send.html > > But this will redirect the user at once. If you want the user to read

Re: [PHP] header problem

2009-09-10 Thread HostWare Kft.
Usually, when I have to redirect the user AFTER headers has been sent (like showing an error message), I write this: location=page_to_send.html But this will redirect the user at once. If you want the user to read the page, you should do something in Javascript with setTimeout(func,timeout) f

Re: [PHP] header problem

2009-09-10 Thread Ashley Sheridan
On Thu, 2009-09-10 at 08:57 +0200, A.a.k wrote: > is there any alternative to header() for redirect users? > > "George Langley" wrote in message > news:b1b897d4-7448-4b71-bffc-3addc27ce...@shaw.ca... > > Hi Blueman. As soon as ANYTHING has been drawn to the browser, you cannot > > use a header

Re: [PHP] header problem

2009-09-10 Thread Marcus Gnaß
A.a.k wrote: > is there any alternative to header() for redirect users? As far as I know there isn't. Is the header-error the first error on the page? If not, the other error message itself is the reason for the header-error and will be solved if you solve the other error. -- PHP General Mailin