Re: [PHP] When did $_SERVER become the preferred syntax?

2002-05-18 Thread Jason Wong
On Saturday 18 May 2002 13:47, Brad Hubbard wrote: What's the idea behind this syntax $_SERVER and when did it become the preferred method (are there docs on this)? Read the changelogs for php 4.1.X and above. Search the archives. Read the sample php.ini files included with the distributions.

[PHP] Upgraded, now sessions aren't working. Please help :)

2002-05-18 Thread Stephen Bolinger
Something catastrophic happened to my webserver and while I had the data of the database and site content backed up, I'm having trouble getting it all back up and working. Prior to the server crash I was using Apache 1.3.2x (can't remember exactly) and PHP 4.1.x (not sure on this one either,

Re: [PHP] Upgraded, now sessions aren't working. Please help :)

2002-05-18 Thread Richard Baskett
Did you look at: http://www.php.net/manual/fi/reserved.variables.php#reserved.variables.sessi on That is the new way.. And within that block of text there is a couple other links to other pages you might want to take a look at. Cheers! Rick The glory of friendship is not the outstretched

Re: [PHP] When did $_SERVER become the preferred syntax?

2002-05-18 Thread Richard Baskett
This page will tell you everything you need to know about the new global arrays :) http://www.php.net/manual/fi/reserved.variables.php Rick Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you

Re: [PHP] When did $_SERVER become the preferred syntax?

2002-05-18 Thread Brad Hubbard
On Sat, 18 May 2002 15:47, Brad Hubbard did align ASCII characters thusly: What's the idea behind this syntax $_SERVER and when did it become the preferred method (are there docs on this)? Thanks to all who replied. I understand this now. Cheers, Brad -- PHP General Mailing List

[PHP] parsing CSV, updating MySQL table

2002-05-18 Thread Justin French
Hi, I have a client with an Excel file of products / prices / etc. For arguments sake, let's keep it simple: id,title,description if they were to export this as a CSV, then it could be used to update a mysql table (for existing ID's), and to insert any new ID's. So, I guess what I'm after

[PHP] Re: $answers[answer$n]

2002-05-18 Thread Michael Virnstein
answers$n. php tries to concate the constant answers with the variable $n, but you forgot the concatenation operator .. i assume that answers should be a string and is not a constant, therefore $answer[answers.$n] is right. if answers is a constant use $answer[answers.$n]; but a better way of

RE: [PHP] PHP+MySQL - Excel ?

2002-05-18 Thread savaidis
I use the ODBC connection with no problem, I get about 1000 rows to Excel in seconds. First row contains the colums names. But I wonder if there is a way to write back the data to MySQL database from Excel. (with ODBC connection, becouse with files I think is possible) Makis -Original

[PHP] Bulletin Boards

2002-05-18 Thread Richard Baskett
Has anybody used phpBB Phorum? And if so, which did you like better and why? And if you've used other systems.. Which did you like best and why? Thanks! :) Rick We should be taught not to wait for inspiration to start a thing. Action always generates inspiration. Inspiration seldom

[PHP] blank screen on parse errors after creating php.ini on linux

2002-05-18 Thread andy
Hi there, I did recently activat php.ini on suse7.2 (copyed the php.ini-recommended inot the propper dir) to increase the time out. Now I did experiance a serious problem. Working on my code, I did produce an error. I did forget to include a . The screen on my browser was blank after I

Re: [PHP] Bulletin Boards

2002-05-18 Thread Liam MacKenzie
Phorum is nice and simple. phpBB has more features, generally better. Both are very good systems. I'd recommend phpBB for a more 'fun' type of site and phorum for a more serious atmosphere. But both can be configured accordingly. Cheers, Liam - Original Message - From: Richard

Re: [PHP] blank screen on parse errors after creating php.ini on linux

2002-05-18 Thread Jason Wong
On Saturday 18 May 2002 17:27, andy wrote: Hi there, I did recently activat php.ini on suse7.2 (copyed the php.ini-recommended inot the propper dir) to increase the time out. Now I did experiance a serious problem. Working on my code, I did produce an error. I did forget to include a . The

[PHP] PHP,Apache disabled FTP?

