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

2002-05-17 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 (http://

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

2002-05-17 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 can

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

2002-05-17 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 han

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

2002-05-17 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, last

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

2002-05-17 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 distributio

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

2002-05-17 Thread Brad Hubbard
What's the idea behind this syntax "$_SERVER" and when did it become the preferred method (are there docs on this)? Cheers, Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] virtual coin toss 55%

2002-05-17 Thread Jason Wong
On Friday 12 April 2002 13:07, Randy Johnson wrote: > I was surfing the internet today and found a site that offered a coin toss > game in PHP.The site claimed that it used the latest and most random > computer algorithms to do the Coin Toss. > > In the next line it said that you (the player)

Re: [PHP] virtual coin toss 55%

2002-05-17 Thread Richard Baskett
I want to say right from the beginning that there is a better way of doing this, but this will work :) Just keep track of what the user has thrown so far and do a check on it.. So that if it's less than 45% change the flip to what the user picked.. If that will put it over 45% then make it opposi

[PHP] virtual coin toss 55%

2002-05-17 Thread Randy Johnson
I was surfing the internet today and found a site that offered a coin toss game in PHP.The site claimed that it used the latest and most random computer algorithms to do the Coin Toss. In the next line it said that you (the player) would win 45% of the time. I would like opinions how someb

Re: [PHP] Feelin' dumb...

