[PHP] newbie... - undefined var

2002-08-26 Thread Matt Zur
I'm just starting to learn php and have a quick question. I'm making a site with file includes. so for example my default page will be: index.php and services page with be called services.php BUT... I want to link to services via this method: index.php?vw=services Still no problem there. BUT

[PHP] Problems with the safe mode...

2002-08-26 Thread Sebastian Tomasino
Hi everyone... I have some problem with the safe mode of php. i get this errors when i try to access the file. -- PHP Warning: SAFE MODE Restriction in effect. The script whose uid/gid is -1/-1 is not allowed to access data.txt

Re: [PHP] newbie... - undefined var

2002-08-26 Thread Chris Shiflett
Matt Zur wrote: > BUT on the index.php I want to write this if statement: > > if ($vw == "") { > write this code > } If you really mean to see if the variable has been set, try this instead: if (!isset($vw)) { echo "variable is not set"; } Happy hacking. Chris -- PHP General Mailing

Re: [PHP] Problems with the safe mode...

2002-08-26 Thread @ Edwin
I'm not sure but... Check your httpd.conf and see if you're running Apache as "Group -1". Change this to "nobody" or better yet make a new user/group (like apache/apache for example) for your Apache and change the lines- User nobody Group -1 to User apache Group apache Then, restart

FW: [PHP] newbie... - undefined var

2002-08-26 Thread Jonni
try using a switch statement. > -Original Message- > From: Matt Zur [mailto:[EMAIL PROTECTED]] > Sent: Monday, August 26, 2002 12:41 AM > To: [EMAIL PROTECTED] > Subject: [PHP] newbie... - undefined var > > > I'm just starting to learn php and have a quick question. I'm making a

Re: [PHP] newbie... - undefined var

2002-08-26 Thread @ Edwin
Or, perhaps, you should do: (if register_globals off) if (!isset($_GET['vw'])){ echo "variable is not set"; } Of course, you can also do: (if you want to--for some reason) if ($_GET['vw'] == ""){ write this code } - E PS > Do all vars in PHP have to be defined first? No. > >M

[PHP] Re: known bugs in current CHM, contribution appreciated!

2002-08-26 Thread Dallas Thunder
I'm using IE6 under WinXP, I've encountered all the three known bugs in Sample7. The third one is really unacceptable. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Blank db entry??

2002-08-26 Thread @ Edwin
I think you can use this: http://www.php.net/manual/en/function.mysql-num-rows.php - E > >Forgot to add one thing - I don't need to add the new number after detection >to the db but rather just print it out > > >"Johnp" <[EMAIL PROTECTED]> wrote in message >[EMAIL PROTECTED]">news:[EMAIL PROT

[PHP] Re: Attachements

2002-08-26 Thread MikeTsapenko
"Oliver Witt" <[EMAIL PROTECTED]> ???/ ? ?: news:[EMAIL PROTECTED]... > Hi, > Can you attach files to emails and send them through a php script? If > so, how? > Kind regards, > Oliver > You can use this function. It can attach just one file. $mode = message type: pla

[PHP] Virtual includes

2002-08-26 Thread Gregory Barker
Hi all, I'm trying include .php files which reside in alternative directories or sub-directories. Such as a file which reside in www/chat/page.php, and for this page I would like to include a file which resides in www/forum/include/ I've tried the following which just results in a error: include

Re: [PHP] Virtual includes

