Re: [PHP-DB] Session don't store after header(Location: ...)

2006-03-27 Thread Philip Hallstrom
Hi everybody, I have a problem with mysql session handler and redirect. My situation: - mysql session handler - one page is posted to another page, that saves a session variable and redirect to the first page again. If I do the redirect the variable is not properly setted, otherwise it's all

Re: [PHP-DB] Session don't store after header(Location: ...)

2006-03-27 Thread Philip Hallstrom
Philip Hallstrom ha scritto: Don't use Header(Location:...). Instead spit back very minimal javascript that does something like: script document.location.href = '.'; /script That way the cookies that get sent back in the header will take affect. I have to use header(Location...), cause

Re: [PHP-DB] How to compare crypted password with stored in MySQL

2006-02-01 Thread Philip Hallstrom
On Wed, 1 Feb 2006, Eduardo Bejar wrote: Hi, I have a MySQL database with encrypted passwords, that were created with: $input_password = $_POST[password]; $salt = ab; /// Salt is always two character string and the same for all $password_to_save = crypt($input_password, $salt); [snip]

Re: [PHP-DB] PDF generation on the fly

2006-01-23 Thread Philip Hallstrom
Do any of you use pdflib for generating PDF files on the fly? Ive got the demo working and it looks good so far, i was expecting it be open source but found out that it has a price tag of 450 euros per processor, this is fairly reasonable of course but i was wandering if anyone knew of any

Re: [PHP-DB] mysql_pconnect cannot create two permanent connections to the same machine ?

2006-01-17 Thread Philip Hallstrom
Hi List, I do not claim that this is bug, but it is not a nice feature either. I do have following: ? /* db.php */ $db_server=127.0.0.1; $db_user = ** $db_pass = ** $db_db = bebbicell; $db_account_server=127.0.0.1; $db_account_user = $db_account_pass = $db_account_db

Re: [PHP-DB] MySQL date casting..

2006-01-17 Thread Philip Hallstrom
Forgive me that this isn't really PHP related, but solely MySQL.. but the MySQL mailing lists drive me nuts and figured someone here would have a quick answer. I'm trying to sort by a date and time field(s) (two separate fields). It's a dumb system but until we do the next revision, it's

Re: [PHP-DB] Importing CSV into MySQL

2006-01-11 Thread Philip Hallstrom
I remember reading in a book that there is a function to import the content of a CSV file into a MySQL table, am I alright? what is that function? Of course, the first option could be reading the CSV file line by line and using explode() to get each column value for each row. I think LOAD DATA

Re: [PHP-DB] Google Style Search Results

2005-12-07 Thread Philip Hallstrom
why not use substr? $preview = substr($string, 0, 50) .'...'; it will probably cut off in the middle of a word, but you can use strpos and check to see if the char is a space to get to the point you want. It's possible that the keywords wouldn't be in the first X numbers of characters.

Re: [PHP-DB] Case sensitive

2005-08-24 Thread Philip Hallstrom
better to use the sql UPPER/LOWER and keep your variable values the same Except that they should be escaping the variable to make it db-safe so that will change it ... so if you're going to do that, might as well do this: $safe_stringinput = _escape_string(strtoupper($stringinput);

Re: [PHP-DB] DB Access, Sessions and Blocking Access

2005-08-17 Thread Philip Hallstrom
I'm developing a web-based system whereby users can edit documents and then e-mail the documents to selected recipients. The documents are comprised of the data from several MySQL fields. I want to make sure that two people don't edit a document at the same time. My users log in via a script

Re: [PHP-DB] Help. I am losing the plot.. (NOW good code editor)

2005-07-05 Thread Philip Hallstrom
Um. Anyone know of a good code editor? I normally use vim, but on my windows box sometimes use http://www.pnotepad.org/ when looking at log files and what not... (yes, I know there's a windows version of vim) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] mySQL UPDATE

2005-06-09 Thread Philip Hallstrom
On Thu, 9 Jun 2005, Ron Piggott wrote: I created a PHP based mailing list that sends out a Bible verse and a quotation each day. Today's verses were: [snip] Let me show you some code: It selects a Bible verse: SELECT * FROM bible ORDER BY RAND() LIMIT 1 On a side note, this is going to

Re: [PHP-DB] printf() in a variable, or alternative to printf()

2005-05-27 Thread Philip Hallstrom
I need to be able to format data. Printf() is perfect because I need a certain amount of characters (30 for address). However I need this formatted data to be inside a file that's fwrite() and then FTPed to a distributor who will parse it and input into their database. printf(%

Re: [PHP-DB] PEAR - My hosting company killed it

2005-05-13 Thread Philip Hallstrom
I know this is the probably the wrong list for this question, but I'm a bit desperate as my hosting company has disabled PEAR on the server, and I was using it extensively on more than one website... suddenly my weekend looks like a coding nightmare. The hosting service reports a security issue,

Re: [PHP-DB] Need some help

2005-05-11 Thread Philip Hallstrom
I am having an issue with displaying a variable from another php script. Can you help please? Here is the code that I’m using: ?php $item_ttlprice = $_POST[$ttl_price]; This should at the very least be: $item_ttlprice = $_POST[ttl_price]; // remove the last dolalr sign Also, if youre HTML

Re: [PHP-DB] Looking for help.

2005-05-04 Thread Philip Hallstrom
So to make a long story short, I am now learning mysql and php. I has been a slow and often aggravating process, but we are starting to make some progress. But I need to learn more. Can anyone suggest a really good book, or possibly some tutorial classes I can on line that I can use to learn

Re: [PHP-DB] number on the quene, or how to get rank?

2005-04-05 Thread Philip Hallstrom
You could try something like this perhaps... SELECT score FROM highscores WHERE name = 'userD' then use the result of that to do this: SELECT COUNT(*) FROM highscores WHERE score 2 rank would then be the result of the above query plus one. -philip On Tue, 5 Apr 2005 [EMAIL PROTECTED] wrote: hi

Re: [PHP-DB] GD Question

2005-04-05 Thread Philip Hallstrom
Probably nothing really. When it complains about headers already being sent is the line number the same as your header() line below? If so, that means you're outputting something back to the browser prior to that line. I'd make sure you don't have any white space before your initial opening

[PHP-DB] Re: ORDER BY from 2 tables

2002-07-29 Thread Philip Hallstrom
See if your database supports the UNION clause... On Mon, 29 Jul 2002, Georgie Casey wrote: i assume this is a simple question... how can I SELECT * FROM 2 different tables in the same query, ORDER BYing the 'hits' column, which both tables have. eg, 2 tables i have are similiar and i