[PHP] date() and mktime() functions: weeknumbers and months.

2003-03-31 Thread Davy Obdam
Hi people, I would like to select news from my database bases on week/year and month/year. How can i do this.. I would like to pass two arguments in the query string, like news.php?week=14year=2003 or news.php?month=3year=2003. Can anybody help me.. Thanks in advance. I have been looking at the

Re: [PHP] date() and mktime() functions: weeknumbers and months.

2003-03-31 Thread Marek Kilimajer
Check out mysql manual, section 6.3.4 - Date and Time Functions, example $condition=''; if($GET['week']) $condition .= WEEK(date)='$_GET[week]' AND ; if($GET['year']) $condition .= YEAR(date)='$_GET[week]' AND ; and so on then use the condition: $sql = SELECT * FROM news WHERE $condition 1;

[PHP] Dynamic include_path

2003-03-31 Thread Derek J. Belrose
Hey folks, What we are looking to do is give a specific include path for each site in our customer base. This running on MacOSX so basically we have sites set up like: /Users/username/Sites/site.com/phpinc There can be numerous sites in each users directory and numerous users in /Users.

[PHP] exec different result from command line

2003-03-31 Thread Jan-Hendrik
Hi folks ! I've got a strage problem I don't know how to solve: I am calling ImageMagick's identify. If I do that via command line, I get a textline as result with all images. If I do the same with exec or passthru, I only get results with certain image-types. Does anyone have any idea of what

[PHP] [Newbie] Password()

2003-03-31 Thread Bobby Rahman
Hi, in my code I am trying to send an email (containing a password) to a user when he has forgotten his password. The problem is that security leads to needing to encrypt passwords in the database. Im using the password function within mysql. Is there any way of reversing the password

Re: [PHP] [Newbie] Password()

2003-03-31 Thread Chris Hayes
in my code I am trying to send an email (containing a password) to a user when he has forgotten his password. The problem is that security leads to needing to encrypt passwords in the database. Im using the password function within mysql. Is there any way of reversing the password function()

RE: [PHP] [Newbie] Password()

2003-03-31 Thread Jon Haworth
Hi Bobby, In my code I am trying to send an email (containing a password) to a user when he has forgotten his password. [...] The problem is that security leads to needing to encrypt passwords in the database. Im using the password function within mysql. Is there any way of reversing the

Re: [PHP] File access denied!!!

2003-03-31 Thread Marek Kilimajer
You need to chmod o+r them (in the ftp client). Also the path must be readable by the web server. You might want to set up the ftp server to give these permisions automaticaly Joakim Larsson wrote: I am running a ftp server on my mac along with the webserver on OS 10.2. The files that i upload

RE: [PHP] Microsoft SQL Server varchar(500) field text concatenated at 255 characters.

2003-03-31 Thread Adam Voigt
Yeah, umm, Microsoft SQL Server (mssql) is different then MySQL Server (mysql), I believe the correct answer, is if your selecing a VARCHAR longer then 255 is to cast it, example: SELECT CAST(somefield AS TEXT) AS somefield FROM table; That will work. On Fri, 2003-03-28 at 20:10, Daevid Vincent

Re: [PHP] Classes

2003-03-31 Thread Marek Kilimajer
including or requiring a file does not change the working directory, so if you have this structure: index.php A/ClassA.class.php B/ClassB.class.php and index.php includes A/ClassA.class.php, from ClassA.class.php you need to use include('B/ClassB.class.php'); Donahue Ben wrote: I have a

Re: [PHP] line feeds

2003-03-31 Thread Marek Kilimajer
$string = str_replace(\n,'', str_replace(\r,'', $string)); Diana Castillo wrote: How can I remove all line feeds from a document? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] accessing protected remote files

2003-03-31 Thread David Feldman
I have a script that needs to open a remote file on another Web server, which may or may not be protected (for example, by an htaccess file). What would be the best way to check if it's protected, and if so, prompt the user for username and password to open it? Thanks. --Dave -- PHP General

Re: [PHP] accessing protected remote files

2003-03-31 Thread Marek Kilimajer
You need to use socket functions and check the response headers David Feldman wrote: I have a script that needs to open a remote file on another Web server, which may or may not be protected (for example, by an htaccess file). What would be the best way to check if it's protected, and if so,

