[PHP] php/mySQL time comparison

2003-03-14 Thread Brad Wright
Hi all, I have been tearing my hair out for weeks with this problem, hope someone can help. I want to pull all data out of a mysql table that falls between two dates (a start-time and end-time). I use PHP to allow the user to specify the time interval, creating 2 variables 'startTime' and 'end

Re: [PHP] php/mySQL time comparison

2003-03-14 Thread Brad Wright
acqua i bacilli -- In wine there is truth, in beer there is strength, in water there are bacteria > From: Brad Wright <[EMAIL PROTECTED]> > Date: Sat, 15 Mar 2003 00:33:15 +1000 > To: <[EMAIL PROTECTED]> > S

[PHP] Using PHP to get a word count of a MSword doc

2003-03-16 Thread Brad Wright
Hi all, I have a mySQL DB that stores word documents (as a BLOB). I am trying to find a way of doing a word count on the documents using PHP. Can anyone help?? Thanks in advance, Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Using PHP to get a word count of a MSword doc

2003-03-18 Thread Brad Wright
nt of a MSword doc > > On Mon, 17 Mar 2003 15:43:07 +1000, Brad Wright wrote about "[PHP] Using > PHP to get a word count of a MSword doc" what the universal translator > turned into this: > >> I have a mySQL DB that stores word documents (as a BLOB). I am trying to &

Re: [PHP] Using PHP to get a word count of a MSword doc

2003-03-18 Thread Brad Wright
i bacilli -- In wine there is truth, in beer there is strength, in water there are bacteria > From: Erik Price <[EMAIL PROTECTED]> > Date: Tue, 18 Mar 2003 16:45:47 -0500 > To: Brad Wright <[EMAIL PROTECTED]> > Cc:

Re: [PHP] Using PHP to get a word count of a MSword doc

2003-03-18 Thread Brad Wright
<[EMAIL PROTECTED]> > Date: Tue, 18 Mar 2003 16:57:57 -0500 > To: Brad Wright <[EMAIL PROTECTED]> > Cc: PHP General List <[EMAIL PROTECTED]> > Subject: Re: [PHP] Using PHP to get a word count of a MSword doc > > > > Brad Wright wrote: >> Erik, >>

[PHP] php and Perl

2003-03-27 Thread Brad Wright
Hi all, can php call perl scripts? I know nothing of perl, but have found a perl script that will process a MSword document in a way that it seems php cannot. At this stage, my knowledge of perl is limited to "it's used in web stuff sometimes isnt it" :) but i am sure i will soon find a bit more

[PHP] File download/upload