2002-08-26 Thread David T-G
Gregory -- [You know, you shouldn't just reply to any old message and start a new topic; send a fresh message to the list instead so that it will be the start of a new thread.] ...and then Gregory Barker said... % % Hi all, Hello! % % I'm trying include .php files which reside in alternativ

RE: [PHP] Virtual includes

2002-08-26 Thread Scott Houseman
Hi there. This should work I think. include( '../forum/include/test.php' ); This uses the path in relation to the current directory the script resides in. Regards -Scott > -Original Message- > From: Gregory Barker [mailto:[EMAIL PROTECTED]] > Sent: 26 August 2002 11:12 > To: [EMAIL PR

Re: [PHP] carriage return/line break problem

2002-08-26 Thread David T-G
Pag -- ...and then Pag said... % % At 16:46 24-08-2002 +0200, Bas Jobsen wrote: % >use nl2br($content); % % I assume i should use that function when sending to the page, Right; it will convert newlines to linebreaks. % after retrieving the text from the DB, right? Cant i do somethin

[PHP] Re: Blank db entry??

2002-08-26 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Forgot to add one thing - I don't need to add the new number after detection > to the db but rather just print it out > > > "Johnp" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Ok I have a scrip

[PHP] Re: Virtual includes

2002-08-26 Thread David Robley
In article <01d301c24ce0$a818d460$63a429c4@tech01>, [EMAIL PROTECTED] says... > Hi all, > > I'm trying include .php files which reside in alternative directories or > sub-directories. Such as a file which reside in www/chat/page.php, and for > this page I would like to include a file which resid

Re: [PHP] php equivalient of pushd?

2002-08-26 Thread David T-G
Bill -- ...and then bill said... % % I'm running a php script using cron, and want to change the working directory. Piece of cake; use the chdir command. % % Is there a PHP equivalent of Linux pushd command? Why do you want to pushd? Do you have any intention of coming back to the initial

Re: [PHP] Shell commands as root?

2002-08-26 Thread David T-G
Nick -- ...and then Nick Price said... % % How can I get PHP to run a shell command as root? Thanks! If [apache running] php is running as root (bad), then just run the command. If the user running [apache running] php (typically "nobody" or "http" or "web" or such) has sudo permissions (gene

Re: [PHP] Re: error message: Nesting level too deep - recursive dependency?

2002-08-26 Thread Ondrej Ivanic
Richard Lynch wrote: > It still boggles my mind that you'd want to even *do* all this when you have > a built-in array type that can do everything you've done about a zillion > times faster... 1)I'm programing with php-oop for a few months. I need to know how to PHP work with references, cla

Re: [PHP] Re: Doing system things with PHP

2002-08-26 Thread Eric Pignot
> kill -HUP `cat /var/run/httpd.pid` > > If you execute this as nobody, I believe it will work, but I haven't > tested it. nope, it won't, as you need to be the owner to send a signal to a process. regards. Eric -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: ht

Re: [PHP] Re: Doing system things with PHP

2002-08-26 Thread David T-G
Eric, et al -- ...and then Eric Pignot said... % % > kill -HUP `cat /var/run/httpd.pid` % > % > If you execute this as nobody, I believe it will work, but I haven't % > tested it. % % nope, it won't, as you need to be the owner to send a signal to a process. And if the web server is running as

Re: [PHP] search in serialized string

2002-08-26 Thread Rodrigo Peres
well, I my opinion is not the way to work, but like I said the work was done by other guy, and now I have the problem to solve. So i back to old question :-) How can I search with some precision in a serialized string? on 8/24/02 12:13 PM, DL Neil at [EMAIL PROTECTED] wrote: > Rodrigo, > > Th

[PHP] check unread messages in a forum

2002-08-26 Thread Charlotte
I have made a forum in PHP, and the users are logged in using cookies. I want all new threads (and if there are new replies in an old thread) to be highlight or something like that. How do I check if a user has read a message or not? /Charlotte -- PHP General Mailing List (http://www.php.

[PHP] curl and UTF-8

2002-08-26 Thread Merijn van den Kroonenberg
Hello List, I have a problem with the php CURL module and UTF-8 data. My php script uses curl to do a post to a perl/cgi script. This perl script returns UTF-8 encoded XML. The perl script returns utf-8, i have verified that using the webserver logfiles, but the data that i receive in $result (se

[PHP] make problems, sapi

2002-08-26 Thread Jesse Lawrence
Hello all, I'm trying to install php 4.2.2 as a DSO with Apache-2.0.40 on a Mandrake Linux machine, and have come come upon a problem. It's having problems with sapi(?). I'm just wondering if anyone might know what is causing this problem, and if you could possibly point me towards a solution.

RE: [PHP] check unread messages in a forum

2002-08-26 Thread Matt Schroebel
> From: Charlotte [mailto:[EMAIL PROTECTED]] > Sent: Monday, August 26, 2002 8:04 AM > To: [EMAIL PROTECTED] > Subject: [PHP] check unread messages in a forum > > > I have made a forum in PHP, and the users are logged in using > cookies. I > want all new threads (and if there are new replies i

Re: [PHP] check unread messages in a forum

2002-08-26 Thread Stas Maximov
Hi, Just store the user's last log-in date/time either in the database or in cookie. On the next log-in "select * messages where creationDate > $userLastLoginDate" and highlight those selected. It won't work for every particular unread message, but I doubt if one needs to be that much specific.

Re: [PHP] search in serialized string

2002-08-26 Thread DL Neil
Rodrigo, Inherited problems = ouch! Sorry I don't keep old list msgs, perhaps you mentioned this before: does the language skills field contain: 1 both the language and the skill-level, eg English - Advanced 1b what separator is used between the two words? 2 more than one language/skill-level wh

[PHP] Object member variable names

2002-08-26 Thread Karl Moritz Hermann
Hi, I've got a little problem with variable naming of object members. Here is my situation: I've got a website form, whoms contents will be saved in a MySQL table with two fields: name and value. The name could be anything like "bla->test", "array[3]->test[4]->name"... Now I have a php script re

Re: [PHP] check unread messages in a forum

2002-08-26 Thread Eric Pignot
the method explained by Stas is the most common method used on all boards. But if you need a more precise method, that will also require more ressources from you server, what you can do is have a specific DB table called "msg_read" taking 2 parameters : msg_id, user_id. - Each time a user reads a

Re: [PHP] check unread messages in a forum

2002-08-26 Thread Eric Pignot
the method explained by Stas is the most common method used on all boards. But if you need a more precise method, that will also require more ressources from you server, what you can do is have a specific DB table called "msg_read" taking 2 parameters : msg_id, user_id. - Each time a user reads a

[PHP] strange error message when trying to start apache

2002-08-26 Thread Jesse Lawrence
Hello again, so earlier I was trying to install PHP-4.2.2 with Apache-2.0.40 and was having some sapi problems. I then read that I might be better off going with Apache-1.3.26. Well, I installed 1.3.26, and then configured and installed php into apache as a DSO. Everything appeared to go smooth

[PHP] PHP/MYSQL query error

2002-08-26 Thread Chris Crane
I am getting a failed query error message. Could someone take a look and let me know. //F U N C T I O N S //= function AddSignupRequest($Signup_FName, $Signup_LName, $Signup_Address1, $Signup_Address2, $Signup_City, $Signup_State, $Signup_Zip, $Signup_Email, $Signup_Phone, $Si

[PHP] Re: PHP/MYSQL query error

2002-08-26 Thread Chris Crane
I did some more testing and I found that I forgot the first field in the columns section of the Statement. So now it looks like this: I also copy and pasted the statement into PHPMYADMIN and it worked fine. It just doesn't work here function AddSignupRequest($Signup_FName, $Signup_LName, $Si

RE: [PHP] PHP/MYSQL query error

2002-08-26 Thread Jay Blanchard
[snip] /* Performing SQL query */ $query = "INSERT INTO SignupRequests ('FirstName', 'LastName', 'Address1', 'Address2', 'City', 'State', 'Zip', 'Email', 'Phone', 'ContactMethod', 'Date', 'IP', 'Status', 'Comments') VALUES ('', 'Chris', 'Crane', '655 Talcottville Road', 'Apt. 185'

Re: [PHP] PHP/MYSQL query error

2002-08-26 Thread Chris Crane
Initially there was an error with too many values verses columns. But I think it was fixed. I am double checking now. "Jay Blanchard" <[EMAIL PROTECTED]> wrote in message 003201c24d07$b8560470$8102a8c0@000347D72515">news:003201c24d07$b8560470$8102a8c0@000347D72515... > [snip] > /* Performing

Re: [PHP] PHP/MYSQL query error

2002-08-26 Thread Chris Crane
There are 15 columns and 15 pieces of data. In my second post I fixed this error and pasted it into PHPMYADMIN and it worked fine, but not here... "Chris Crane" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Initially there was an error with too many values v

Re: [PHP] PHP/MYSQL query error

2002-08-26 Thread Justin French
Why don't you do $result = mysql_query($query) or die(mysql_error()); or $result = mysql_query($query); echo mysql_error(); That way, instead of "Query Failed" you'll get something meaningful... probably something that will solve the problem. Justin French on 26/08/02 11:55 PM, Chris Cran

[PHP] Re: Help with script

2002-08-26 Thread Erich Kolb
Please see below. I have posted the entire script. "Bogdan Stancescu" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > Then you're doing something wrong. Can you post a piece of code? > > Bogdan > > Erich Kolb wrote: > > I have already downloaded the entire file so that Im not co

[PHP] curl and UTF-8, follow up

2002-08-26 Thread Merijn van den Kroonenberg
I did some further testing, and i found that this behaviour is not consistent. Actually i am pretty puzzled about this. When i wrote the message below is was testing with a xml document that contained only the following multi byte utf chacracter: \303\253(octal utf8) (LATIN SMALL LETTER E WIT

Re: [PHP] PHP/MYSQL query error

2002-08-26 Thread Chris Crane
Thank you. I will try that. "Justin French" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Why don't you do > > $result = mysql_query($query) or die(mysql_error()); > > or > > $result = mysql_query($query); > echo mysql_error(); > > That way, instead of "Query

RE: [PHP] Re: Automatic Download using URL, HELP!

2002-08-26 Thread Hankley, Chip
Bogdan - Sorry for the delay to your follow-up. The total script is below... first let me explain a little more of what I'm doing for clarity's sake. I'm downloading a lot of data files from a site. The way the site works, you supply some information in a form regarding the data set you want.

Re: [PHP] PHP/MYSQL query error

2002-08-26 Thread Chris Crane
I got it working. It did not like the single quotes around the column names. "Chris Crane" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Thank you. I will try that. > "Justin French" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTEC

[PHP] New to PHP/mySQL - Help on script

2002-08-26 Thread Ray Healy \(Data Net Services\)
Thanks for everyones help yesterday but nI have come up against a problem (as I am new). I have created my document as detailed below with notes. I can see from the form that I have connected to the server, accessed the correct database, created the statment and executed it. The problem is how to

RE: [PHP] Re: set filename of file open/download

2002-08-26 Thread Roger Lewis
Richard Lynch wrote On Saturday, August 24, 2002 4:52 PM To: David Buerer > >I'm using a php script to stream a microsoft word file to a browser. > > > >I'm sending header("Content-type: {$mimetype[DOC]} \n"); to set the mime > >type to application/msword so that the browser knows how to open the

Re: [PHP] New to PHP/mySQL - Help on script

2002-08-26 Thread Adam Williams
you need $query = SELECT COUNT(*) as count FROM bookings WHERE ('2002-04-04') BETWEEN booking_start AND booking_end OR ('2002-04-10')BETWEEN booking_start AND booking_end AND villa_id = ('3') $villa = mysql_query($query); while ($result = mysqul_result($villa)) { echo "We have $result[count] vi

[PHP] PHP Cookies

2002-08-26 Thread Erich Kolb
Why cant I use more than 1 variable in a cookie? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Posting variable without form

2002-08-26 Thread Then Nam Kheong
Hello, I saw searching in the archive for posting variable without using a form. I saw the answer by one of you, which is in this link: http://www.faqts.com/knowledge_base/view.phtml/aid/12039/fid/51 The code is actually a senttohost() function: ===

Re: [PHP] Virtual includes

2002-08-26 Thread Steve Keller
At 11:12 AM 8/26/2002 +0200, you wrote: > I'm trying include .php files which reside in alternative directories or > sub-directories. Such as a file which reside in www/chat/page.php, and for > this page I would like to include a file which resides in www/forum/include/ Using $DOCUMENT_ROOT h

[PHP] setcookie() failure

2002-08-26 Thread Tony Harrison
Can anyone tell me why the following setcookie()s fail? - Tabzilla.com -- - [EMAIL PROTECTED] http://www.cool-palace.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] strange error message when trying to start apache

2002-08-26 Thread Matt Schroebel
> From: Jesse Lawrence [mailto:[EMAIL PROTECTED]] > Sent: Monday, August 26, 2002 9:36 AM > To: [EMAIL PROTECTED] > Subject: [PHP] strange error message when trying to start apache > Everything appeared to go smoothly, except when > I try to start up Apache, I get the following error > message:

Re: [PHP] PHP and LDAP over SSL

2002-08-26 Thread Curtis Robinson
Yea, I am using OpenLDAP. Putting the .ldaprc in the user homedir for the web server worked like a charm. Thanks. On Mon, Aug 26, 2002 at 08:37:52AM +0200, Stig Venaas wrote: > On Fri, Aug 23, 2002 at 11:52:11AM -0500, Curtis Robinson wrote: > > So, I see that php does not have the CA. But, I

[PHP] Cyrillic & MySql issue

2002-08-26 Thread Vladislav Kulchitski
Hi guys, I am working on a multilingual web site (English and Ukrainian); so far, I was working on English part and now time to work on Ukrainian. The problem I ran into was that if I submit information to Mysql database something written in cyrillic, I can't get it to display properly when I tr

[PHP] filter files in a directory

2002-08-26 Thread rdkurth
I am showing a directory of files and I don't what all the files to show on the screen. I was able to get the . and the .. not to show with what I have below but there are some other files in there that look like this mylist.confg. I don't want them to show in the directory list. I tried && $files

[PHP] Re: PHP Cookies

2002-08-26 Thread Seairth Jacobs
Each cookies is it's own name/value pair. If you want to store multiple pairs, you need to encode them in some manner and store them in the value. Otherwise, you can just create multiple cookies, one for each variable. Assuming that the browser is configured to accept cookies, all cookies that yo

[PHP] Re: filter files in a directory

2002-08-26 Thread Philip Hallstrom
Try adding && !ereg("*.config", $files) -philip On Mon, 26 Aug 2002 [EMAIL PROTECTED] wrote: > I am showing a directory of files and I don't what all the files to > show on the screen. I was able to get the . and the .. not to show > with what I have below but there are some other files in the

[PHP] Reading URL in address bar

2002-08-26 Thread YC Nyon
I want to pass the current url (appearing on the browser address bar), say http://www.mydomain.com?cat.php=234 to appear in a form field in the a new page, say category.php. I am sure it's something to do with HTTP_variables or CGI.referrer but can't seem to get the one needed. TIA Nyon --

Re: [PHP] Reading URL in address bar

2002-08-26 Thread Jerome Houston
CGI.referrer? are you a foxweb user? :-) you can use $_SERVER['REQUEST_URI'] for the page itself, plus (i think...) $_SERVER['SERVER_NAME'] if you need the hostname (of the server), too. check out http://www.php.net/manual/en/reserved.variables.php#reserved.variables.server jerome >From:

Re: [PHP] search in serialized string

2002-08-26 Thread Rodrigo Peres
I mean double ouch!!! :-) well.. 1 no, it's a select for the language ( Rodrigo, > > Inherited problems = ouch! > > Sorry I don't keep old list msgs, perhaps you mentioned this before: does > the language skills field contain: > 1 both the language and the skill-level, eg English - Advanced >

[PHP] Re: [PHP-DB] Radio buttons

2002-08-26 Thread Support @ Fourthrealm.com
Your radio buttons look fine. I would ensure to add quotes (single or double) around the attribute settings, for HTML compliance. If you must go without quotes, then make sure that you don't put spaces in any of the attribute values. As for the form not working... do you have a JavaScript

[PHP] How do I call a CGI script from PHP?

2002-08-26 Thread Matthew
I'm new to PHP and want to build a basic page. The one thing I cannot find any documentation on is the seemingly simplistic question of how to run a Perl script. I just want to execute a site-tracking script from my PHP page, nothing fancy. .In SSI, I just use the "#exec cgi=" line--is there a

Re: [PHP] How do I call a CGI script from PHP?

2002-08-26 Thread Adam Williams
exec() and system() Adam On Mon, 26 Aug 2002, Matthew wrote: > I'm new to PHP and want to build a basic page. The one thing I cannot > find any documentation on is the seemingly simplistic question of how to run > a Perl script. I just want to execute a site-tracking

Re: [PHP] How do I call a CGI script from PHP?

2002-08-26 Thread Bas Jobsen
> PHP page, nothing fancy. .In SSI, I just use the "#exec cgi=" line--is $test = `path_to_your_cgi 2>&1`; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Date conversion problems

2002-08-26 Thread Liam . Gibbs
Having a little trouble with converting dates. I have, in my database, a bunch of dates stored like this: -M. Month is obviously the number of the month (5), not the name (May). I want to convert the format to MMM, (ex: May, 2002), so I used the mktime function. Basically I extract the

[PHP] Re: HTML-based mail with PHP

2002-08-26 Thread Liam . Gibbs
> I'm having trouble with some HTML-based mail with PHP. > It's not the regular thing where I can't get it to use > the tags instead of just printing them. That part's > fine; it comes out HTML-based. > > My problem is the way it's not accessing a certain > image. I get a broken link instead of a

[PHP] Re: filter files in a directory

2002-08-26 Thread Joel Boonstra
> I am showing a directory of files and I don't what all the files to > show on the screen. I was able to get the . and the .. not to show > with what I have below but there are some other files in there that look > like this mylist.confg. I don't want them to show in the directory > list. I tried

Re: [PHP] Re: HTML-based mail with PHP

2002-08-26 Thread Kevin Stone
I've seen this before. I believe it had something to do with Microsoft's screwed up cacheing routine. No guarantees, but delete the contents of your temporary internet files folder and try again. -Kevin - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday,

[PHP] when was array_unique fixed?

2002-08-26 Thread Greg Martin
i know that array_unique was broken in version 4.0.4, but does anyone know which version was it fixed in? thanks, greg martin [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Posting variable without form

2002-08-26 Thread Matt
>From: "Then Nam Kheong" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Monday, August 26, 2002 12:26 PM >Subject: [PHP] Posting variable without form > I tried it but it is not successful. I think it is because I tried to > post to a https(SSL link). > > I would like to know if I can perfor

Re: [PHP] Date conversion problems

2002-08-26 Thread Matt
> From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> >Sent: Monday, August 26, 2002 3:58 PM >Subject: [PHP] Date conversion problems > Having a little trouble with converting dates. > > I have, in my database, a bunch of dates stored like this: -M. Month is > obviously the number of the mon

Re: [PHP] when was array_unique fixed?

2002-08-26 Thread Jason Reid
Check the changelog --> http://www.php.net/ChangeLog-4.php Jason Reid [EMAIL PROTECTED] -- AC Host Canada www.achost.ca - Original Message - From: "Greg Martin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, August 26, 2002 3:36 PM Subject: [PHP] when was array_unique fixed?

Re: [PHP] Date conversion problems

2002-08-26 Thread Matt
>From: "Matt" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> >Sent: Monday, August 26, 2002 5:42 PM >Subject: Re: [PHP] Date conversion problems > > From: <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > >Sent: Monday, August 26, 2002 3:58 PM > >Subject: [PHP] Date conversion

[PHP] FW: Need example of Next 5>>

2002-08-26 Thread pax
Hi, I am looking for an example in php/MySql dealing with Next 5 > type of queries ..does anyone have any links? Thank you for your help Pax -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Seeding for php functions

2002-08-26 Thread Richard Lynch
>Im using array_rand() and shuffle() in my scripts. >Im seeding using mt_srand(). >I noticed the manual didn't suggest that mt_srand() can be used to seed >array_rand() and shuffle() but the older srand(). >The mt_srand man page states that its a drop in replacement for srand(). >I just would lik

[PHP] Re: comparing string data with database data

2002-08-26 Thread Richard Lynch
>Can somebody help me with this or point me in the right direction. >an example of what i need >I have a string that has 4 items in it separated by a space >$string="item1 item2 item3 item4"; >I also have a database with a lot of other items in it. > >I what to compare the items in the string with

[PHP] Re: uploading problems...please help

2002-08-26 Thread Richard Lynch
>I'm trying to upload files from my PC to my website. The code is a little >nuts, but it's all I got to work locally, butonce I take the code to the web >I get this message. Can anyone tell me what I'm doing wrong? > >I'm trying to upload a file, strip all the information so as to just use the >

RE: [PHP] Date conversion problems

2002-08-26 Thread David Freeman
> I have, in my database, a bunch of dates stored like this: > -M. Month is obviously the number of the month (5), not > the name (May). > > I want to convert the format to MMM, (ex: May, 2002), Do the conversion in MySQL - it'll save you grief in the long run... SELECT DATE_F

[PHP] Re: Need example of Next 5>>

2002-08-26 Thread Justin Garrett
http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#SEL ECTSELECT * FROM table LIMIT 5,5; # Retrieve rows 6-10 SELECT * FORM table LIMIT 10,5; # Retrieve rows 11 - 15Justin Garrett"Pax" <[EMAIL PROTECTED]> wrote in message 001901c24d49$e7830530$6401a8c0@pawel">news:001901c24d

[PHP] Re: Need example of Next 5>>

2002-08-26 Thread Justin Garrett
Let's try that again. SELECT * FROM table LIMIT 5,5; # get rows 6 - 10 SELECT * FROM table LIMIT 10,5 # get rows 11 - 15 Justin Garrett > Hi, > > I am looking for an example in php/MySql dealing with Next 5 > type of > queries ..does anyone have any links? > > Thank you for your help > Pax >

[PHP] Output Compression & output buffering..

2002-08-26 Thread Gerard Samuel
In an included file, I have an error handler that is using the 'output buffering' trick to dump a page in progress to display the error page. I also happened to have a switch to turn on output compression. When output compression is on, if an error is comitted while the page is displaying, I get

[PHP] Re: Trouble Downloading Files

2002-08-26 Thread Richard Lynch
>I'm not certain this is the right place to ask, but here goes. For security >reasons I have placed certain document files in a directory outside my web >root. There are many types of files included (e.g. jpg, gif, txt, pdf, xls, >doc, mdb, ppt, and dwg). Clicking links on my web page will downl

[PHP] Re: Dynamically Downloading Data

2002-08-26 Thread Richard Lynch
>Is it possible to select data from a database and have it be available for >download without actually creating a file on the server? Yes, of course :-) Here is a tab-delimited file of upcoming events from 'whatever' table: = now()"; $upcoming = mysql_query($query, $connection) or error_log(m

[PHP] Re: Session woes

2002-08-26 Thread Richard Lynch
>the problem I have, however, is that on the third page of my wizard, if the >user submits only some of the required fields, it submits back onto itself >and displays an error as required, but the problem is that when you fill in >the missing fields and move on to the next page (in effect back ont

[PHP] Re: register_globals off or on, why on

2002-08-26 Thread Richard Lynch
>> "Geeklog needs the register_globals variable turned on in order to work. >> Since PHP 4.2.0, the default for register_globals is "off". To fix it, >> simply add the following line to your php.ini file > >Is this not *wrong*. It sounds to me like fake laziness. Nothing drives >me bonkers more t

[PHP] Re: MySQL PASSWORD() Question

2002-08-26 Thread Richard Lynch
>If I insert a row's field's value using the PASSWORD() function, will I need >to use it or another function to find that row using the same field? You'll need to do this when somebody tries to log in later: In other words, you can *NEVER* "go backwards" from the password() function output to

[PHP] Re: What's the trick ?

2002-08-26 Thread Richard Lynch
>Hi guys, > >Am writing a web based mailclient (obviously with PHP+IMAP), >In the 'ReplyMail' script, inorder to add the "> " string >at the beginning of everyline, I used the following code, >$replymessage = $replymessage.str_replace("\n", "\n> ", >htmlspecialchars(trim(imap_body($mbox, $msg

[PHP] Re: Help with matchng strings

2002-08-26 Thread Richard Lynch
> >I have two list one is listA and the other is listB I would >like to take the values in listB and compare them with listA if any of >them match then I what to create a new list listC and put the values >that match in it. If they do not match I want the values to go into listD. >I have been mess

[PHP] Re: Numbers to Roman Numerals - Native PHP Function?

2002-08-26 Thread Richard Lynch
>Does anyone know if there is a native function within PHP to convert numbers >to roman numerals? > >I could easily write a little convertor, but I was hoping there was an >simple function - although I couldn't seem to find anything like that in the >manual. If http://php.net/printf doesn't do it

[PHP] Re: Call to undefined function mysql_connect()

2002-08-26 Thread Richard Lynch
>Help! > >I am getting the following error message for : > $link=mysql_connect("localhost","$user","$pass"); // line 34 >?> > >Fatal error: Call to undefined function: mysql_connect() in >/home/www/test.somename.org/aux/db-mod.php on line 34 > >I have used this call successfully on php v4.0.6, an

[PHP] Re: Object member variable names

2002-08-26 Thread Richard Lynch
>Hi, > >I've got a little problem with variable naming of object members. Here is my >situation: I've got a website form, whoms contents will be saved in a MySQL >table with two fields: name and value. The name could be anything like >"bla->test", "array[3]->test[4]->name"... > >Now I have a php s

[PHP] Re: check unread messages in a forum

2002-08-26 Thread Richard Lynch
>I have made a forum in PHP, and the users are logged in using cookies. I >want all new threads (and if there are new replies in an old thread) to be >highlight or something like that. > >How do I check if a user has read a message or not? Every user has a unique ID when they log in, right? And e

[PHP] Re: New to PHP/mySQL - Help on script

2002-08-26 Thread Richard Lynch
>Thanks for everyones help yesterday but nI have come up against a problem >(as I am new). I have created my document as detailed below with notes. I >can see from the form that I have connected to the server, accessed the >correct database, created the statment and executed it. The problem is how

[PHP] Re: Date conversion problems

2002-08-26 Thread Richard Lynch
>Having a little trouble with converting dates. > >I have, in my database, a bunch of dates stored like this: -M. Month is >obviously the number of the month (5), not the name (May). > >I want to convert the format to MMM, (ex: May, 2002), so I used the >mktime function. Basically I extra

[PHP] Re: Posting variable without form

2002-08-26 Thread Richard Lynch
>I tried it but it is not successful. I think it is because I tried to >post to a https(SSL link). You are correct. If you want to use SSL, you're better off using cURL. The above code would be about 100 X as large if it was trying to do all the encryption and SSL interchanges to get an SSL con

[PHP] Re: strange error message when trying to start apache

2002-08-26 Thread Richard Lynch
>Hello again, so earlier I was trying to install >PHP-4.2.2 with Apache-2.0.40 and was having some sapi >problems. I then read that I might be better off >going with Apache-1.3.26. Well, I installed 1.3.26, >and then configured and installed php into apache as a >DSO. Everything appeared to go

[PHP] Re: Reading URL in address bar

2002-08-26 Thread Richard Lynch
>I want to pass the current url (appearing on the browser address bar), say >http://www.mydomain.com?cat.php=234 to appear in a form field >in the a new page, say category.php. >I am sure it's something to do with HTTP_variables or CGI.referrer but can't >seem to get the one needed. Either use th

[PHP] Re: setcookie() failure

2002-08-26 Thread Richard Lynch
>Can anyone tell me why the following setcookie()s fail? >$expDate = mktime(12, 50, 30, 6, 20, 2010); >setcookie("tzusercookie", $uid, $expDate); >setcookie("tzpasscookie", $password, $expDate); Among other stupidities, some versions of IE require that you provide *both* date and directory, or *

[PHP] Forcing browsers to use cached pages

2002-08-26 Thread Mike Mannakee
Hi all, Is there any way to force a browser to use a cached version of a page if the user hits the back button? Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP: User Authentication Script

2002-08-26 Thread Anthony Ritter
Using Apache / Windows 98 / PHP / mySQL The following script is from Julie Meloni's book "PHP Essentials" (PrimaTech) on page 138. I've copied the script from her site and tried to run it and get the following: Internal Server Error The server encountered an internal error or misconfiguration a

RE: [PHP] PHP: User Authentication Script

2002-08-26 Thread Vail, Warren
What does your apache server log say? Warren Vail Tools, Metrics & Quality Processes (415) 667-7814 Pager (877) 774-9891 215 Fremont 02-658 -Original Message- From: Anthony Ritter [mailto:[EMAIL PROTECTED]] Sent: Monday, August 26, 2002 6:51 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP:

Re: [PHP] PHP: User Authentication Script

2002-08-26 Thread Anthony Ritter
Thanks for the reply Warren. It says... [Mon Aug 26 20:46:13 2002] [error] [client 127.0.0.1] malformed header from script. Bad header=HTTP/1.0 401 Unauthorized: c:/php4/php.exe ... - Original Message - From: Vail, Warren <[EMAIL PROTECTED]> To: 'Anthony Ritter'

  1   2   >