Re: [PHP] date() and mktime() functions: weeknumbers and months.

2003-03-31 Thread Jason Wong
On Monday 31 March 2003 22:07, Davy Obdam wrote: I would like to select news from my database bases on week/year and month/year. How can i do this.. I would like to pass two arguments in the query string, like news.php?week=14year=2003 or news.php?month=3year=2003. Can anybody help me..

[PHP] GMT strtotime() problem today!!

2003-03-31 Thread Stuart Cochrane
Im having big problems - I have a script that runs on over 250 Servers, all are running NT4. here is the script: [php] function last_sunday() { return gmdate(Y-m-d, strtotime(Last Sunday)); } echo Last Sunday is returned as: .last_sunday(); [/php] Some servers have 'automatically adjust

Re: [PHP] Adding a URL

2003-03-31 Thread Scott Thompson
Thank you, your suggestions worked perfectly! ~Scott Don Read wrote: On 30-Mar-2003 Scott Thompson wrote: Hi, I am using the following code to query a database and build an HTML table. snip /* Printing results in HTML */ print table\n; while ($line = mysql_fetch_array($result,

[PHP] PHP and Front Page XP

2003-03-31 Thread Tomás Liendo
Hello people, I have the following strange problem: I designed a form with Front Page XP, and with PHP I save the fields in a MySQL data base. All fields work perfect, except one. This is a control to upload files: INPUT type=file name=f1 The problem is that in the data base the value selected

Re: [PHP] accessing protected remote files

2003-03-31 Thread David Feldman
That's what I thought too, but it's not happening...fopen() is simply returning an error. --Dave On Monday, March 31, 2003, at 09:35 AM, [EMAIL PROTECTED] wrote: Assuming you are retrieving this file via http/https then it's really the remote server that will enforce the access control in

[PHP] MSSQL/PHP Problem

2003-03-31 Thread Poon, Kelvin (Infomart)
Hi, I have this problem retrieving data from a mssql table with PHP. I have this in my mssql table column: Globe and Mail data are retrieved and processed for CustomSearch. On the R30, the crontab entry: 0 4 * * 1-6 /usr1/applic/ntgm/ntgm_get.pl will run the Perl script at 4 a.m. everyday to

Re: [PHP] Parsing CSS files

2003-03-31 Thread Liam Gibbs
Yeah... the same way you made your web server parse files with a .php extension. Just repeat the same procedure for a .css extension. if you have cpanel you can add the extension from there. Yeah, I need to find out where to add the CSS extension to my list of parsable files. I tried just

Re: [PHP] PHP and Front Page XP

2003-03-31 Thread Marek Kilimajer
$f1 is the temporary file namen your server, you need to use $f1_name, or even better $_FILES['f1']['name'] Tomás Liendo wrote: Hello people, I have the following strange problem: I designed a form with Front Page XP, and with PHP I save the fields in a MySQL data base. All fields work

[PHP] Memory

2003-03-31 Thread Php general
Hello, Is there a way to know the memory that was used to execute a php page ? Thanks ! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: XML+XSLT or Smarty again??

2003-03-31 Thread Pete James
This xml+html+xslt paradigm provides great separation, especially when viewed in light of the traditional xslt=html+code method. I've used it with good success. http://www.xml.com/pub/a/2000/07/26/xslt/xsltstyle.html HTH. Pete. -- Pusher http://www.shaman.ca/pusher A news aggregator with

Re: [PHP] Crystal Reports in PHP via COM - SelectPrinter problem

2003-03-31 Thread Andrew Powell
Crystal Decisions provided a resolution to the problem. If the SelectPrinter method is called, the PaperOrientation method must also be set. So, to access Crystal Reports from PHP, the following code is used: $crapp = new COM(CrystalDesignRunTime.Application); $creport =

Re: [PHP] Re: XML+XSLT or Smarty again??

2003-03-31 Thread rush
Pete James [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] This xml+html+xslt paradigm provides great separation, especially when viewed in light of the traditional xslt=html+code method. I've used it with good success. This does relieve the problem of dirty templates, but with some

Re: [PHP] Re: XML+XSLT or Smarty again??

2003-03-31 Thread rush
Pete James [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] This xml+html+xslt paradigm provides great separation, especially when viewed in light of the traditional xslt=html+code method. I've used it with good success. This does relieve the problem of dirty templates, but with some

[PHP] Date Problem - Last Day Of Month

2003-03-31 Thread Vinesh Hansjee
Hi there, can anyone tell me how to fix my code so that on the last day of the month, my code doesn't repeat the months... What the code suppose to do is, makes a drop down box from which you can select the month, and if its the current month the box is already selected. select name=month ? for

Re: [PHP] Date Problem - Last Day Of Month

2003-03-31 Thread Liam Gibbs
Hi there, can anyone tell me how to fix my code so that on the last day of the month, my code doesn't repeat the months... I'm not sure what you mean by this, but I can be a moron on this list sometimes and the clear answer usually comes to me about 2 seconds after I hit the send button. Do you

Re: [PHP] Re: XML+XSLT or Smarty again??

2003-03-31 Thread Hardik Doshi
Hi, From my point of view, XML+XSLT increases complexity with very less number of advantages. Fundamental of using XML+XSLT with PHP is to seperate HTML code from the PHP and database code. But in the following article, it shows XSL stylesheet comes with full of logic. Do we really need this

Re: [PHP] Parsing CSS files

2003-03-31 Thread Chris Hewitt
Liam Gibbs wrote: Yeah... the same way you made your web server parse files with a .php extension. Just repeat the same procedure for a .css extension. if you have cpanel you can add the extension from there. Yeah, I need to find out where to add the CSS extension to my list of parsable files.

Re: [PHP] Re: XML+XSLT or Smarty again??

2003-03-31 Thread Pete James
IMO, Smarty is just an abstraction of PHP. Smarty templates are HTML templates, but they still contain their own application logic for looping, etc, and so are still not a real separation (or are *dirty*, as 'rush' calls it). XML+HTML+XSLT (or Template Tamer from what I can gather) take it

Re: [PHP] Date Problem - Last Day Of Month

2003-03-31 Thread Daniel Guerrier
change for ($i=1; $i=12; $i++) to for ($i=1; $i12; $i++) --- Vinesh Hansjee [EMAIL PROTECTED] wrote: Hi there, can anyone tell me how to fix my code so that on the last day of the month, my code doesn't repeat the months... What the code suppose to do is, makes a drop down box from which

Re: [PHP] GNU Open Source

2003-03-31 Thread John Taylor-Johnston
Hi, This is a list for questions about PHP. Look in the titlebar of your browser when you go to www.php.net He was asking *where* PHP stands (regarding licenses), not *what* PHP stands for. Maybe PHP FAQ should have something about licenses. Indeed, I did find somehting ... in the licence

Re: [PHP] Date Problem - Last Day Of Month

2003-03-31 Thread Kevin Stone
- Original Message - From: Vinesh Hansjee [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 31, 2003 6:55 AM Subject: [PHP] Date Problem - Last Day Of Month Hi there, can anyone tell me how to fix my code so that on the last day of the month, my code doesn't repeat the

RE: [PHP] Is there a PHP for Dummies?

2003-03-31 Thread Jennifer Goodie
I tend to get more out of the users comments than the actual manual.. It is possible that is because you don't want to put the time into figuring things out for yourself. It's a lot easier to post a ton of RTFM questions than to actually read the manual or research your question. I seem to

Re: [PHP] GNU Open Source

2003-03-31 Thread Chris Shiflett
--- John Taylor-Johnston [EMAIL PROTECTED] wrote: Rasmus: I understand there are differences between GNU.org OpenSource.org but I didn't mean to offend anyone. Sorry Rasmus, but I was surprised you would answer that way. Is this a touchy subject? The General list should be the correct place

RE: [PHP] require/include from a different directory

2003-03-31 Thread Jennifer Goodie
If the includes are within the website, using $_SERVER[DOCUMENT_ROOT]/pathtofile/file is a good way to go. -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Saturday, March 29, 2003 2:10 PM To: 'Greg Macek'; [EMAIL PROTECTED] Subject: RE: [PHP] require/include from a

[PHP] php with mcrypt

2003-03-31 Thread Gilberto Garcia Jr.
Hey guys, How can I enable php to work with mcrypt functions? I´m using debian woody linux. I´ve had installed libmcrypt already, from debian cds. But I dont know how to make php understands this lib. thanks --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system

[PHP] php and mysql

2003-03-31 Thread Tyler Durdin
I have a db with events in it. i would like to pull the events out via php, but i would like them to be ordered by month number (1-12). When I do this (Select blah blah From blah Order By Month_Start ASC) it orders the months by number, but it starts with october (month 10) I am pretty sure it

RE: [PHP] date() and mktime() functions: weeknumbers and months.

2003-03-31 Thread Davy Obdam
Thanks Jason and Marek, I was thinking to difficult, Thanks for the quick responses. Best regards, Davy Obdam -Oorspronkelijk bericht- Van: Jason Wong [mailto:[EMAIL PROTECTED] Verzonden: maandag 31 maart 2003 16:36 Aan: [EMAIL PROTECTED] Onderwerp: Re: [PHP] date() and mktime()

php-general Digest 31 Mar 2003 19:42:36 -0000 Issue 1971

2003-03-31 Thread php-general-digest-help
php-general Digest 31 Mar 2003 19:42:36 - Issue 1971 Topics (messages 141681 through 141723): Dynamic include_path 141681 by: Derek J. Belrose exec different result from command line 141682 by: Jan-Hendrik [Newbie] Password() 141683 by: Bobby Rahman 141684

[PHP] if statment

2003-03-31 Thread Tim Haskins
I'm used to asp and not php, but what would the code be for and if statement that was like: if $HTTP_GET_VARS[pr_ID] = nothing then there are no products end if Also does anyone know a great resource that lists different examples of php variables, if statements, and so on? Thanks so much! --

RE: [PHP] if statment

2003-03-31 Thread Jennifer Goodie
if( $HTTP_GET_VARS[pr_ID] == nothing){ echo there are no products; } http://www.php.net/manual/en/control-structures.php http://www.php.net/manual/en/ -Original Message- From: Tim Haskins [mailto:[EMAIL PROTECTED] Sent: Monday, March 31, 2003 11:56 AM To: [EMAIL PROTECTED]

Re: [PHP] Parsing CSS files

2003-03-31 Thread Leif K-Brooks
Why do you need to do this in the first place? If you're trying to create dynamic CSS, the .php extension will be fine as long as you send the proper content-type header. Liam Gibbs wrote: Is there any way of making PHP parse files with a CSS extension? -- The above message is encrypted

Re: [PHP] if statment

2003-03-31 Thread Tim Haskins
My bad, I actually meant that the nothing was like, if the pr_ID in the url is empty then show the following text. -- Tim Haskins Jennifer Goodie [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] if( $HTTP_GET_VARS[pr_ID] == nothing){ echo there are no products; }

RE: [PHP] if statment

2003-03-31 Thread Jennifer Goodie
so change it to -Original Message- From: Tim Haskins [mailto:[EMAIL PROTECTED] Sent: Monday, March 31, 2003 12:12 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] if statment My bad, I actually meant that the nothing was like, if the pr_ID in the url is empty then show the following text.

[PHP] Re: if statment

2003-03-31 Thread R'twick Niceorgaw
if ( !isset($HTTP_GET_VARS[pr_ID]) OR empty($HTTP_GET_VARS[pr_ID]) ) HTH R'twick Tim Haskins [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm used to asp and not php, but what would the code be for and if statement that was like: if $HTTP_GET_VARS[pr_ID] = nothing then there

Re: [PHP] if statment

2003-03-31 Thread Tim Haskins
Wow, that's weird- I had just tried it and that didn't work, so I thought it might be some special php thing goin on- thanks for your help! -- Tim Haskins Jennifer Goodie [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] so change it to -Original Message- From: Tim Haskins

Re: [PHP] if statment

2003-03-31 Thread Pete James
Also, take a look at isset() and empty() http://php.net/empty http://php.net/isset Jennifer Goodie wrote: so change it to -Original Message- From: Tim Haskins [mailto:[EMAIL PROTECTED] Sent: Monday, March 31, 2003 12:12 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] if statment My bad, I

RE: [PHP] if statment

2003-03-31 Thread Jennifer Goodie
I'm pretty sure that if it was in a form but left blank isset() won't work because it is set in the globals, it is just empty. I've never used empty(), so I cannot comment on its behavior. -Original Message- From: Pete James [mailto:[EMAIL PROTECTED] Sent: Monday, March 31, 2003 12:17 PM

RE: [PHP] Excel

2003-03-31 Thread jon roig
I've got one here -- http://jonroig.com/modules.php?op=modloadname=Newsfile=articlesid=55 (Watch out, url may wrap wrong) That is, if you're just looking to export data to excel... -- jon -Original Message- From: Evan Nemerson [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27,

RE: [PHP] COM

2003-03-31 Thread jon roig
Is there some reason you want to access it through com? I'm assuming that you've added the access db as an odbc data source? I'm not sure, but it seems like you might be using the wrong syntax. You might want to check out this: http://www.php.net/manual/en/ref.odbc.php ... or... this, which is

Re: [PHP] if statment

2003-03-31 Thread Tim Haskins
below is what I have currently ?php if ($HTTP_GET_VARS[id] == ) { ? its empty ?php }? Now when I change the == to I receive the following error: Notice: Undefined index: id in c:\inetpub\wwwroot\_\users.php on line 103 Why would that not work - In asp it does, but I can't get it workin in

RE: [PHP] if statment

2003-03-31 Thread Jennifer Goodie
Because not equal is !=, not I think I posted a link to the documentation a few eamils ago in this thread. Check it out, these are all really easy syntax questions, so you'll save yourself much hair pulling by just reading the section on basic syntax. -Original Message- From: Tim

[PHP] str_replace() problem

2003-03-31 Thread René Fournier
I am performing a str_replace() on a large string, and everything works fine, except that two of the elements I'm searching for (and replacing) have the same first letters. To keep it the issue clear, here's a simple example of what I'm talking about: Blue Blueberry Now, if I use:

Re: [PHP] if statment

2003-03-31 Thread Chris Shiflett
--- Tim Haskins [EMAIL PROTECTED] wrote: Now when I change the == to I receive the following error: Notice: Undefined index: id in c:\inetpub\wwwroot\_\users.php on line 103 Why would that not work - In asp it does, but I can't get it workin in php. Are you kidding? You do realize that

RE: [PHP] Re: XML+XSLT or Smarty again??

2003-03-31 Thread Dan Rossi
wow thanks ! i've been looking for some example like this for a very long time , does it mean that the templates becomes similar to the template block ? -Original Message- From: Pete James [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 01, 2003 2:08 AM To: [EMAIL PROTECTED] Subject: Re:

Re: [PHP] GNU Open Source

2003-03-31 Thread John . Taylor . Johnston
Rasmus, I hardly call it a school paper. I haven't done one of them in 25 years. But if you are not the one to ask, nor is the general list not the place to ask, who do I email or where do I post to find out more about your statement at: http://www.php.net/license/ GPL enforces many

[PHP] Question on response time, SQL vs. PHP

2003-03-31 Thread Liam Gibbs
I'm trying to do a count(*) in SQL. Would it be faster to do a or b below? a: just do a simple query, and use mysql_num_rows() to return the row count; or b: do the count(*) and use mysql_fetch_row() to return the result. I guess it would have to do more with SQL response time (is it faster to

Re: [PHP] str_replace() problem

2003-03-31 Thread Kevin Stone
- Original Message - From: Ren Fournier [EMAIL PROTECTED] To: php [EMAIL PROTECTED] Sent: Monday, March 31, 2003 1:52 PM Subject: [PHP] str_replace() problem I am performing a str_replace() on a large string, and everything works fine, except that two of the elements I'm searching for

RE: [PHP] str_replace() problem

2003-03-31 Thread Johnson, Kirk
You could replace the longer one, Blueberry, first. Then, the only remaining occurrences of Blue will be ones that you really want. Kirk I am performing a str_replace() on a large string, and everything works fine, except that two of the elements I'm searching for (and replacing) have

Re: [PHP] str_replace() problem

2003-03-31 Thread Marcus Rasmussen
Just change the order and do the search and replace on Blueberry before doing it on Blue. Ei: str_replace(Blueberry,Strawberry,$paragraph); str_replace(Blue,Red,$paragraph); or: str_replace(array(Blueberry, Blue), array(Strawberry, Red), $paragraph);

RE: [PHP] Question on response time, SQL vs. PHP

2003-03-31 Thread Jennifer Goodie
It is faster to do a count(*) -Original Message- From: Liam Gibbs [mailto:[EMAIL PROTECTED] Sent: Monday, March 31, 2003 1:31 PM To: php list Subject: [PHP] Question on response time, SQL vs. PHP I'm trying to do a count(*) in SQL. Would it be faster to do a or b below? a: just do a

[PHP] Re: if statment

2003-03-31 Thread Ryan Vennell
if ($HTTP_GET_VARS[pr_ID] = nothing ) { } else if ($HTTP_GET_VARS[pr_ID] = something) { } else { } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] problems with curl + exec

2003-03-31 Thread Dan Rossi
hi guys , this is a wierd problem , for some reason wget is fine to return stderr to stdoutput , i'll get an exact error in key 4 , ie OK or HTTP 404 , but with curl it is not returning the exact errorode or outputting an error ? here are my instructions although for a 404 instead of 22 i am

[PHP] problem with mysql.

2003-03-31 Thread Ryan Vennell
ok i've reinstalled phpseveral times now, reinstalled mysql, and even reinstalled apache once but i am still getting this same problem. when configuring php i use --with-mysql and it configures just fine. i've even added an =/path/to/php after it to no avail. i keep getting this on pages

[PHP] Re: if statment

2003-03-31 Thread Ryan Vennell
in addition to my last response, if you go to http://www.php.net/manual/en/ you can find more than you ever wanted to know about php. just use the search at the top. Tim Haskins[EMAIL PROTECTED] 03/31/03 01:56PM I'm used to asp and not php, but what would the code be for and if statement

RE: [PHP] problems with curl + exec

2003-03-31 Thread Dan Rossi
sorry worked it out i had stderr in the escape string -Original Message- From: Dan Rossi [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 01, 2003 7:39 AM To: Php-General Subject: [PHP] problems with curl + exec hi guys , this is a wierd problem , for some reason wget is fine to return

RE: [PHP] problem with mysql.

2003-03-31 Thread Jon Haworth
Hi Ryan, when configuring php i use --with-mysql and it configures just fine. i've even added an =/path/to/php after it to no avail. Try --with-mysql=/path/to/mysql instead of --with-mysql=/path/to/php. Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Problem installing PHP 4.3.1 - won't compile due to odd error.

2003-03-31 Thread Don
Hi, Trying to install PHP 4.3.1 but getting the following error message: configure error: cURL version 7.9.8 or later is required to compile php with cURL support I have curl installed; when I issue a curl -V, the version number reported is 7.10.3 Can anyone tell me what the install is looking

[PHP] Files uploads problem

2003-03-31 Thread Adrian Greeman
I am a learner in PHP - I have been using Larry Ullman's Peachpit beginners book which I have found useful to take me through the basics. But the examples were written before the general applicaton of the new $_POST, $_GET and similar arrays. It has been valuable learning to change the code for

Re: [PHP] if statment

2003-03-31 Thread Don Read
On 31-Mar-2003 Tim Haskins wrote: My bad, I actually meant that the nothing was like, if the pr_ID in the url is empty then show the following text. if (empty($HTTP_GET_VARS[pr_ID])) Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before

Re: [PHP] if statment

2003-03-31 Thread Leif K-Brooks
You should be using if(!isset($HTTP_GET_VARS['id'])){ Otherwise, it generates an eror when it simply doesn't exist. and nothing (an unset variable) are NOT the same. Tim Haskins wrote: below is what I have currently ?php if ($HTTP_GET_VARS[id] == ) { ? its empty ?php }? Now when I change

Re: [PHP] Files uploads problem

2003-03-31 Thread Kevin Stone
- Original Message - From: Adrian Greeman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 31, 2003 3:04 PM Subject: [PHP] Files uploads problem I am a learner in PHP - I have been using Larry Ullman's Peachpit beginners book which I have found useful to take me through the

RE: [PHP] problem with mysql.

2003-03-31 Thread Ryan Vennell
Sorry about that. i did use /path/to/mysql. i wasnt paying attention when writing my pervious post. -Ryan Jon Haworth[EMAIL PROTECTED] 03/31/03 04:00PM Hi Ryan, when configuring php i use --with-mysql and it configures just fine. i've even added an =/path/to/php after it to no avail.

[PHP] Re: Files uploads problem

2003-03-31 Thread Tim Burden
You should tell us 1. What happens 2. What you expected to happen that didn't happen. As Kevin points out your enctype will be wrong but if that doesn't fix it then I'd guess at the Apache 2. But tell us what the output is anyway. - Original Message - From: Adrian Greeman [EMAIL

Re: [PHP] problem with mysql.

2003-03-31 Thread Tim Burden
Right, defaults to /usr/local/ for the source versions of MySQL, in that case, use --with-mysql=/usr/local - Original Message - From: Jon Haworth [EMAIL PROTECTED] Newsgroups: php.general To: Ryan Vennell [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, March 31, 2003 5:00 PM Subject:

[PHP] Re: php and mysql

2003-03-31 Thread Tim Burden
Assuming Month_Start is stored in MySQL date format (-mm-dd) you could Select blah blah From blah Order By DATE_FORMAT(Month_Start,%m) ASC The %m will pad on the zeroes. http://www.mysql.com/doc/en/Date_and_time_functions.html - Original Message - From: Tyler Durdin [EMAIL PROTECTED]

[PHP] excel 2 csv 2 mysql

2003-03-31 Thread daniel
hi guys i am trying to work out how to dynamically be able to upload an excel file , export it to csv to be able to import into mysql , is there any examples out there ? fopen gave me binary code :| -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] global var.

2003-03-31 Thread Sebastian
hello all, $variable = $id; // some other stuff @mysql_query here $id = mysql_insert_id(); to the question: How do I get $id from insert_id() to pass to $variable above? Hard to explain the situation i am in, but the query has to be below $variable, is it possible to 'globalize' $id

RE: [PHP] global var.

2003-03-31 Thread Jon Haworth
Hi Sebastian, $variable = $id; // some other stuff @mysql_query here $id = mysql_insert_id(); How do I get $id from insert_id() to pass to $variable above? Hard to explain the situation i am in, but the query has to be below $variable ::blink:: Perhaps something like: $loc =

[PHP] can't get imagecopy, etc. function to work.

2003-03-31 Thread Wo Chang
Dear Experts, Seems like I can't use any of the followings even though I'm running PHP 4.3.2-RC1: * imagecreatefromjpeg * imagecopy * etc. Am I right the gd-2.x has already integrated with PHP 4.3.2-RC1 and the gd also has the jpeg integrated? Or, should do I have to bring in the jpeg-6x

RE: [PHP] excel 2 csv 2 mysql

2003-03-31 Thread jon roig
Yeah... you're going to have to use COM or something similar on a windows server to get effective access to the server. Another option is dynamically adding at as an odbc datasource and querying it. Again, this will only work on a windows server... It's all much easier if you can convince users

[PHP] cookies with internet explorer on macs

2003-03-31 Thread Jimmy Brake
Hi! The cookies i set for people using Internet Explorer on mac (OS X or mac os 8-9) are not staying alive as long as I would like(12hours) they only last for a few hours or sometimes even a few minutes, the time on the end users computers are set correctly. IE on windows is fine and Mozilla and

Re: [PHP] excel 2 csv 2 mysql

2003-03-31 Thread Justin French
on 01/04/03 11:48 AM, daniel ([EMAIL PROTECTED]) wrote: hi guys i am trying to work out how to dynamically be able to upload an excel file , export it to csv to be able to import into mysql , is there any examples out there ? fopen gave me binary code :| also see fgetscsv() Justin -- PHP

Re: [PHP] GNU Open Source

2003-03-31 Thread Justin French
on 01/04/03 8:01 AM, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: GPL enforces many restrictions on what can and cannot be done with the licensed code. The point is, PHP is not released under GPL any more -- it's under QPL, so this thread hardly seems relevant to any PHP list -- just my two

[PHP] parse_str()

2003-03-31 Thread Jose
I might be wrong here, but with the code below I would expect $_GET to be filled and the script to output the next line: ?php $example_string = 'action=kickitem=me'; parse_str($example_string); var_dump($_GET); ? // expected output: // // array(2) { [action]= string(4) kick

RE: [PHP] parse_str()

2003-03-31 Thread Jose
I might be wrong here, but with the code below I would expect $_GET to be filled and the script to output the next line: ?php $example_string = 'action=kickitem=me'; parse_str($example_string); var_dump($_GET); ? // expected output: // // array(2) { [action]=

[PHP] Re: Parsing XML CDATA errors?

2003-03-31 Thread Lock Ct.
i think it should be line 43 : $person_data[$counter][description] .= $data; wish you luck ! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] global var.

2003-03-31 Thread Marcus Rasmussen
Putting an sign in front of the $id in the first line should do the trick: $variable = $id; A short example: $bar = 0; $foo = $bar; $bar = 2; print $foo; //prints 2 __ Marcus Rasmussen [EMAIL PROTECTED] www.marcusr.dk

RE: [PHP] parse_str()

2003-03-31 Thread Marcus Rasmussen
This should work: parse_str($example_string, $_GET); ___ Marcus Rasmussen [EMAIL PROTECTED] www.marcusr.dk - On 01-04-2003 at 03:20 Jose wrote: - I might

RE: [PHP] excel 2 csv 2 mysql

2003-03-31 Thread daniel
http://www.ice.ru/~vitus/catdoc/ anyone seen this ? its pretty much wot i needed, havent used it yet though = Original Message From [EMAIL PROTECTED] = Yeah... you're going to have to use COM or something similar on a windows server to get effective access to the server. Another option

Re: [PHP] global var.

2003-03-31 Thread Sebastian
Hmm, interesting.. i dunno why it doesn't work for me, here is a bit of the code, $var isn't getting the output of $id, any ideas? $var = $id; if( ! $forg = resizer_main(image,image_$var, blah, blah); $org = getimagesize( $root/$forg ); $result = @mysql_query(INSERT INTO images blah

[PHP] Validate MySQL date

2003-03-31 Thread Ben C.
How do I easily check to see if a MySQL formatted date is valid such as if a user enters 2003/02/28 would return true 2003/02/31 would return false I have check the manual and other resources but can't come up with anything.

Re: [PHP] Question on response time, SQL vs. PHP

2003-03-31 Thread Leif K-Brooks
It's faster to use count(*), because it just has to fetch a count of the rows (but not the rows themselves). If you're retrieving the rows anyway, you should use mysql_num_rows, Liam Gibbs wrote: I'm trying to do a count(*) in SQL. Would it be faster to do a or b below? a: just do a simple

[PHP] Is_readable()

2003-03-31 Thread Liam Gibbs
Is there anything I should know about is_readable? It seems to find a file unreadable whether the permissions are 000 or 777.

Re: [PHP] cookies with internet explorer on macs

2003-03-31 Thread Lowell Allen
From: Jimmy Brake [EMAIL PROTECTED] The cookies i set for people using Internet Explorer on mac (OS X or mac os 8-9) are not staying alive as long as I would like(12hours) they only last for a few hours or sometimes even a few minutes, the time on the end users computers are set correctly.

Re: [PHP] cookies with internet explorer on macs

2003-03-31 Thread Jimmy Brake
thanks ... lots of my customers use entourage ... On Mon, 2003-03-31 at 20:53, Lowell Allen wrote: From: Jimmy Brake [EMAIL PROTECTED] The cookies i set for people using Internet Explorer on mac (OS X or mac os 8-9) are not staying alive as long as I would like(12hours) they only last

RE: [PHP] excel 2 csv 2 mysql

2003-03-31 Thread daniel
ok guys are you ready , /www_tools/apache/catdoc/bin/xls2csv test.xls test2.csv gave me this column1`,column2,column3 faffafs,fsafsa,fsafs fssfa,fasfs,fasfs fasaf,fasfs,asffaf fafs,sfafsa,fasfas sfafs,fssfa,fassfa sfasfa,asfafs,fasfas asffas,sfaaf,sfafsa fssaf,asffsa,asffas

RE: [PHP] excel 2 csv 2 mysql

2003-03-31 Thread daniel
ok it works now /www_tools/apache/catdoc/bin/xls2csv -q 0 test.xls test2.csv column1`,column2,column3 faffafs,fsafsa,fsafs fssfa,fasfs,fasfs fasaf,fasfs,asffaf fafs,sfafsa,fasfas sfafs,fssfa,fassfa sfasfa,asfafs,fasfas asffas,sfaaf,sfafsa fssaf,asffsa,asffas sfasfa,sfasaf,fasasf then i can

  1   2   >