2002-05-18 Thread r
Hi Guys, I'm a newbie so please forgive the question, I have reciently setup apache and PHP and now FTP does not work! I am running a win2k pro machine, is this because of PHP or APACHE or what? am going crazy and have searched google like crap without any damn answer...then went to microsoft.com

[PHP] Any Ideas @ becomes _Xy

2002-05-18 Thread Henry
Hi All, I don't think this is a PHP specific issue but I want to use PHP to solve it. I'm using GetResponse to supply my autoresponders. They provide an unsubscribe link at the bottom of the emails as follows: http://GetResponse.com/k.cgi?a=blahblahf=henry_Xyteacake.force9.co.uk I subscribed

RE: [PHP] PHP,Apache disabled FTP?

2002-05-18 Thread Craig Vincent
I'm a newbie so please forgive the question, I have reciently setup apache and PHP and now FTP does not work! I am running a win2k pro machine, is this because of PHP or APACHE or what? am going crazy and have searched google like crap without any damn answer...then went to microsoft.com

RE: [PHP] PHP,Apache disabled FTP?

2002-05-18 Thread Dan Hardiker
I have reciently setup apache and PHP and now FTP does not work! I am running a win2k pro machine, is this because of PHP or APACHE or what? [..] Unless you did something totally off the wall I seriously doubt Apache or PHP are affecting your FTP server. Unless your using IIS to serve your

[PHP] need help on a ereg stmt. validating website adress