2002-06-11 Thread Brad Wright
Hello, Can anyone point me towards a tute (or any info) about using php to upload and download medium size (~500k-1meg) files into a mySQL database (as blob's i assume). Cheers, Brad Nel vino la verità, nella birra la forza, nell'acqua i bacilli

[PHP] embeding media from DB

2002-06-12 Thread Brad Wright
Hi all, I have been able to upload a wav file to a mxSQl db using PHP script. Wanted to be able to get that wav file from the db and embed it into a web page using the default media player to play it. Can anyone help??? Cheers, Brad Nel vino la verità, nella birra la forza, nell'acqua i

Re: [PHP] embeding media from DB

2002-06-12 Thread Brad Wright
Sorry... that should be mySQL database Cheers, Brad Nel vino la verità, nella birra la forza, nell'acqua i bacilli -- In wine there is truth, in beer there is strenght, in water there are bacteria > From: Bra

[PHP] embedded media from DB

2002-06-12 Thread Brad Wright
Hi all.. well i got the wav files from the mysql database and can get them to play in a web page using the following code: IF ($row = mysql_fetch_array($result)) { $data = $row["wavFile"]; $name = $row["wav FileName"]; $size = $row["wav FileSize"]; $type = $row["wav FileT

[PHP] session_unregister question

2002-07-18 Thread Brad Wright
Is it possible to somehow do a session unregister of all session variables except for (say) 2 variables. varA and varB So if my session had : varA, varB,varC, varD,varE (etc) I want to unregister all but varA and varB. Is there an 'elegant' way to do this without testing for all the variables i

[PHP] 2 conditions why wont they work??

2002-02-10 Thread Brad Wright
Hi all, Im was sure you could select a row from a mySQL database based on 2 conditions. My code: $query2 = "select * from Table where userNo = $userNo and clientID = $clientID"; $result2 = mysql_query($query2,$db); This returns : Warning: Supplied argument is not a valid MySQL result resource

Re: [PHP] 2 conditions why wont they work??

2002-02-10 Thread Brad Wright
Thanks, $clientID is a string but is not empty...already tried echo($clientID) and it is not empty. Did you mean that if the value of $cientID is a string it wont work Thanks Brad > From: Bogdan Stancescu <[EMAIL PROTECTED]> > Date: Mon, 11 Feb 2002 05:38:31 +0200 >

Re: [PHP] 2 conditions why wont they work??

2002-02-10 Thread Brad Wright
Ahh..that seems to have fixed it. Its now pulling NO data, but is not giving error msg thanks, 1/2 way there now :) brad > From: Bogdan Stancescu <[EMAIL PROTECTED]> > Date: Mon, 11 Feb 2002 05:46:46 +0200 > To: Brad Wright <[EMAIL PROTECTED]> > Cc: PHP Genera

Re: [PHP] 2 conditions why wont they work??

2002-02-10 Thread Brad Wright
. I am sure that a space is being added but cant find where. Thanks for yr help, Brad > From: Bogdan Stancescu <[EMAIL PROTECTED]> > Date: Mon, 11 Feb 2002 05:53:46 +0200 > To: Brad Wright <[EMAIL PROTECTED]> > Cc: PHP General List <[EMAIL PROTECTED]> > Subject:

[PHP] email attachments and PHP

2002-06-03 Thread Brad Wright
Hi all, I was wondering if there is a way to attach files to emails sent via a PHP script. I just checked the 'mail functions' chapter of the php manual, but it doesn't seem to mention attachments. The attached files will come from the same server that php is running on BTW. Thanks in advance.

[PHP] PHP MAIL function...why wont it work????

2002-02-27 Thread Brad Wright
Hi all... I have a line in a page that should send me an email when the page is loaded. Here is the line i am using: mail("[EMAIL PROTECTED]", "worked", "Line 1\nLine 2\nLine 3"); when i load the page...i get NO error msgs, but the function does not send the mail. There is no record of any ac

[PHP] Tracking mail() problems

2002-02-28 Thread Brad Wright
Hi all, I am running PHP 4.03 on a linux box and am having problems with the mail() function. I use the syntax: ("[EMAIL PROTECTED]", "if this works, ring me and we party", "Line 1\nLine 2\nLine 3", "From: [EMAIL PROTECTED]") When the script is run, i get no error msg, and the rest of the script

Re: [PHP] PHP MAIL function...why wont it work????

2002-02-28 Thread Brad Wright
Yep it is a linux box. > From: "DL Neil" <[EMAIL PROTECTED]> > Reply-To: "DL Neil" <[EMAIL PROTECTED]> > Date: Thu, 28 Feb 2002 22:55:59 - > To: "Brad Wright" <[EMAIL PROTECTED]>, "PHP General List" > <[EMAIL PROTE

[PHP] session troubles

2001-07-05 Thread Brad Wright
Hi all, Im new to this mailing list so im not sure what to expect from 'y'all' but i'm hoping this will be the beginning of a long and beautiful friendship. My question: i have a series of PHP4 pages that if I start a session (session_start()) on the first page (adminLogin.php), all is fine and

[PHP] changing to a different file in browser

2001-07-05 Thread Brad Wright
Hi all, I know this is probably the most stupid question you'll see on this list for a while, but anyway, In an 'if..else' statement, I want to (if a condition is met) change to a totally new php page in the browser window. I know this is simple (in fact i had it working last night but have now fo

Re: [PHP] Re: changing to a different file in browser

2001-07-05 Thread Brad Wright
lt;[EMAIL PROTECTED]> > Date: Thu, 5 Jul 2001 22:26:24 -0300 > To: [EMAIL PROTECTED] > Subject: [PHP] Re: changing to a different file in browser > > header ("http://www.example.com";); // Goes to example.com. > > -- > > > Julio Nobrega. > > A

Re: [PHP] Re: changing to a different file in browser

2001-07-05 Thread Brad Wright
, 5 Jul 2001 22:32:22 -0700 > To: "Php-General" <[EMAIL PROTECTED]> > Subject: RE: [PHP] Re: changing to a different file in browser > > put "Location" before the URL: > > header("Location: http://server.com/file.php";); > or > header(&q

Re: [PHP] Re: changing to a different file in browser

2001-07-05 Thread Brad Wright
blank line at the end of a file that you're > include()ing will break header. > > you could use output buffering, but i dont think > you really want to go to all that trouble for a simple > redirect :) > >> -Original Message- >> From: Chris Anders

RE: [PHP] Re: changing to a different file in browser

2001-07-05 Thread Brad Wright
** I still get the same error.. any ideas??? cheers, brad > From: Brian White <[EMAIL PROTECTED]> > Date: Fri, 06 Jul 2001 13:59:45 +1000 > To: Brad Wright <[EMAIL PROTECTED]>, PHP General List > <[EMAIL PROTECTED]> > Subject: Re: [PHP] Re: changing to a dif

Re: [PHP] Re: changing to a different file in browser

2001-07-05 Thread Brad Wright
06 Jul 2001 14:39:05 +1000 > To: Brad Wright <[EMAIL PROTECTED]>, PHP General List > <[EMAIL PROTECTED]> > Subject: RE: [PHP] Re: changing to a different file in browser > > You didn't quite get what I meant - in login.php, you have two lumps > of PHP code ( l

Re: [PHP] Re: changing to a different file in browser

2001-07-08 Thread Brad Wright
it was in fact the mistake that was causing the whole problem. Was there a reason?...too little sleep and too much caffeine I'd say :) > From: "motorpsychkill" <[EMAIL PROTECTED]> > Date: Fri, 6 Jul 2001 20:38:18 -1100 > To: "Brad Wright" <[EMAIL PROTE

[PHP] encrypting session variables

2001-07-09 Thread Brad Wright
Hi all, Is there a simple way to encrypt session variables. If so, is there a method to 'decode' the encrypted session variable when required?. Thanks in advance, Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: [PHP] encrypting session variables

2001-07-09 Thread Brad Wright
Tyrone, > Make an MD5 hash using the session variable. Make it again (with the same > seed) before using it, if the hashes don't match, it's been messed with. I'm sorry, I'm not sure what an MD5 hash is. Could you elaborate and/or point me towards some documentation. Thanks, Brad -- PHP Ge

[PHP] form action problem

2001-07-09 Thread Brad Wright
Hi all, i want to have a submit button on a page that has a php function (on the same page) as the action. ie. so when the 'Use functionA' button is pressed, the function 'functionA() ' is called (using php variables already defined before the form.) Thanks Brad -- PHP General Mail

[PHP] getting auto-incrementing fields

2001-07-12 Thread Brad Wright
Hi all, I have a situation where I am adding a new row to a (mySQL) table. One of the fields in table is auto-incrementing. When I add a new row, I would like to return the value of the auto-incrementing field (named 'Number') as $Number for the new row. Can anyone help?? Thanks in advance, Bra

[PHP] Whats wrong with this code?

2001-07-16 Thread Brad Wright
Hi all, Im getting mighty frustrated with this peice of code. It checks the first condition no probs, but the second IF statement doesnt work. So it will stop if it finds a du[plicate login, but cannot find duplicate passwords. the $num_rows2 variable always gets the value '0' even when there is a

Re: [PHP] Whats wrong with this code?

2001-07-16 Thread Brad Wright
Rasmus, you are dead right, it is returning 0 rows. I checked that before submiytting the original post. Sorry, i should have mentioned it. I guess the question is, why is it returning no rows? > From: Rasmus Lerdorf <[EMAIL PROTECTED]> > Date: Mon, 16 Jul 2001 19:56:29 -0700 (PDT

Re: [PHP] Whats wrong with this code?

2001-07-16 Thread Brad Wright
2:53:57 +0930 > To: Brad Wright <[EMAIL PROTECTED]>, PHP General List > <[EMAIL PROTECTED]> > Subject: Re: [PHP] Whats wrong with this code? > > On Tue, 17 Jul 2001 12:37, Brad Wright wrote: >>> From: Rasmus Lerdorf <[EMAIL PROTECTED]> >>> Date: Mon, 1

Re: [PHP] Whats wrong with this code?

2001-07-16 Thread Brad Wright
The only data in the table (Login_TB) is one row: Login = a, and Pass= password('a'). > From: Rasmus Lerdorf <[EMAIL PROTECTED]> > Date: Mon, 16 Jul 2001 20:24:44 -0700 (PDT) > To: Brad Wright <[EMAIL PROTECTED]> > Cc: PHP General List <[EMAIL PROTECTED]&g

[PHP] mysql_query problem

2001-07-16 Thread Brad Wright
Hi all', I have a mysql_query that reads: $testResult = mysql_query("SELECT * FROM login_table where Pass = password('$password')") or die ("ouch"); $num_rows = mysql_num_rows($testResult); the problem is that I keep getting a value of 0 for $num_rows when I know the table has 1 entry for PAs

Re: [PHP] mysql_query problem (more suggestions)

2001-07-16 Thread Brad Wright
7;echo password('$password') will (...does, i just double checked) causes a Fatal Error 'Undefined Function'. Nice try tho :) > From: Alvin Tan <[EMAIL PROTECTED]> > Date: Tue, 17 Jul 2001 13:07:45 +0800 > To: Brad Wright <[EMAIL PROTECTED]> > Subject:

Re: [PHP] mysql_query problem (more suggestions)

2001-07-16 Thread Brad Wright
Jason, I have tried what yoiu suggested. result is the same. > From: Jason Murray <[EMAIL PROTECTED]> > Date: Tue, 17 Jul 2001 15:28:11 +1000 > To: "'Brad Wright'" <[EMAIL PROTECTED]>, Alvin Tan > <[EMAIL PROTECTED]>, PHP General List <[EMAIL

Re: [PHP] mysql_query problem (more suggestions)

2001-07-16 Thread Brad Wright
lvin Tan <[EMAIL PROTECTED]> > Date: Tue, 17 Jul 2001 14:38:58 +0800 > To: Brad Wright <[EMAIL PROTECTED]>, Jason Murray > <[EMAIL PROTECTED]>, PHP General List > <[EMAIL PROTECTED]> > Subject: Re: [PHP] mysql_query problem (more suggestions) > > Hi ag

Re: [PHP] mysql_query problem (FINALLY FIXED !!!!!!!)

2001-07-17 Thread Brad Wright
is ol' fool. Cheers, Brad > From: "Christopher Allen" <[EMAIL PROTECTED]> > Date: Tue, 17 Jul 2001 09:11:05 -0500 > To: "Brad Wright" <[EMAIL PROTECTED]> > Subject: Re: [PHP] mysql_query problem (more suggestions) > > not right because this

[PHP] auto-incrementing field

2001-07-18 Thread Brad Wright
Hi all, Can anyone tell me if a mySQL table column of type 'varchar' can be set to auto increment. If it can would 'abc123' automatically increment, if so in what order... ie, would it increment like so: 'abc124 , abc125...abc999, abd000.' Or does 'auto_incremement' only work on

[PHP] adding the date to a database

2001-07-18 Thread Brad Wright
Hi, I have a database with a 'date' field. What is the syntax for using the (mysql) function 'getdate()', to insert the date into the DB table. the syntax I'm currently using is: $query = "Insert INTO visits (visName, date) values ('$name', getdate()) " ; $result = mysql_query($query,

Re: [PHP] MySql number/string comparing ideas...

2001-07-24 Thread Brad Wright
I would use something like this: Select * from table where value1 < 500 AND value2 < 100 hope this helps, brad > From: "elias" <[EMAIL PROTECTED]> > Date: Fri, 13 Jul 2001 07:06:26 -0700 > To: [EMAIL PROTECTED] > Subject: [PHP] MySql number/string comparing ideas... > > Hi! > > How is it pos

Re: [PHP] new lines in text fields

2001-07-24 Thread Brad Wright
use the 'nl2br' fuction‹ Inserts HTML line breaks before all newlines in a string > From: "Mat Marlow" <[EMAIL PROTECTED]> > Date: Fri, 6 Jul 2001 16:06:58 +0100 > To: [EMAIL PROTECTED] > Subject: [PHP] new lines in text fields > > Hi all, > I am in desperate need for a solution to HTML text fie

[PHP] session cookies not destroyed

2001-07-24 Thread Brad Wright
Hi all, I was wondering if anyone has had any problems with sessions and IE 5.0 (mac). As I (limitedly) understand it, the session cookie (kept by IE) should be destroyed when I quit IE. It should, therefor, not be there when I restart IE. HOWEVER.. I seem to get very unpredictable behaviour in

Re: [PHP] MySql number/string comparing ideas...

2001-07-25 Thread Brad Wright
ay...I just forgot about it and droped the YYYxYYY from my table and > only allowed numerical input, > > The problem is that I'm using the same field for two type of data storage... > > "Brad Wright" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]&quo