2002-05-17 Thread Richard Baskett
Ok Im feeling dumb also now *hehe* What I said about putting the $number line below the printf line.. Don¹t listen to me :) Now that I know what you want.. I know there is cleaner and better code, but it works :) if ($num_pages >= 2) { for ($i=1; $i<=$num_pages; $i++) { $j = ($i==1) ? $i

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Craig Vincent
> I think I see the error here. > > if ($num_pages >= 2) { > for ($i=1; $i<=$num_pages; $i++) { > $number = ($i * 20) + 1; > printf("| href=\"test.php?page=%s\">Page %s | ", $number, > $i); >

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Craig Vincent
> I think I figured this out - > > Since I only have 2 pages, the first iteration of the loop sets $i greater > than than the number of pages, i.e. $i becomes 21, which is > greater than 2, > so the second iteration stops there. Am I seeing this right? > > So Craig's way worked because $i was left

Re: [PHP] Feelin' dumb...

2002-05-17 Thread Richard Baskett
Easy one! Hopefully you havent "jetted" yet :) Just cut the $number = line to below the printf line and there you have it! Rick "How wonderful it is that nobody need wait a single moment to improve the world." - Anne Frank > From: "Jason Soza" <[EMAIL PROTECTED]> > Date: Fri, 17 May 2002 20:4

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Jason Soza
The 20 is inserted into a MySQL LIMIT query. Page 1 = LIMIT 1,20 to get the first 20 records from 1, then Page 2 = LIMIT 21,20 to get the next 20, etc. I think I see the error here. if ($num_pages >= 2) { for ($i=1; $i<=$num_pages; $i++) {

Re: [PHP] Feelin' dumb...

2002-05-17 Thread Richard Baskett
That means $num_pages is equal to 2 so yes the if statement is true and it goes onto the the for loop. Now where you are having problems is on the second expression in the for loop.. This expression is basically saying "Do this for loop while $I is less than or equal to 2. The third expression t

Re: [PHP] Strange behavior with imap, php and apache

2002-05-17 Thread Jason Wong
On Saturday 18 May 2002 02:39, Sergio Tirado wrote: > I just installed Red Hat 7.3 with Apache and PHP. I ran a simple script > to test the imap_open function and it doesn't work when using the > values for servers on my subnet. > > http://www.gym.itesm.mx/imap.php > > However, if the mailbox I re

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Jason Soza
I think I figured this out - Since I only have 2 pages, the first iteration of the loop sets $i greater than than the number of pages, i.e. $i becomes 21, which is greater than 2, so the second iteration stops there. Am I seeing this right? So Craig's way worked because $i was left alone in the

Re: [PHP] ob_start() and ob_gzhandler

2002-05-17 Thread Jason Wong
On Saturday 18 May 2002 02:48, Jason Soza wrote: > Either way, is there any way to tell if my output is really being > compressed by ob_gzhandler? If you have NN4.X use view source, if the source is empty then compression is active. If you're using some form of un*x then: lynx --mime_header

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Jason Soza
When I use that, here: if ($num_pages >= 2) { for ($i=1; $i<=$num_pages; $i+=20) { echo "$i"; } } I get 1, or whatever I set $i= in the first expression. No other iterations. When I use Craig's way, it works - ki

Re: [PHP] Feelin' dumb...

2002-05-17 Thread Richard Baskett
What do you want the output to look like? I did this: $num_pages =120; if ($num_pages >= 2) { for ($i=1; $i<=$num_pages; $i+=20) { $page = $i+1; printf("| Page %s | ", $number, $page); } } And got this: | Page 2 | | Page 22 | | Page 42 | | Page 62 | | Page 82 | | Page 102 |

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Jason Soza
Makes sense. Thanks! Now... I have this little problem: if ($num_pages >= 2) { for ($i=1; $i<=$num_pages; $i++) { $number = ($i * 20) + 1; $page = $i+1; printf("| Page %s | ", $number, $page); } } I want $page to be $i + 1, but when I do $page = $i+1;, $i

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Craig Vincent
> I wonder why the other suggestions weren't working. They seemed logical > enough, I even tried variations of your suggestion, first I tried: > > for ($i=1; $i<=$num_pages; $number = $i + 20) {} > for ($i=1; $i<=$num_pages;) { $number = $i + 20; } The problem with these two statements was that t

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Jason Soza
Thanks Craig, that worked! I wonder why the other suggestions weren't working. They seemed logical enough, I even tried variations of your suggestion, first I tried: for ($i=1; $i<=$num_pages; $number = $i + 20) {} That wasn't working, still was getting the 30 second timeout. Then I tried: for

Re: [PHP] Feelin' dumb...

2002-05-17 Thread Tom Rogers
Hi What you need is for ($i=1; $i<=$num_pages; $i+=20) { // print stuff here } Tom At 01:19 PM 18/05/2002, Jason Soza wrote: >Okay, I'm apologizing right now for this, but I hope it's at least >tolerable. I have this: > >for ($i=1; $i<=$num_pages; $i++) { > // print stuff here >

Re: [PHP] Feelin' dumb...

2002-05-17 Thread Richard Baskett
I apologize :) yes you need to do this: for ($i=1; $i<=$num_pages; $i=$i+20) { echo "$i - is i"; } Make sure $num_pages is set though.. If not it wont work you'll just get a blank white page. Yes I did some testing *hehe* It worked beautifully when $num_pages is set though.. Rick "The hum

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Craig Vincent
> For each loop, I want to add 20 to $i, so after the first > iteration, I have > 21, then 41, 61, etc. I've tried $i+20, $i + 20, I've tried looking in the > manual, but I assume this is some C-type function, and I'm not > familiar with > C! Well this is a bit of a detour from the other suggesti

Re: [PHP] character conversion problem

2002-05-17 Thread Tom Rogers
Hi That looks like UTF-8 encoding and I think you will need the iconv extension installed to convert it easily. Tom At 12:56 PM 18/05/2002, darcy w.christ wrote: >hi, > > i'm in a bit of a bind and i'm hoping someone can help me. i'm working > on a project in which some data was saved into

RE: [PHP] Feelin' dumb...

2002-05-17 Thread Jason Soza
Well, I tried that but the page doesn't finish loading... I.e. a script that normally doesn't take more than a second to load just sits there. With $i++, everything's fine - with $i+20, the browser says it's loading, but all I have is a white screen for about 30 seconds... Then it times out.

Re: [PHP] Feelin' dumb...

2002-05-17 Thread Jule
would that work? isn't $i++; abbr. for $i = $i + 1; so now the $i + 20; doens't declare anything. just like $i += $b; is abbr. $i = $i + $b; Jule. On Friday 17 May 2002 23:14, you wrote: > Hmm... Wouldn¹t you just do this?: > > for ($i=1; $i<=$num_pages; $i+20) { > // print stuff here > }

Re: [PHP] Feelin' dumb...

2002-05-17 Thread Richard Baskett
Hmm... Wouldn¹t you just do this?: for ($i=1; $i<=$num_pages; $i+20) { // print stuff here } Rick "The vision must be followed by the venture. It is not enough to stare up the steps - we must step up the stairs." - Vance Havner > From: "Jason Soza" <[EMAIL PROTECTED]> > Date: Fri, 17 May 200

Re: [PHP] Feelin' dumb...

2002-05-17 Thread Jule
try, for ($i=1; $i<=$num_pages; $i = $i + 20) { } or try, $i = 1; while ($i<=$num_pages) { //text here $i = $i + 20; } I got those little problems too all the time.. and the boards/lists always help. Jule On Friday 17 May 2002 23:19, you wrote: > Okay, I'm apologizing right n

[PHP] Feelin' dumb...

2002-05-17 Thread Jason Soza
Okay, I'm apologizing right now for this, but I hope it's at least tolerable. I have this: for ($i=1; $i<=$num_pages; $i++) { // print stuff here } For each loop, I want to add 20 to $i, so after the first iteration, I have 21, then 41, 61, etc. I've tried $i+20, $i + 20, I've tr

[PHP] character conversion problem

2002-05-17 Thread darcy w . christ
hi, i'm in a bit of a bind and i'm hoping someone can help me. i'm working on a project in which some data was saved into a postgresql database. It was copied from quark express and entered through a php interface. Unfortunately some of the records have a strange character encoding. Fo

Re: [PHP] mktime()

2002-05-17 Thread Rasmus Lerdorf
A couple of ways to do it: strtotime('09 May 2002'); mktime(12,0,0,5,9,2002); On Sat, 18 May 2002, Josh Edwards wrote: > After reading the manual Istill can't convert this > 09/May/2002 to a timestamp. > > Any Pointers > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsub

[PHP] mktime()

2002-05-17 Thread Josh Edwards
After reading the manual Istill can't convert this 09/May/2002 to a timestamp. Any Pointers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Q:Anybody using PHP directly on Mac-OSX???

2002-05-17 Thread Justin French
I haven't jumped ship to OSX yet (still on OS9), but I believe it's not far away... However, I don't know if I'd put my test server on the same box... time will tell, but I prefer having my old clunker P133 box under the desk running the same OS / Apache version / PHP version / MySQL version as b

Re: [PHP] HTTP_ACCEPT_LANGUAGE

2002-05-17 Thread Miguel Cruz
On Fri, 17 May 2002, Gerard Samuel wrote: > Im looking to know how to handle it. > HTTP_ACCEPT_LANGUAGE = en-us, en;q=0.75, th;q=0.50, yi;q=0.25 > What are the 'q' values for? How much they'd like to receive one of those other languages. The closer the number is to 1, the more excited they are ab

Re: [PHP] Alter table and add cell at a time.

2002-05-17 Thread Miguel Cruz
update table set answer3=5 where id=2; miguel On Fri, 17 May 2002, Jule wrote: > a question: > > if i have this: > > for ($n = 1; $n <= $quiz[number_answers]; $n++) { > $table = $qcode."_answers"; > $value = $answers["answer".$n]; > $value2 = "answer".$n; > > $query_al

[PHP] HTTP_ACCEPT_LANGUAGE

2002-05-17 Thread Gerard Samuel
Im looking to know how to handle it. HTTP_ACCEPT_LANGUAGE = en-us, en;q=0.75, th;q=0.50, yi;q=0.25 What are the 'q' values for? Thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Alter table and add cell at a time.

2002-05-17 Thread Jule
a question: if i have this: for ($n = 1; $n <= $quiz[number_answers]; $n++) { $table = $qcode."_answers"; $value = $answers["answer".$n]; $value2 = "answer".$n; $query_alter_table = "ALTER TABLE $table ADD $value2 TEXT NOT NULL"; $query_add_answers = "INS

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

2002-05-17 Thread David Freeman
> > When you suck the data back out you'll obviously need to > > stripslashes() to get rid of the 'escape' chars you added above. > > Nope, because the escape characters don't actually get added to the > database. > When the database's command interpreter sees it, it removes > the esc

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

2002-05-17 Thread Miguel Cruz
On Sat, 18 May 2002, David Freeman wrote: > As a general rule, though, you'll need to 'escape' anything that your > database won't like - this is typically the ' and " chars. Addslashes() > will do that for you. Anything else you want to do depends on what you > need the data for. > > When you

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

2002-05-17 Thread David Freeman
> I've read the documentation but am still confused about what > to use when. > > When passing data from forms to database, which do I use? > When retrieving data from database to display in forms, > which do I use? Kinda depends on what you're using the data for really. If you don't c

RE: [PHP] Q:Anybody using PHP directly on Mac-OSX???

2002-05-17 Thread David Freeman
> So, anybody out there have PHP installed on their local home > desktop Mac OSX box able to test by a quick "preview in > browser" from say an app like BBedit? I went to: http://www.google.com/ I entered the following into their dinky little search box: mac osx apache mysql php installe

[PHP] Kiev party (fwd)

2002-05-17 Thread Rasmus Lerdorf
Could someone who has a clue about this fill in Serg and the rest of the folks on this list who might be interested? -- Forwarded message -- Date: Fri, 17 May 2002 23:32:28 +0300 From: Serg Lysak <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Kiev party Hello webmaster, So

RE: [PHP] ADODB - whaddya think?

2002-05-17 Thread Cal Evans
I've been using it for about 4 months and it's very stable. =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Jerome Houston [mailto:[EMAIL PROTECTED]] Sent: Friday, May 17, 2002 4:05 PM To: [EMAIL PROTECTED] Subject: [PHP] ADO

[PHP] ADODB - whaddya think?

2002-05-17 Thread Jerome Houston
Testimonial time! Despite ROCK STAR assistance from a PHP developer, I'm having troubles with mssql_*() functions. most of the problems are gone (or being fixed by some AWESOME people), but to make use of those fixes, i've got to use php v 4.3-dev. and there's other bugs in that (as there sh

RE: [PHP] Newbie - create image error URGENT

2002-05-17 Thread Scott Hurring
Probably don't have the GD extension enaabled. On a win machine, it's easy, look in your php.ini and set the extensions_dir to where your extensions are then un-comment php_gd.dll --- Scott Hurring Systems Programmer EAC Corporation [EMAIL PROTECTED] Voice: 201-462-2149 Fax: 201-288-1515 >

[PHP] Newbie - create image error URGENT

2002-05-17 Thread Dani
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 I execute this code: http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2002-05-17 Thread Scott Hurring
Try $answers["answer".$n] --- Scott Hurring Systems Programmer EAC Corporation [EMAIL PROTECTED] Voice: 201-462-2149 Fax: 201-288-1515 > -Original Message- > From: Jule [mailto:[EMAIL PROTECTED]] > Sent: Friday, May 17, 2002 4:41 PM > To: [EMAIL PROTECTED] > Subject: [PHP] $answers[answe

[PHP] passthru()

2002-05-17 Thread gamin
I have a PHP script that computes the URLs to files that i need to download. Is it possible to put passthru() with wget in a while loop and donwload multiple files at one time ? Or does passthru() complete the shell command and then proceed. Any other suggestions ? thx in advance gamin. --

[PHP] $answers[answer$n]

2002-05-17 Thread Jule
Hey guys, i'm getting this error whe i try to access this variable. $answers[answer$n] Parse error: parse error, expecting `']'' in /home/blindtheory/web/quiz/add_quiz/add_quiz_process_2.php on line 36 the variable $answer[answers$n] comes from a form on the preceding page in which a number of

[PHP] Error compiling PHP-4.2.1 on linux

2002-05-17 Thread Scott Hurring
Hello everyone. I have been using PHP since version 4.0.6 and always compile from source. I have not had a single problem until now. I'm trying to upgrade from php-4.1.2 to php-4.2.1, and when i make install php-4.2.1, *any* PHP page i access throws off a ton of errors that i've never seen befo

[PHP] Re: Current URL is http or https?

2002-05-17 Thread Steven Walker
Thanks! I got it: $_SERVER['HTTPS'] == "on" Steven J. Walker Walker Effects www.walkereffects.com [EMAIL PROTECTED] On Friday, May 17, 2002, at 01:09 PM, Philip Hallstrom wrote: > I would guess you want $_SERVER["SERVER_PROTOCOL"] which returns > "HTTP/1.1" for me and probably "HTTPS..." for

[PHP] Re: Current URL is http or https?

2002-05-17 Thread Philip Hallstrom
I would guess you want $_SERVER["SERVER_PROTOCOL"] which returns "HTTP/1.1" for me and probably "HTTPS..." for https connections... also if you're using apache I think it sets some SSL_* variables that exist only when using https. On Fri, 17 May 2002, Steven Walker wrote: > Hi, > > I'm trying to

[PHP] Current URL is http or https?

2002-05-17 Thread Steven Walker
Hi, I'm trying to find a way to determine whether a clients browser current url is prefixed by http or https. However, I cannot seem to find the right predefined variable to give me this information. Basically, I want the same thing that HTTP_REFERER provides, but for the _current_ page. Any

[PHP] $_FILES, file upoad and backslashes

2002-05-17 Thread BOb Pardoe
Please can anyone tell me how to cope with IE6 showing files after browsing with http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problem displaying certain text from a form on to the browser

2002-05-17 Thread Kevin Stone
Clearly is being interpreted by the browser as an HTML tag. Use htmlspecialchars() to encode these characters in the string. Or find and replace "<" with "<" and ">" with ">". -Kevin - Original Message - From: "Don" <[EMAIL PROTECTED]> To: "php list" <[EMAIL PROTECTED]> Sent: Friday, Ma

Re: [PHP] 4.3.0 coming out?

2002-05-17 Thread Miguel Cruz
On Fri, 17 May 2002, Thalis A. Kalfigopoulos wrote: > Any hint from the developers as to when to expect 4.3.0? Check the archives of this list, as it's been hinted at more than once in the past week or so. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:/

[PHP] 4.3.0 coming out?

2002-05-17 Thread Thalis A. Kalfigopoulos
Any hint from the developers as to when to expect 4.3.0? cheers, thalis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Problem displaying certain text from a form on to the browser

2002-05-17 Thread Don
Hi, On my form, I have a text area. I was doing some testing and on one line, I entered the following: When I looked at the results pages sent to the browser, that line was missing. I think that the "<" character is the culprit. I've tried stripslashes() and htmlentities() but I cannot ge

Re: [PHP] ob_start() and ob_gzhandler

2002-05-17 Thread Rasmus Lerdorf
You can just set output_handler in your php.ini file to automatically buffer and compress everything. On Fri, 17 May 2002, Jason Soza wrote: > Hmmm... So if I -wanted- to buffer the entire page using ob_gzhandler, > I wouldn't use ob_implicit_flush(), correct? Or would this be > beneficial in th

Re: [PHP] ob_start() and ob_gzhandler

2002-05-17 Thread Jason Soza
Hmmm... So if I -wanted- to buffer the entire page using ob_gzhandler, I wouldn't use ob_implicit_flush(), correct? Or would this be beneficial in this case? The way I read the manual page on ob_implicit_flush() is that it flushes after each output call. Would that mean that ob_start("ob_gzhan

[PHP] Strange behavior with imap, php and apache

2002-05-17 Thread Sergio Tirado
I just installed Red Hat 7.3 with Apache and PHP. I ran a simple script to test the imap_open function and it doesn't work when using the values for servers on my subnet. http://www.gym.itesm.mx/imap.php However, if the mailbox I request to open is on another server outside, it does work.

Re: [PHP] ob_start() and ob_gzhandler

2002-05-17 Thread Miguel Cruz
On Fri, 17 May 2002, Jason Soza wrote: > Am I doing something wrong? Shouldn't the ob_start() by itself just > load all output into a buffer and not display it until I call ob_flush > ()? Or when you get to the end of execution... http://php.net/ob_implicit_flush miguel -- PHP General Ma

Re: [PHP] brain cramp, ouch!

2002-05-17 Thread Robert Cummings
Robert Cummings wrote: > > Kelly Meeks wrote: > > > > Ok > > > > Let's say I'm querying a table, and looping thru the results: > > > > $connect=mysql_connect(host,user,pass); > > $thedb=mysql_select(database1); > > $thequery="select * from foo"; > > $theresult=mysql_query($thequery) or die (mysql

Re: [PHP] brain cramp, ouch!

2002-05-17 Thread Robert Cummings
Kelly Meeks wrote: > > Ok > > Let's say I'm querying a table, and looping thru the results: > > $connect=mysql_connect(host,user,pass); > $thedb=mysql_select(database1); > $thequery="select * from foo"; > $theresult=mysql_query($thequery) or die (mysql_error()) > while ($output=mysql_fetch_asso

Re: [PHP] brain cramp, ouch!

2002-05-17 Thread Miguel Cruz
On Fri, 17 May 2002, Kelly Meeks wrote: > Let's say I'm querying a table, and looping thru the results: > > $connect=mysql_connect(host,user,pass); > $thedb=mysql_select(database1); > $thequery="select * from foo"; > $theresult=mysql_query($thequery) or die (mysql_error()) > while ($output=mysql_

Re: [PHP] Re: [PHP-DEV] Console application with PHP

2002-05-17 Thread Miguel Cruz
On Fri, 17 May 2002, D Lau wrote: >> http://gtk.php.net/ and >> http://www.php.net/manual/en/features.commandline.php for a > > Sorry, I forgot to say my requirement is to make this a browser only > application. > Would all these still works? No, if you want highly interactive apps in a b

Re: [PHP] accessing mysql_fetch_array more than once?

2002-05-17 Thread Chris Knipe
Didn't do the trick But it did point my towards mysql_data_seek, which did the job beautifully :) Thanks -- me - Original Message - From: "Rasmus Lerdorf" <[EMAIL PROTECTED]> To: "Chris Knipe" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, May 17, 2002 7:04 PM Subject:

[PHP] brain cramp, ouch!

2002-05-17 Thread Kelly Meeks
Ok Let's say I'm querying a table, and looping thru the results: $connect=mysql_connect(host,user,pass); $thedb=mysql_select(database1); $thequery="select * from foo"; $theresult=mysql_query($thequery) or die (mysql_error()) while ($output=mysql_fetch_assoc($theresult)){ do stuff here.. } Wh

Re: [PHP] PHP,CyberCash,Verisign,PayFlow

2002-05-17 Thread Baba Buehler
Analysis & Solutions wrote: > On Fri, May 17, 2002 at 10:27:50AM -0400, Analysis & Solutions wrote: > >>> Does this mean that if i want to start accepting credit cards on my >>> site i wont have to pay for a credit card merchant account? >> >> You betcha. > > Oh, Dear! I didn't see the "w

RE: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Miguel Cruz
On Fri, 17 May 2002, Dan Hardiker wrote: >> from the cron I would call this command... >> >> wget -q -T10 http:/www.mydomain.com/myScript.php -0 /dev/null > > This makes it highly insecure as anyone could execute it (unless you > locked it down which is silly when you could just run it locally >

Re: [PHP] ob_start() and ob_gzhandler

2002-05-17 Thread Robert Cummings
Jason Soza wrote: > > Just wondering what would cause the following: > I have a 512/128 cable connection through my ISP that I'm hosting my > sites through. I have a 10gb/mo transfer limit (u/l and d/l) so when I > saw mention of the ob_gzhandler (and mod_gzip for Apache), that kind of > got me i

[PHP] Re: Query/Error

2002-05-17 Thread Richard Creech
Anthony, I find it is useful to write code such that every outcome, however remote, is handled by your code: $query = "INSERT INTO ... blah "; // pconnect, select and query if ($link_identifier = mysql_pconnect(DBSERVERHOST, DBUSERNAME, DBPASSWORD)) { if ( mysql_select_db(DBNAME, $link_i

Re: [PHP] Q:Anybody using PHP directly on Mac-OSX???

2002-05-17 Thread Geoff Hankerson
This will just start Apache if I remember correctly. You still have to alter the httpd.conf file. Details for MacOSX php setup are here: http://www.macdevcenter.com/pub/ct/49 php is covered in part III - Original Message - From: "Miguel Cruz" <[EMAIL PROTECTED]> To: "Marcus James Christ

Re: [PHP] Listing the contents of a directory in an array

2002-05-17 Thread Miguel Cruz
On Fri, 17 May 2002 [EMAIL PROTECTED] wrote: > I am a newbie so be kind > > I have looked into the manual about directory functions etc. > > I want to return all the files from a directory into a array. > > Could some one give me a few pointers or something? > > I keep getting confused but I h

[PHP] ob_start() and ob_gzhandler

2002-05-17 Thread Jason Soza
Just wondering what would cause the following: I have a 512/128 cable connection through my ISP that I'm hosting my sites through. I have a 10gb/mo transfer limit (u/l and d/l) so when I saw mention of the ob_gzhandler (and mod_gzip for Apache), that kind of got me interested in it. Anyway, I

Re: [PHP] apache redirect and request

2002-05-17 Thread Miguel Cruz
On Fri, 17 May 2002, Adrian Murphy wrote: > my isp has set up an internal redirect that > resolves www.mysite.biz to www.mysite.com > how can i check if the request was for the .biz version. If it's really a redirect, then I don't think you can; the browser makes a second request for www.mysite.

RE: [PHP] PHP & PDF

2002-05-17 Thread James E. Hicks III
I've gotta be able to do either one. Sometimes the script just stops with the PS and sends that in the email based on a flag. It depends on what format the customer prefers his invoices in. James -Original Message- From: Miguel Cruz [mailto:[EMAIL PROTECTED]] Sent: Friday, May 17, 2002 2

Re: [PHP] Avoiding 'page expired' warnings

2002-05-17 Thread Miguel Cruz
On Fri, 17 May 2002, Scott Graham wrote: > I've got a PHP powered site that involves some form submissions for searches > and when using the browser's 'back' button to return to the search results > page I get the horrible 'Page expired' warning due to the page being created > from variables sent

Re: [PHP] Q:Anybody using PHP directly on Mac-OSX???

2002-05-17 Thread Miguel Cruz
On Fri, 17 May 2002, Marcus James Christian wrote: > I love PHP but I haven't gotten deep into it because of the issue of > needed to upload it to my hosts server to test it. > > I'd love to get REALLY good with PHP, advanced shopping cart stuff, DB > etc. but I just know the way my mind works a

[PHP] Avoiding 'page expired' warnings

2002-05-17 Thread Scott Graham
Hi I've got a PHP powered site that involves some form submissions for searches and when using the browser's 'back' button to return to the search results page I get the horrible 'Page expired' warning due to the page being created from variables sent in a form. I know there is a way to avoid

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

2002-05-17 Thread Miguel Cruz
On Fri, 17 May 2002, Don wrote: > I have forms that retrieve date from mysql databases and send (for > storage) data to same databases. I note many functions to make sure > that the data is correct in appearance when it comes to special > characters. > > addslashes() > stripslashes() > htmlspeci

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

2002-05-17 Thread Analysis & Solutions
Don: > I have forms that retrieve date from mysql databases and send (for > storage) data to same databases. I note many functions to make sure > that the data is correct in appearance when it comes to special > characters. > > addslashes() > stripslashes() > htmlspecialchars() > htmlentities()

Re: [PHP] lists of headers

2002-05-17 Thread Miguel Cruz
On Fri, 17 May 2002, Joshua E Minnie wrote: > Can anybody tell me where I can find a list of all the possible headers that > I can use in the header function? I searched through the manual and can't > seem to find a list of headers. Everything's in the RFC. http://www.w3.org/Protocols/rfc2616/rf

[PHP] lists of headers

2002-05-17 Thread Joshua E Minnie
Can anybody tell me where I can find a list of all the possible headers that I can use in the header function? I searched through the manual and can't seem to find a list of headers. I need to know what header it is that display an "authorization required" or "forbidden" when my authentication fa

RE: [PHP] PHP & PDF

2002-05-17 Thread Miguel Cruz
On Fri, 17 May 2002, James E. Hicks III wrote: > I do a > >system("html2ps SOME.html > SOME.pd"); > > then I do a > >system("ps2pdf SOME.pd"); How about just: system('html2ps < some.html | ps2pdf > some.pdf'); ? miguel -- PHP General Mailing List (http://www.php.net/) To unsub

[PHP] Re: mysql error

2002-05-17 Thread Thomas Seifert
also try to: echo mysql_error(); after the select-query, it will tell you what went wrong. Thomas On Fri, 17 May 2002 18:45:07 +0100 [EMAIL PROTECTED] (Randum Ian) wrote: > Hi all, > > I have got this code but I can get it to work, it doesnt make sense! > > > > $host="localhost"; > $us

Re: [PHP] mysql error

2002-05-17 Thread Kevin Stone
The mysql_select_db() function is going to return a handle. You need to capture that handle and use it as the second parameter in your mysql_query() function. Although this is not required in certain cases where the server automatically knows which database to work with, chances are thats whats

Re: [PHP] Looking for web based email

2002-05-17 Thread Miguel Cruz
On Fri, 17 May 2002, Martin Wickman wrote: > Jared Boelens wrote: >> This is the one my company uses: >> >> http://nocc.sourceforge.net/ >> >> I found it very easy to modify, and it fully supports attachments as >> well as the related RFCs. > > I had problem with it, since it required imap stuf

[PHP] a set of *real* random numbers?

2002-05-17 Thread savaidis
I want to show in random way 8 pictures (jpg) from a collection of 20 I have , so the users have more interest to visit the page. I use the follow small code with the help from the manual: But the random numbers are all accending order for 1 -> 20 and in cycle, as the seed comes from computers

Re: [PHP] upload but restrict

2002-05-17 Thread Miguel Cruz
On Fri, 17 May 2002, r wrote: > Sorry for the late reply, > but i have a boss who wants everything done RIGHT NOW! > > Anyway, as an example think a person uploads a .php or .exe file, I just > dont want it to run on my webserver > how can i restrict him/her? Just make sure the uploads are i

[PHP] mysql error

2002-05-17 Thread Randum Ian
Hi all, I have got this code but I can get it to work, it doesnt make sense! but I am getting this error - "Warning: Supplied argument is not a valid MySQL result resource in /usr/home/e/a/eagadmin/public_html/main.php on line 14" but I dont understand why! Can anyone help? Regards, Ian. -

Re: [PHP] what does this mean in plain english?

2002-05-17 Thread Adrian Murphy
The ? in this senario is called the ternary operator basically shorthand for an if/else statement e.g $theValue = ($theValue != "") ? "'" . $theValue . "'" :"NULL"; is the equivalent of if($theValue != "") { $theValue =$theValue ; } else{ $theValue ="NULL"; } - Original Message - From:

Re: [PHP] what does this mean in plain english?

2002-05-17 Thread Analysis & Solutions
On Fri, May 17, 2002 at 12:23:45PM -0500, Jeff Field wrote: > I'm stumped by the > exact meaning in the following function of what the question mark's ("?") > and colon's (":"), mean and do? That's the "ternary" comparison operator. See http://www.php.net/manual/en/language.operators.comparison

Re: [PHP] what does this mean in plain english?

2002-05-17 Thread Stuart Dallas
On 17 May 2002 at 12:23, Jeff Field wrote: > $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; It's a shortened version of the if...else construct. As in... condition ? this_if_true : this_if_false -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe

[PHP] looking for training course in london

2002-05-17 Thread Adrian Murphy
Hi, anyone know/done good php training courses in london thx adrian

Re: [PHP] Comon guys, please help.

2002-05-17 Thread Jerome Houston
This isn't a php question, which is why you aren't getting any answers... there are many ways to go about this. with cybercash and payflow, and all other payment gateways, you DO need a merchant account. specifically, a merchant account that is compatible with the payment gateway you're trying

Re: [PHP] forms into database and visa versa

2002-05-17 Thread Analysis & Solutions
> Anyone have a link or links to how to definitively make safe inserts to > databases with form information? It's a good idea to validate all data you're sticking in before you do. For example, if you have a numeric field, you don't want the person to be able to submit letters in that field. So,

  1   2   3   >