2002-05-18 Thread andy
Hi there, I would like to validate a website adress. Unfortunatelly my eregi stmt does not work: if (eregi(^([0-9a-z][0-9a-z-\.]+)\.([a-z]{2,3})), $website)){ // not a link I am getting the error msg: Warning: REG_ERANGE in extend.inc on line 94 does anybody know whats wroong with that?

Re: [PHP] PHP,Apache disabled FTP?

2002-05-18 Thread r
Hey, Thank you for replying. Nope am not using IIS, I just have a plain win2k machine that used to ftp without any problems before.now i cant even find ftp.dll but can find ftp://ftp.exe I am unable to connect to 5 sites owned by the company i work for but am able to connect to them when i go

[PHP] Re: Newbie - create image error URGENT

2002-05-18 Thread Henry
Do you have GD Installed? Dani [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi everyone! I'm still learning PHP and MYSQL using windows98, MYSQL, PHP 4 in my local hard drive. I want to learn uploading image and resizing image in my local machine. when

[PHP] Bundled php mysql library vs mysql extension

2002-05-18 Thread Pentothal
Which are the differences between the php bundled mysql library and the external standard extension? Is the bundled one faster? How much? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

php-general Digest 18 May 2002 13:00:44 -0000 Issue 1352

2002-05-18 Thread php-general-digest-help
php-general Digest 18 May 2002 13:00:44 - Issue 1352 Topics (messages 98197 through 98250): HTTP_ACCEPT_LANGUAGE 98197 by: Gerard Samuel 98199 by: Miguel Cruz Re: Alter table and add cell at a time. 98198 by: Miguel Cruz Re: Q:Anybody using PHP directly on

[PHP] How do I get rid of session id (test purposes)

2002-05-18 Thread Henry
Hello All Love Sessions! BUT how do I clear it so that when I execute session_start() again I get a new one? Help. I'm sure I should have RTFM more but I'm a newbie. Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] (newbi)mySQL query question

2002-05-18 Thread webmaster
This doesn't have a huge amount to do with PHP but, I have the following code for my SQL query: $query = "SELECT code FROM links WHERE sort_text = $letter*"; I get an error. What I want to do is be able to specify a letter and have the rest be undefined eg if $letter was t I would get

[PHP] How can I ammend the session_id

2002-05-18 Thread Henry
Dear All, I want to use the session id that session_start would create but I wish to modify it as well! Suggestions? I'm currently trying: $sessionID = uniqid(); session_id($sessionID.u.$u.c.$c.z); session_start(); where $u and $c are passed in the URL Thanks in advance Henry -- PHP

[PHP] Complex(ish) Question for Newbie

2002-05-18 Thread webmaster
How can I return the last five lines of a mySQL database table? JJ Harrison[EMAIL PROTECTED]www.tececo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Bulletin Boards

2002-05-18 Thread Jeff Lewis
Never used Phorums as it didn't have what I was looking for. Tried phpBB but the admins ection is awful IMHO. I currently use YaBB SE which has a very fast development time. Jeff - Original Message - From: Richard Baskett [EMAIL PROTECTED] To: PHP General [EMAIL PROTECTED] Sent:

Re: [PHP] (newbi)mySQL query question

2002-05-18 Thread The_RadiX
try this: $query = SELECT code FROM links WHERE sort_text LIKE '$letter%'; Note there are now single quotes (') identifying the string of the LIKE operator and also the assignment operator (=) has been replaced with the proper LIKE mySQL operator that allows for string search arguments.

Re: [PHP] Complex(ish) Question for Newbie

2002-05-18 Thread The_RadiX
Goody another easy to answer one :) no harm intended.. it's a perfectly good question Okay first is it sorted how you want? if so you can use the LIMIT start,len feature of mysql.. for example: select * from table_name order by col_name limit 5,10 will select records 5 to 15 (5+10) if of

[PHP] How can I access the value in a variable whos name is in a string

2002-05-18 Thread Henry
Dear All, $variablename=variable; eval(\$.$variablename.=13;); echo $variable; This works fine!! It echoes 13; But this doesn't - echo eval(\$variablename\); Why?? Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: How can I access the value in a variable whos name is in a string

2002-05-18 Thread Henry
I found one way I can do the following eval(\$val=\$.$variation.;); echo $val; Is there a better way? Henry Henry [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Dear All, $variablename=variable; eval(\$.$variablename.=13;); echo $variable; This works

Re: [PHP] PHP,Apache disabled FTP?

2002-05-18 Thread r
Hi, I tried to use ftp via the command prompt it didnt work, got a timed out error. Tried to use it via cuteFTPtimed out error..will try after 30 seconds5 minutes later...10 timeouts. Any ideas? -Ryan - Original Message - From: Michael Geier [EMAIL PROTECTED] To: r [EMAIL

[PHP] Apache(webserver) question, sorry if somebody won't like it

2002-05-18 Thread Mantuks
Hey! i am having problems with my apache server. Im runnin PHPTriad thing with mysql and apache webserver..everything seems to be ok... but...the thing is that im runnin on my win2k platform which i also use for stuff...and i have webcam uploadin pic every sec..also java applet refreshing

Re: [PHP] Complex(ish) Question for Newbie

2002-05-18 Thread The_RadiX
well personally I have never had a good time with mysql_num_rows.. dunno why.. never seemed to have worked the way it should for me.. anyway point is if it works for you good, otherwise do what I do to get a rowcount and just: $sql_count=mysql_fetch_array(mysql_query(SELECT count(*) FROM

Re: [PHP] How can I access the value in a variable whos name is in a string

2002-05-18 Thread The_RadiX
simple.. try this: echo eval($variablename); then again why are you eval()ing at all?? why can't you do this: $var1=var2; $$var1=13; echo $var2; //or perhaps even better: //echo $$var1; seems simple enough.. haven't tested but theory is there I think.. HTH

Re: [PHP] need help on a ereg stmt. validating website adress

2002-05-18 Thread andy
andy [EMAIL PROTECTED] wrote: Hi there, I would like to validate a website adress. Unfortunatelly my eregi stmt does not work: if (eregi(^@([0-9a-z][0-9a-z-\.]+)\.([a-z]{2,3})), $website)){ // not a link I am getting the error msg: Warning: REG_ERANGE in extend.inc on line

[PHP] Re: Confused about which function to use with forms/database

2002-05-18 Thread Dennis Gearon
I appreciate all the good info on this subject, everybody. In looking the archives, I am still confused on one issue. Do **ALL** databases treat \' or \ as escaped? Isn't the SQL standard character to escape with a ' ? -- - Joy is

Re: [PHP] Bundled php mysql library vs mysql extension

2002-05-18 Thread Rasmus Lerdorf
Nope, it isn't faster. You should use your own if you have one installed on your machine. Chances are your will match your server better than the bundled one. The typical mismatch being the location of the mysql unix-domain socket. We bundled one so that the default PHP install will always be

[PHP] Whats the best way?

2002-05-18 Thread Gerard Samuel
Well this is the first time actually creating a regex. It works, but was wondering if the regex was created properly. HTTP_ACCEPT_LANGUAGE is 'en-us, en;q=0.75, nl;q=0.50, fr;q=0.25' /* Explode the browser report to get each language */ $foo = split(',', $_SERVER['HTTP_ACCEPT_LANGUAGE'] ); /*

[PHP] Netscape6 and Javascript

2002-05-18 Thread wolf
Hi, I need help for an non-php-problem. I've a frameset with 2 frames. There is a TOPframe with the name topframe who contains an input-Field. input type=text name=txt in the form named mainform. The BOTTOMframe contains a link. With the link I have to change the value of the input field

Re: [PHP] Free Hosting /w PHP/MySQL {!?}

2002-05-18 Thread Olexandr Vynnychenko
Hello Liam, Monday, May 06, 2002, 6:00:07 AM, you wrote: LM Free hosting for PHP Developers. LM As many MySQL Databases as you need LM PHP with all the bits http://scripts.operationenigma.net/phpinfo.php LM FTP Access LM Subdomain or Your own Domain LM Tech Support over MSN if needed LM 98%

Re: [PHP] header-sending misbehaving

2002-05-18 Thread erich
jason wong what is meant by output buffering? what PHP function(s) can support output buffer? thanks erich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Feelin' dumb...

2002-05-18 Thread Jason Soza
Thanks everyone for your help on this, this is the final code: if ($num_pages = 2) { for ($i=0, $p=1; $i$num_pages; $i++, $p++) { $j = ($i==0) ? $i : $j+20; printf(| a

RE: [PHP] How can I access the value in a variable whos name is in a string

2002-05-18 Thread Jonathan Rosenberg
I'm a PHP amateur, but a quick perusal of Eval in the manual says In PHP 4, eval() returns FALSE unless return() is called in the evaluated code, in which case the value passed to return() is returned. In PHP 3, eval() does not return a value. -Original

[PHP] CGI / Apache module session permissions

2002-05-18 Thread Steve Clay
Hello, To perform a certain task I have to run one of my PHP scripts as a CGI, which works fine except that the CGI doesn't have permissions to my sessions that were saved running under the Apache module. I expected different permissions, but I thought my user would have /more/ permission to

Re: [PHP] header-sending misbehaving

2002-05-18 Thread Jason Wong
On Sunday 19 May 2002 00:54, erich wrote: what is meant by output buffering? what PHP function(s) can support output buffer? The standard behaviour of PHP is to output stuff to the browser as soon as it's ready (more or less). By using the Output Control Functions (see

[PHP] Using PHP for NULLs

2002-05-18 Thread Jason Soza
I thought this was a MySQL question, or something that could be solved using a creative SQL string, but after looking through the MySQL manual, I don't think I can handle this with the database alone. According to the manual, MySQL always sorts NULL values first - I want them last. I have a

[PHP] passing ARRAYs through GET strings

2002-05-18 Thread Navid Y.
Hello :) Can anyone suggest of another way, an easier way, to send arrays through get strings, or through any other process, without having to serializing it? For example, would it be better to use sessions in this case? Any help would be greatful, thanks. :) Navid -- PHP General Mailing

Re: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread Richard Baskett
In your html input just add [] to the name of your variable so for example: input type=text name=firstvar[] / Rick Not one of them who took up in his youth with this opinion that there are no gods, ever continued until old age faithful to his conviction. - Plato From: Navid Y. [EMAIL

RE: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread SP
Hi Navid Don't you have to serialize it to put it in sessions? -Original Message- From: Navid Y. [mailto:[EMAIL PROTECTED]] Sent: May 18, 2002 2:26 PM To: [EMAIL PROTECTED] Subject: [PHP] passing ARRAYs through GET strings Hello :) Can anyone suggest of another way, an easier way,

Re: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread Richard Baskett
Oh sorry I read your message wrong.. But the idea still stands.. a href=nextpage.php?var[]=1var[]=2var[]=3Link/a Rick Sir my concern is not whether God is on our side. My great concern is to be on God's side. - Abraham Lincoln From: Navid Y. [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED]

RE: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread Navid Y.
Thanks SP and Richard, Well, I tested it and it works fine with sessions, without serializing it. The only problem with sending it through GET url strings is that you can only send about 255 characters of data through to the next page. I was just looking to see how others pass their array values

Re: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread Richard Baskett
Well what I normally do to pass very large arrays through strings.. when NOT using sessions, I use serialize, but it sounds like you didn¹t want to serialize.. If you give me an idea of what you are doing I might be able to figure out the best way to pass those variables :) And no you don't

[PHP] Re: Using PHP for NULLs

2002-05-18 Thread Dan Koken
I do believe it is a MySql question!! What's wrong with the old standard way as: $result = mysql_query( SELECT *, if (last_name is NULL,'zzz end',last_name) as last_name_sort FROM new_miatapix ORDER BY last_name_sort LIMIT $page, 20); Good Luck.. HTH.. Dan..

RE: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread SP
Okay let me clarify, if I had an array like this I would just use sessions this way: $myarray = array( array('1', '2'), array('3', '4') ); $_SESSION['myarray'] = serialize($myarray); Then you can use the array on any page the user goes to by doing this: $myarray =

RE: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread Navid Y.
Well Rick, Let's say I had a form with a text box and an textarea box. The text box won't contain that many strings, but the textarea box can contain thousands of characters, if the user wished to write that much. Both of the fields will be contained in a single array. If I send this array

[PHP] Re: CGI / Apache module session permissions

2002-05-18 Thread Steve Clay
Saturday, May 18, 2002, 1:05:30 PM, I wrote: SC CGI, which works fine except that the CGI doesn't have permissions to SC my sessions that were saved running under the Apache module. I Figured it out: from Apache mod script before CGI script: //allow CGI to access session $sess_file =

RE: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread Navid Y.
No need to serialize arrays in PHP 4.0. They work seamlessly, as if you've passed a regular variable through. Thanks for your help and patience :) -Original Message- From: SP [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 18, 2002 2:27 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]

RE: [PHP] Re: Using PHP for NULLs

2002-05-18 Thread Jason Soza
Thanks for the help! I spent more time looking at IFNULL() when I should've just been looking at IF(). Thanks again, sorry for the off-topic! Jason Soza -Original Message- From: Dan Koken [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 18, 2002 11:16 AM To: [EMAIL PROTECTED] Subject:

Re: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread Richard Baskett
Hey no problem.. That's what this list is for.. Asking questions and answering them :) I just use sessions to pass a lot of variables to a lot of pages.. Or some variables to a lot of pages.. Usually for site authorization that's about it. When I just want to pass arrays to another page, I use

RE: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread SP
Hey cool, didn't know that. -Original Message- From: Navid Y. [mailto:[EMAIL PROTECTED]] Sent: May 18, 2002 3:45 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] passing ARRAYs through GET strings No need to serialize arrays in PHP 4.0. They work seamlessly, as if you've passed a regular

RE: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread SP
Rick, what exactly do you mean by using serialization without sessions? how do you do that? -Original Message- From: Richard Baskett [mailto:[EMAIL PROTECTED]] Sent: May 18, 2002 4:31 PM To: [EMAIL PROTECTED]; PHP General Subject: Re: [PHP] passing ARRAYs through GET strings Hey no

Re: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread Richard Baskett
Well you can serialize an array using the serialize function then pass it through the url then unserialize it on the next page using the unserialize function. If you check out http://www.php.net/serialize it will give you some examples. It is quite similar to sessions in that sessions also

[PHP] Register_Shutdown_Function ??

2002-05-18 Thread Jason Caldwell
I'm playing with the register_shutdown_function -- it's seems to work fine if I call exit() within my script -- however, it doesn't seem to work when the script times-out. Anyone know why? It's supposed to work in the event of an error, time-out, user-abort, or script-exit. Thanks Jason --

[PHP] random order by id

2002-05-18 Thread Jule
Hey guys, i have a db and a table with id and questions now i want these questions to be listed in a random order, is there a way to format my SQL query or do i need some PHP work to? i can ofcourse select a random one, that's no problem, but how do i make sure that that one does not get chosen

RE: [PHP] passing ARRAYs through GET strings

2002-05-18 Thread SP
Thanks Rick, that's what I thinking. Thought I was missing something. -Original Message- From: Richard Baskett [mailto:[EMAIL PROTECTED]] Sent: May 18, 2002 4:49 PM To: SP; PHP General Subject: Re: [PHP] passing ARRAYs through GET strings Well you can serialize an array using the

Re: [PHP] random order by id

2002-05-18 Thread Richard Baskett
If you are using MySQL try looking at this page for the function rand(): http://www.mysql.com/doc/M/a/Mathematical_functions.html Here's a little overview of what it says: In MySQL Version 3.23, you can, however, do: SELECT * FROM table_name ORDER BY RAND() This is useful to get a random

Re: [PHP] How can I access the value in a variable whos name is ina string

2002-05-18 Thread Miguel Cruz
On Sat, 18 May 2002, Henry wrote: $variablename=variable; eval(\$.$variablename.=13;); echo $variable; This works fine!! It echoes 13; But this doesn't - echo eval(\$variablename\); Why?? Because a variable just standing there on its own doesn't have a return value. You can echo

Re: [PHP] need help on a ereg stmt. validating website adress

2002-05-18 Thread Miguel Cruz
On Sat, 18 May 2002, andy wrote: I would like to validate a website adress. Unfortunatelly my eregi stmt does not work: if (eregi(^([0-9a-z][0-9a-z-\.]+)\.([a-z]{2,3})), $website)){ // not a link I am getting the error msg: Warning: REG_ERANGE in extend.inc on line 94 does anybody

Re: [PHP] Re: Confused about which function to use with forms/database

2002-05-18 Thread Miguel Cruz
On Sat, 18 May 2002, Dennis Gearon wrote: I appreciate all the good info on this subject, everybody. In looking the archives, I am still confused on one issue. Do **ALL** databases treat \' or \ as escaped? Isn't the SQL standard character to escape with a ' ? I know that Oracle (at least

Re: [PHP] Re: reindexing an array after unset()

2002-05-18 Thread Daniel Grace
Erik Price [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... On Wednesday, May 8, 2002, at 03:28 PM, Kyle Gibson wrote: What do you think? Try array_pop($array); array_pop() is perfect, except that I don't want to take the last element off the end. Otherwise I

[PHP] random quote script with flat file? (PHP Vault: Random Quote Script)

2002-05-18 Thread Timothy J. Luoma
I've been searching for some a little bit of PHP that will pull out one line from a flat text file and display it, changing it on reload. So far most of them use MySQL and the links that I did find all turn up 404... but one was called PHP Vault: Random Quote Script and it seemed like it would

RE: [PHP] random order by id

2002-05-18 Thread David Freeman
i have a db and a table with id and questions now i want these questions to be listed in a random order, is there a way to format my SQL query or do i need some PHP work to? It's best achieved in sql: SELECT ID, Question FROM Questions WHERE Some = Condition ORDER BY RAND() LIMIT 10

[PHP] PHPBB2

2002-05-18 Thread r
Hi Guys and Girls, I have reciently set up PHPbb2 on our site, its great and no problems with the software but I am using frames so that a person can at any time jump out of the forum and came right back to the site but because of the frames the forum is pushed a lot to the right...(you

[PHP] Re: How do I get rid of session id (test purposes)

2002-05-18 Thread Jason Morehouse
http://www.php.net/manual/en/function.session-destroy.php On Sun, 19 May 2002 01:15:15 +1200, Henry wrote: Hello All Love Sessions! BUT how do I clear it so that when I execute session_start() again I get a new one? Help. I'm sure I should have RTFM more but I'm a newbie. Henry

[PHP] Re: Comon guys, please help.

2002-05-18 Thread Jason Morehouse
I've used both Cybercash and PayFlow. Both work fine, however you'll still need a merchant account. Cheers, -J On Sat, 18 May 2002 14:42:04 +1200, R wrote: Hi Guys, Special greetings to all of you who have helped me in the past. As some of you know i just bought a PHP book called Php

[PHP] date functions

2002-05-18 Thread Josh Edwards
Does anyone know a good way to count the days between two dates. ie how many Mondays fall between two dates. As a starting point I have calculated the start and end dates and the no of days b/w them. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: parsing CSV, updating MySQL table

2002-05-18 Thread Jason Morehouse
You could use mysql import / outfile: http://www.mysql.com/doc/S/E/SELECT.html See the section * The SELECT ... INTO OUTFILE. Hope that helps. -J On Sat, 18 May 2002 20:41:39 +1200, Justin French wrote: Hi, I have a client with an Excel file of products / prices / etc. For arguments

[PHP] Re: Register_Shutdown_Function ??

2002-05-18 Thread Jason Caldwell
Here's my code: ? set_time_limit(1); function clean_up() { if(connection_status() TIMEOUT) print(Script timed out.\n); } register_shutdown_function(clean_up); while(1); ? Here's the message I get: (I should get Script timed out.)

Re: [PHP] date functions

2002-05-18 Thread Richard Baskett
Well you could do two str2time() calls like this: # Two Dates to Compare # $date1 = strtotime(Oct 18, 2002); $date2 = strtotime(Jan 18, 2002); # Assign the earliest date and laterdate to variables # $earlyDate = ($date1 $date2) ? $date1 : $date2; $laterDate = ($earlyDate == $date1) ? $date2 :

Re: [PHP] random quote script with flat file? (PHP Vault: Random Quote Script)

2002-05-18 Thread Evan Nemerson
list($usec,$sec)=explode( ,microtime()); mt_srand($sec * $usec); $quotes = file(quotes); echo $quotes[mt_rand(0, (sizeof($quotes)-1))]; Should do the trick nicely. -Evan -- All religions are founded on the fear of the many and the cleverness of the few. Stendhal -- PHP General Mailing

Re: [PHP] PHPBB2

2002-05-18 Thread Ashley M. Kirchner
r wrote: Does anybody have any ideas on how i can make PHPBB's width a bit shorter? Use PHPBB2's forums for these kind of questions. -- H | Life is the art of drawing without an eraser. - John Gardner + Ashley M.

Re: [PHP] random quote script with flat file? (PHP Vault: Random Quote Script)

2002-05-18 Thread Timothy J. Luoma
list($usec,$sec)=explode( ,microtime()); mt_srand($sec * $usec); $quotes = file(quotes); echo $quotes[mt_rand(0, (sizeof($quotes)-1))]; Yes!!! That works exactly! I love PHP! I love this list and look forward to the day when I can contribute something more than fascinating

[PHP] file upload problem

2002-05-18 Thread Rodney Davis
I am trying to use the move_uploaded_file() function to upload files to a specific directory. It works fine with small .jpgs .txt etc etc but won't work with a large .mp3 file. Is this because it is too large? What can I do? Thanks -- PHP General Mailing List (http://www.php.net/) To

[PHP] Classifieds Program

2002-05-18 Thread Andrés de la Varga
I want to add a Classifieds script to my Website. Any recomendation? Andrés -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] xml parsing

2002-05-18 Thread Gerard Samuel
I got this example from Beginning PHP 4. Unfortunately, I cant get to wrox's site to see if there were any errata updates for this piece of code, but for the life of me, I dont know whats wrong with it. All its displaying is '-'. If anyone could direct me to where its broken, Ill be very

[PHP] Re: Register_Shutdown_Function ??

2002-05-18 Thread CC Zona
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Jason Caldwell) wrote: Here's my code: ? set_time_limit(1); function clean_up() { if(connection_status() TIMEOUT) print(Script timed out.\n); } register_shutdown_function(clean_up); while(1); ? Here's the

[PHP] Read a var from stdin

2002-05-18 Thread Rafael Perazzo
Is there any way to ask the user to type the value of a variable from stdin ? (like read in Pascal, or scanf in C). I'm using PHP from command line. Thanks Rafael Perazzo __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience

RE: [PHP] Classifieds Program

2002-05-18 Thread David Freeman
I want to add a Classifieds script to my Website. Any recomendation? 1. http://www.google.com/ 2. classifieds web php mysql in the search box. 3. Click the search button. 4. The 3rd link on the resulting list looks good. 5.

[PHP] Problem with

2002-05-18 Thread webmaster
I have the following code for a mySQL query in php: $text = "sort_text"; $query = "SELECT code FROM links ORDER BY $text WHERE ".$text." like '".$l."%'"; $result = mysql_query($query) or die("Query failed"); When I do the query I get Query failed. When I remove the sort parameter they are

Re: [PHP] Problem with

2002-05-18 Thread Richard Baskett
Well the ORDER BY is supposed to be after the WHERE statement.. Try that :) Rick It is my ambition to say in ten sentences; what others say in a whole book. - Friedrich Nietzsche From: [EMAIL PROTECTED] Date: Sun, 19 May 2002 13:05:19 +1000 To: [EMAIL PROTECTED] Subject: [PHP] Problem with

Re: [PHP] date functions

2002-05-18 Thread Tom Rogers
Hi I think this works :) ? $date1 = 1/1/2002; $date2 = date(m/d/Y); $time1 = strtotime($date1); $time2 = strtotime($date2); //get the first monday after date1 $first_monday = strtotime(first monday,$time1); //check if its within date2 if($first_monday $time2): //set count to 0 as we

[PHP] Re: Register_Shutdown_Function ??

2002-05-18 Thread Jason Caldwell
It doesn't matter. I'm setting the output *not* to the browser, but to the command shell, where I am running the script from. If you look at the errors, you'll see 2 of them, one points to line 7, where the IF() command is -- the script terminates there... I've put error_log() and exec()

[PHP] Augmenting an old date

2002-05-18 Thread Andre Dubuc
Two columns in my PostgreSQL db are type 'date' (formatted '-mm-dd'): 'start_date' and 'expiry_date'. What I cannot seem to figure out is how to augment the 'expiry_date' either by 30 days, 60 days, or 1 year. I've tried the date function in PHP (getdate) but the problem is that it

[PHP] bug in SLEEP() function...

2002-05-18 Thread Jason Caldwell
Dunno if this has been mentioned or fixed in the latest release (I'm using PHP version 4.1.1) -- but, a script will not timeout until the sleep() function has finished it's duration -- for example: In my script, if I set set_time_limit(30) -- then later in the script I call a sleep(45) -- the

RE: [PHP] Augmenting an old date

2002-05-18 Thread SP
Here's a nice article all about dates http://www.phpbuilder.com/columns/akent2610.ph p3 On page 6 of that article it shows a function for adding years, months, days ... to a date. function DateAdd ($interval, $number, $date) { $date_time_array = getdate($date); $hours =

Re: [PHP] Augmenting an old date

2002-05-18 Thread Tom Rogers
Hi You need to use the strtodate function which converts to a time stamp a date string and you can offset it by a number of days or whatever something like this ? $start = 2002-01-01; $expire = date(Y-m-d,strtotime(+30 days,strtotime($start))); echo $expire.br; ? Tom At 02:03 PM 19/05/2002,

Re: [PHP] Augmenting an old date

2002-05-18 Thread Tom Rogers
Hi A slightly more efficeint way :) ? $start = 2002-01-01; $expire = date(Y-m-d,strtotime($start +30 days)); echo $expire.br; ? Tom At 02:03 PM 19/05/2002, Andre Dubuc wrote: Two columns in my PostgreSQL db are type 'date' (formatted '-mm-dd'): 'start_date' and 'expiry_date'. What I

Re: [PHP] Re: Confused about which function to use with forms/database

2002-05-18 Thread Dennis Gearon
I think I will try to standardize on the '' version, then. thank you. Miguel Cruz wrote: On Sat, 18 May 2002, Dennis Gearon wrote: I appreciate all the good info on this subject, everybody. In looking the archives, I am still confused on one issue. Do **ALL** databases treat \' or \

Re: [PHP] date functions

2002-05-18 Thread Miguel Cruz
On Sun, 19 May 2002, Josh Edwards wrote: Does anyone know a good way to count the days between two dates. ie how many Mondays fall between two dates. As a starting point I have calculated the start and end dates and the no of days b/w them. Pretty much common sense, right? How about

[PHP] regex (preg_replace)

2002-05-18 Thread Gerard Samuel
Im trying to get a final output to be 'item' but Im unable to get working. Could someone point me where Im going wrong. Thanks ?php $a = 'item rdf:about=http://www.trini0.org;'; $b = preg_replace(/(item)(\s.*)()/i, $1 . $3, $a ); echo $b; ? -- PHP General Mailing List

  1   2   >