[PHP] Re: Stepping through an array more than once (offlist)

2002-08-29 Thread Petre Agenbag
Hi Justin OK, a quick feedback on your previous suggestion: I tried to unset the $myrow_it, but it still didn't produce any output. The only way I could get it to work was with the same method you suggested in this e-mail. I had to create 2 new vars ( which basically boils down to 2 more SQL's).

[PHP] gettext

2002-08-29 Thread Marco Muratori
Hi I'm using gettext to add i18n to a web site, and it seems to work fine, but the translation is done randomly. I mean that if you reload many times the page, sometimes it gives back the translated message and sometimes the untranslated one. These are the steps I followed to use gettext with

Re: [PHP] Re: Stepping through an array more than once (offlist)

2002-08-29 Thread Jason Wong
On Thursday 29 August 2002 14:16, Petre Agenbag wrote: Hi Justin OK, a quick feedback on your previous suggestion: I tried to unset the $myrow_it, but it still didn't produce any output. The only way I could get it to work was with the same method you suggested in this e-mail. I had to

[PHP] Re: Stepping through an array more than once (offlist)

2002-08-29 Thread Justin French
1. did my code work? 2. It appears that you have to reset the mysql_fetch_*(), not reset the $myrow. Try calling: mysql_data_seek($result_it, 0) before while ($myrow = mysql_fetch_assoc($result)) It would appear that it resets the $result_it for a call to mysql_fetch_row(). I

Re: [PHP] Re: Stepping through an array more than once (offlist)

2002-08-29 Thread Petre Agenbag
Jason Sorry, I completely forgot to comment on your suggestion: I did try mysql_data_seek(), but it didn't work for me ( guess I don't know how exactly it works), BUT, it did look like it was meant for stepping through a one dimensional array, and $result is not a one dimensional array, right?

Re: [PHP] Re: Stepping through an array more than once (offlist)

2002-08-29 Thread Petre Agenbag
Jason Thanks the mysql_data_seek() works. With Justin's help, I used the mysql_data_seek() to reset the $result matrix to 0, and re-issued the same while statement. It now produces the desired output. Thanks. On Thu, 2002-08-29 at 08:46, Jason Wong wrote: On Thursday 29 August 2002 14:16, Petre

Re: [PHP] Re: Stepping through an array more than once (offlist)

2002-08-29 Thread Justin French
on 29/08/02 5:06 PM, Petre Agenbag ([EMAIL PROTECTED]) wrote: Jason Thanks the mysql_data_seek() works. With Justin's help, I used the mysql_data_seek() to reset the $result matrix to 0, and re-issued the same while statement. It now produces the desired output. Thanks. Of course I only

[PHP] Change user agent when using file() or fopen()

2002-08-29 Thread David Yee
How do I change the browser name and version presented to the target web server when I use file() or fopen()? E.g. ?php $content = file('http://foo.bar/foo.html'); ? The access_log for the web server will show something like: 127.0.0.1 - - [29/Aug/2002:00:08:59 -0700] GET /foo.html HTTP/1.0

[PHP] wish list for my host's new compile

2002-08-29 Thread Justin French
Hi all, My host is putting together a new linux box at the moment for hosting, and I want to make sure that they include a few things that I've needed, but weren't available on the current server. I've got about 15 domains with them, so it's not particularly easy to change hosts. A few things

[PHP] Where is my REMOTE_USER?

2002-08-29 Thread Frank
Hi, when logging in with username and password with the good old Require user mechanism in Apache I could earlier see the name of the user logging in as $REMOTE_USER. But it seems now to have disappeared. It seems to be nowhere, neither as $GLOBALS['REMOTE_USER'] $_SERVER['REMOTE_USER']

[PHP] Re: CHM 8th sample is out

2002-08-29 Thread Ulf Haueisen
Hi Goba, I'm able to confirm again that the sample 8 is working and looking great on Windows XP SP1 beta (includes IE6 SP1 beta) whether the show friendly error messages setting is enabled or not. Ulf. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: PHP: XML/XSL

2002-08-29 Thread Alexandru COSTIN
Hello For painless XML/XSL transformation on PHP, you should check Krysalis, the XML/XSL development framework. We have a lot of nice features packed in, like dynamic XML, multiple XSL transformations in a pipeline, etc. http://www.interakt.ro/products/Krysalis/

[PHP] Can I show input data whrn back to the Input Form?

2002-08-29 Thread Hakkan Lui
Dear all, In my php program, when user click submit on a form, it comes to a confirmation page, showing what the user entered in the form. If the user find want to re-enter the information, he press Back on the browser. Then it comes back to the form, with empty input. I want to ask: Can the

Re: [PHP] Can I show input data whrn back to the Input Form?

2002-08-29 Thread Justin French
Relying on the back button isn't good... the data may or may not be there when they return. However, you CAN provide them with a button change, and POST the data to a form... where they modify their data, the form needs to echo the POST data back into the form, eg: FORM action=validate.php

Re: [PHP] wish list for my host's new compile

2002-08-29 Thread Liam MacKenzie
I just happen to be re-compiling my hosting servers right now... I'll compile those things into PHP. If your sites are: non-profit personal development I'll host them free for you. Read up a few messages to one with the subject Hosts and look for one from me for more details. Cheers, Liam

[PHP] how to have a form keep values when user hits back button?

2002-08-29 Thread Jean-Christian Imbeault
I have php page that creates an html form. When the user hits the submit button another php script is called to parse the form and display some output. However I find that if I hit the back button the form values get reset. How can I make it so that if I hit the back button the values I

Re: [PHP] wish list for my host's new compile

2002-08-29 Thread Justin French
on 29/08/02 6:59 PM, Liam MacKenzie ([EMAIL PROTECTED]) wrote: I just happen to be re-compiling my hosting servers right now... I'll compile those things into PHP. If your sites are: non-profit personal development No, maybe 13 out of the 15 are commercial. And the other two aren't

Re: [PHP] how to have a form keep values when user hits back button?

2002-08-29 Thread Jason Wong
On Thursday 29 August 2002 17:22, Jean-Christian Imbeault wrote: I have php page that creates an html form. When the user hits the submit button another php script is called to parse the form and display some output. However I find that if I hit the back button the form values get reset.

Re: [PHP] how to have a form keep values when user hits back button?

2002-08-29 Thread Jean-Christian Imbeault
Jason Wong wrote: Have a look at the archives, it has just been answered: Thanks. Strange that two people ask the same question at almost the same time. However I did search the archives and read the answer to the recently posted question and the answers are less than ideal. All answers

Re: [PHP] how to have a form keep values when user hits backbutton?

2002-08-29 Thread Justin French
I just answered a similar question in another current thread a few mins ago... So I'll just copy and paste: --- Relying on the back button isn't good... the data may or may not be there when they return. However, you CAN provide them with a button change, and POST the data to a form... where

Re: [PHP] Where is my REMOTE_USER?

2002-08-29 Thread David T-G
Frank, et al -- ...and then Frank said... % % Hi, % % when logging in with username and password with the good old Require user % mechanism in Apache I could earlier see the name of the user logging in as % $REMOTE_USER. This sort of thing has come up on the list frequently. You should set

[PHP] tmpnam filename

2002-08-29 Thread Rus Foster
Hi All, I'm fairly new to this list/PHP and I've already hit a bit of a brick wall. I'm trying to write some data out to a temporary file then make a passthru call so that another program can take the file as input on the command line I first tried print pDo stuff/p; $temp = tmpfile();

[PHP] Debugging with the Viim editor?

2002-08-29 Thread Geoff Caplan
Hi folks Has anyone got a PHP symbolic debugger working with the Vim editor? I would appreciate any tips about how this might be set up. -- Geoff Caplan Advantae Ltd mailto:[EMAIL PROTECTED] http://www.advantae.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Getting local domain name in CLI

2002-08-29 Thread Geranium
I need to get the domain name of the local machine. I'm running a CLI script in PHP 4.3-cvs (on OpenBSD) so I have no HTTP or other global vars to look at. The posix_uname command doesn't include the domain on non-GNU OSs. I can get the hostname, but not the domain. Can I get it through some

[PHP] sysvshm examples?

2002-08-29 Thread Geranium
Can anyone point me at some examples of using sysv shared memory, particularly for passing values between a mod_php script and a PHP CLI process? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Where is my REMOTE_USER?

2002-08-29 Thread Frank
At 06:03 29/8/2002 -0400, David T-G wrote: Frank, et al -- ..and then Frank said... % % Hi, % % when logging in with username and password with the good old Require user % mechanism in Apache I could earlier see the name of the user logging in as % $REMOTE_USER. This sort of

[PHP] why does my querry work in the mysql client but not in php?

2002-08-29 Thread Michael Knauf
I'm in OS X 10.2 (Jaguar) Apache/PHP/MySQL are all playing happily together, so it's time to get some work done. From the MySQL client, this query does what I expect it to: update endpage set productname='Berenice lamp', bgcolor='eec472', imgsrc='bereniceep.jpg', img_orientation='horizontal',

[PHP] date from mysql

2002-08-29 Thread Hendråwan Rinäldi
i want Y (year format) printed on my php script (looping), i already tried it but i got same Year format (ex 1978) in all row in my table my loop script is: $query = (select * from table); $result = mysql_query($query); while ($row = mysql_fetch_row($result)) $number =

[PHP] Re: why does my querry work in the mysql client but not in php?

2002-08-29 Thread Jean-Christian Imbeault
Have you looked at what the value of what $result is? It might be informational. Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] foreach fails on unitialized array?

2002-08-29 Thread Eric Pignot
I would expect foreach to treat an unitialized variable as an empty array and hence do nothing. Is this the expected behaviour? if(is_array($myvar)) foreach($myvar as $key = $value ) { ... } other possibility, so that the foreach is run each time (and it doesn't affect the source code, you

[PHP] Re: tmpnam filename

2002-08-29 Thread Eric Pignot
Why do you use tmpfile and not tempnam, as you write it in the header of your message ? it returns the name of the file, as you expect... string tempnam ( string dir, string prefix) Then, you'll just need to open the file returned by tempnam and write all data inside... regards Eric Rus

[PHP] Re: Cannot get data from form.

2002-08-29 Thread Eric Pignot
This is really a FAQ, I would suggest that you read a bit more documentation before posting. Eric Le Van Thanh [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] - I have installed PHP4.2.2 with Apache 1.3.26 on Solaris7. And now I have problems with getting data from form. I

RE: [PHP] why does my querry work in the mysql client but not in php?

2002-08-29 Thread Jay Blanchard
[snip] from the php page however, it does not work, even though it appears to be generating a perfectly good querry... Here's the PHP $connection = mysql_connect(server, user, pass) or die(Couldn't connect.); $db = mysql_select_db($db_name, $connection) or die(Couldn't select database.); $query

[PHP] setcookie IE6 problem

2002-08-29 Thread Javier Montserat
I'm setting a session cookie with the following code - function setSessionCookie(){ $expires = time()+$this-session_expires; $issetCookie = setcookie($this-cookiename, $this-sess_id, $expires, /,

Re: [PHP] setcookie IE6 problem

2002-08-29 Thread Gregory Barker
MS has introduced p3p policy in IE6 which has impacted on cookies etc. If the site or host does not have a machine generated xml privacy statement, then stability with regards to cookies is not guaranteed. Do a search and read up about it. Check out w3c's site. - Original Message - From:

RE: [PHP] why does my querry work in the mysql client but not in php?

2002-08-29 Thread Jay Blanchard
[snip] 2. Trap MySQL errors for the query by doing something like this; if(!($result = mysql_query($query, ))){ print(MySQL reports: . mysql_error . \n); exit(); } [/snip] TYPO!!! :^] Should be mysql_error() (note the parentheses) HTH! Jay

[PHP] Re: Change user agent when using file() or fopen()

2002-08-29 Thread Bogdan Stancescu
You'll have to do it the hard way if you need that functionality - i.e. open a port on the remote machine (port 80), build a http query, send it and read from the port. That way you can control the whole process and send whatever browser identification, require certain languages, manage the

[PHP] working with ssl

2002-08-29 Thread Andy
Hi there, I would like to serve some php pages crypted with ssl. Now I am wondering what ssl sw to install. I found openssl but this seams to be in alpha stadium. How do I install ssl with php anyway. Can somebody give me a hint on that? Thanx in advance, Andy -- PHP General Mailing List

[PHP] resizing an image

2002-08-29 Thread ROBERT MCPEAK
Could someone show me some php that proportionally resizes an image? I'm collecting user sumbitted images and need them all to be within certain size constraints. What's the simplest, best way to do this? Sample code would be a huge help, as I'm a newbie and have not done anything with PHP

RE: [PHP] working with ssl

2002-08-29 Thread Scott Houseman
Hi Andy. I would recommend running PHP as an Apache module as well as mod_ssl - which will require openssl as well. Have a look at http://www.modssl.org Regards -Scott -Original Message- From: Andy [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 29, 2002 3:36 PM To: [EMAIL

[PHP] Re: working with ssl

2002-08-29 Thread Jean-Christian Imbeault
Use mod_ssl if you are doing apache. Have a look at: http://www.modssl.org/source/exp/mod_ssl/pkg.mod_ssl/INSTALL Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] resizing an image

2002-08-29 Thread Robert Cummings
ROBERT MCPEAK wrote: Could someone show me some php that proportionally resizes an image? I'm collecting user sumbitted images and need them all to be within certain size constraints. What's the simplest, best way to do this? Sample code would be a huge help, as I'm a newbie and have not

RE: [PHP] resizing an image

2002-08-29 Thread Liam . Gibbs
Could someone show me some php that proportionally resizes an image? I'm collecting user sumbitted images and need them all to be within certain size constraints. What's the simplest, best way to do this? Try out www.php.net/imagecopyresized or http://www.php.net/manual/en/ref.image.php if

Re: [PHP] resizing an image

2002-08-29 Thread ROBERT MCPEAK
Sheesh, I will. Thanks. Robert Cummings [EMAIL PROTECTED] 08/29/02 09:47AM ROBERT MCPEAK wrote: Could someone show me some php that proportionally resizes an image? I'm collecting user sumbitted images and need them all to be within certain size constraints. What's the simplest, best

Re: [PHP] setcookie IE6 problem

2002-08-29 Thread Javier Montserat
Thanks for the reply, a little more info below... Speaking of cookies, any general thoughts on the relative merits of using php's setcookie function vs. setting a cookie with a header() call? Are both methods equal? Will do more research later and post anything interesting on the IE6

[PHP] PHP and Transactions with InnoDB

2002-08-29 Thread Geranium
I could use some practical tips on doing transactions with InnoDB tables in MySQL. I want to grab and lock a record and do a whole load of related stuff, then make sure everything is updated in a consistent way, something like this skeleton: BEGIN SELECT * from blah WHERE something=n FOR

[PHP] Re: Cannot get data from form.

2002-08-29 Thread Brian Windsor
That's the way it works in the newer PHP for security reasons. I had to rewrite all my code about a week ago because my client was using php 4.2 and I had 4.0. It has to do with the Globals are set to being turned off in the php.ini file. You should be able to change the php.ini file to

Re: [PHP] PHP and Transactions with InnoDB

2002-08-29 Thread Miles Thompson
I've not worked with InnoDb, but given that the web is a stateless space and all kinds of things can happen, I'd be very reluctant to lock a record until the very moment I'm updating it. In other words, when I have my batch of updates and inserts ready to go, then I'd begin by transaction,

[PHP] Re: Cannot get data from form.

2002-08-29 Thread Javier Montserat
Turning off register globals and referencing variables through the new array syntax certainly gives a greater degree of control over the origin of data; ie: a variable referenced $_POST['foo'] has (most likely) been received as a result of http post and it's reasonably safe to assume

[PHP] sprintf() question

2002-08-29 Thread SpamSucks86
I read the manual page on sprintf, but I still don't understand exactly how the format string works. $money1 = 68.75; $money2 = 54.35; $money = $money1 + $money2; // echo $money will output 123.1; $formatted = sprintf(%01.2f, $money); // echo $formatted will output 123.10 How does that

Re: [PHP] PHP and Transactions with InnoDB

2002-08-29 Thread Geranium
In article [EMAIL PROTECTED], Miles Thompson [EMAIL PROTECTED] wrote: I've not worked with InnoDb, but given that the web is a stateless space and all kinds of things can happen, I'd be very reluctant to lock a record until the very moment I'm updating it. In other words, when I have my

[PHP] Print page

2002-08-29 Thread Rosen
Hi, I'm using PHP to generate some report for printing. But when I print report from IE 5.0 browser, in the bottom of page IE prints URL of page. Can I remove it ? Thanks, Rosen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Print page

2002-08-29 Thread Jay Blanchard
[snip] I'm using PHP to generate some report for printing. But when I print report from IE 5.0 browser, in the bottom of page IE prints URL of page. Can I remove it ? [/snip] Only in individual browser settings (like IE, File-Page Setup-Clear the Header and Footer boxes). There is no way to

RE: [PHP] Print page

2002-08-29 Thread Collins, Robert
yes, but that is a browser function not php goto file - page setup - then remove the header and footer data Robert W. Collins II Webmaster New Orleans Regional Transit Authority Phone : (504) 248-3826 Fax: (504) 248-3866 Email : [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] -Original

Re: [PHP] sprintf() question

2002-08-29 Thread @ Edwin
Experiment a bit and I'm sure you'll find it easy. One example, change this portion $formatted = sprintf("%01.2f", $money); to $formatted = sprintf("%01.3f", $money); then see how it works... ?php $money1 = 68.75; $money2 = 54.35; $money = $money1 + $money2; echo "This is money:

Re: [PHP] Print page

2002-08-29 Thread @ Edwin
Hi, I'm using PHP to generate some report for printing. But when I print report from IE 5.0 browser, in the bottom of page IE prints URL of page. Can I remove it ? Yes. Click on "File" - "Page settings..." then find "Footer" and you'll see something like this: ubd Take away the "u", print

[PHP] Re: wish list for my host's new compile

2002-08-29 Thread Philip Hallstrom
On Thu, 29 Aug 2002, Justin French wrote: Hi all, My host is putting together a new linux box at the moment for hosting, and I want to make sure that they include a few things that I've needed, but weren't available on the current server. I've got about 15 domains with them, so it's not

[PHP] Re: Getting local domain name in CLI

2002-08-29 Thread Philip Hallstrom
What about... $hostname = `/bin/hostname`; or something along those lines... On Thu, 29 Aug 2002, Geranium wrote: I need to get the domain name of the local machine. I'm running a CLI script in PHP 4.3-cvs (on OpenBSD) so I have no HTTP or other global vars to look at. The posix_uname

RE: [PHP] Building a query on multiple variables, how to test for which variable

2002-08-29 Thread @ Edwin
Does this fit your idea of a "more elegant solution"? This is just an enhanced and tested version of the one I posted earlier (somehow I had time and was curious about it). ?php if (isset($_POST['var'])){ // if POSTed // initial query // make sure "WHERE" not included when none is

[PHP] file creation question

2002-08-29 Thread John Hegele
I'm currently building a site for a band and one of the features I'd like to offer is vCalendar files that the user can download. I'd like to be able to pull values from a database to use in the file, but, rather than having the actual file on the server, I was hoping that I could create the

Re: [PHP] file creation question

2002-08-29 Thread Adam Williams
Search the archives, this was explained 2-3 days ago how to dynamically generate a while without creating one on the server. Adam On Thu, 29 Aug 2002, John Hegele wrote: I'm currently building a site for a band and one of the features I'd like to offer is vCalendar

[PHP] Re: Getting local domain name in CLI

2002-08-29 Thread Geranium
In article [EMAIL PROTECTED], Philip Hallstrom [EMAIL PROTECTED] wrote: What about... $hostname = `/bin/hostname`; or something along those lines... Well that's rather the kind of thing I was wanting to avoid - it's much akin to rummaging in /etc. the hostname command gives me my

[PHP] Set Variable to Multiple Lines

2002-08-29 Thread Mike richardson
I've been searching for this old php feature (perhaps it was deprecated), and can't get the right keywords to look it up. There was a way, similar to the perl method shown below, to set multiple lines of data equal to a variable. (in perl) $variable = __SOME_HEADER_HERE__ Put whatever is

[PHP] Reading header information

2002-08-29 Thread jimmy
What I'd like to do is get some of the information found when you do a telent on port 80 like this below.. telnet www.hostname.com 80 Trying www.hostname.com... Connected to.www.hostname.com Escape character is '^]'. HEAD / HTTP/1.0 HTTP/1.1 200 OK Date: Thu, 29 Aug 2002 17:00:09 GMT Server:

[PHP] Odd URL problem

2002-08-29 Thread Steve Lane
Hello all: I'm seeing an odd problem after I moved a large PHP application from one server to another. Part of the system sends an email to users, containing a clickable http:// link. The link includes a parameter called goto, which bundles up a set of name-value pairs, which indicate the

RE: [PHP] Odd URL problem

2002-08-29 Thread Jay Blanchard
[snip] So it seems that the browser in the failing case is trying to deal with the URL in its encoded form. Anyone have any ideas about what I'm missing? [/snip] A quick thought, run ?php php_info(); ? and see what register_globals is set to in the php.ini HTH! Jay -- PHP General Mailing

Re: [PHP] Set Variable to Multiple Lines

2002-08-29 Thread Michael Sweeney
What you're looking for seems to be called the 'here document' syntax. I've always seen it used with print and there's a reference to it in the print function (okay, construct) PHP documentation, but a quick test shows that you can also use it to assign to variables. As follows: $var = END

[PHP] CURL without --with-curl

2002-08-29 Thread Henry
How can I use CURL if I cannot recompile PHP with --with-curl. I am using PHP4.2.2 on a shared server with an ISP so I do not get the ability to recompile. Hope someone can make a suggestion. I want to be able to do GET and POST requests of pages easily to Google. TIA Henry -- PHP

RE: [PHP] CURL without --with-curl

2002-08-29 Thread Jay Blanchard
[snip] How can I use CURL if I cannot recompile PHP with --with-curl. I am using PHP4.2.2 on a shared server with an ISP so I do not get the ability to recompile. [/snip] Use cURL from the command line with an exec() in your PHP script. HTH! Jay

[PHP] FW: php question

2002-08-29 Thread Andrew Fry
hi, sorry to trouble you, but i am a beginner php programmer and i have a quick question. i got your email from a php newsgroup. i'm using a statement like: if ( preg_match(/\\$word/i,$keywordHash[$keyID][0] 0) { ... } which works fine if word is a word like reference or even p4dp8, but when

Re: [PHP] Print page

2002-08-29 Thread Rosen
Thanks very much Rosen Jay Blanchard [EMAIL PROTECTED] wrote in message 003601c24f79$7ed376a0$8102a8c0@000347D72515">news:003601c24f79$7ed376a0$8102a8c0@000347D72515... [snip] I'm using PHP to generate some report for printing. But when I print report from IE 5.0 browser, in the bottom

Re: [PHP] Print page

2002-08-29 Thread Rosen
Thanks very much Rosen Robert Collins [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... yes, but that is a browser function not php goto file - page setup - then remove the header and footer data Robert W. Collins II Webmaster New Orleans Regional

Re: [PHP] Problems with PHP and Apache..

2002-08-29 Thread kawaii
Ok, I tried some different ways of compiling, but it still doesn't seem to find the following: symbol not found: top_module (/usr/apache/libexec/libphp4.so) symbol not found: ap_user_name (/usr/apache/libexec/libphp4.so) symbol not found: ap_max_requests_per_child

[PHP] variable reference parameters

2002-08-29 Thread Timo Ewalds
I've created (with help from some code from the site) a function to make strings or arrays mysql safe. It works just fine, assuming you pass your variables by reference ( sqlSafe($var) ), but I get this error every time it is used: [error] PHP Warning: Call-time pass-by-reference has been

[PHP] count errors

2002-08-29 Thread WANDA HANSEN
I have a function that resets the count of fields with certain values when called. 99.9 percent of the time it works fine. However occaisionally it wont update the database. Even after breaking the selects up it still fails sometimes. If anyone has an idea of why I would really appreciate hearing

[PHP] GD Graphics Library

2002-08-29 Thread René Fournier
There are several functions in the GD library that I really, really want to be able to use on several sites that I develop/manage. Unfortunately, the ISP I use, FatCow, doesn't have GD, nor seems interested in adding it. Can anyone recommend a good, cheap ISP (like FatCow) that DOES have GD

Re: [PHP] variable reference parameters

2002-08-29 Thread DL Neil
Timo, If you use func_num_args() to ascertain the number of arguments passed to the function and func_get_arg() to retrieve each argument in turn (from a list of unstated length), will that do the trick? Regards, =dn I've created (with help from some code from the site) a function to make

[PHP] PASSWORD()

2002-08-29 Thread Victor
Is PASSWORD() still usable? I used it in my scripts a while ago to encrypt and decript password strings that I stored into databases, but from some time all my scripts don't work (the login part) because I cannot do a mysql query like so: $sql = SELECT * FROM users WHERE username =

[PHP] Output php code

2002-08-29 Thread apollo
Is there any function in php to show source code like this: http://www.php.net/source.php?url=/index.php How do they do this ? I mean all these colors. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Output php code

2002-08-29 Thread Philip Hallstrom
http://www.php.net/manual/en/function.show-source.php On Thu, 29 Aug 2002, apollo wrote: Is there any function in php to show source code like this: http://www.php.net/source.php?url=/index.php How do they do this ? I mean all these colors. -- PHP General Mailing List

[PHP] Re: Output php code

2002-08-29 Thread apollo
http://www.php.net/manual/en/function.show-source.php thanks, i'm so lazy :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: file creation question

2002-08-29 Thread MikeTsapenko
Hello, John. Just use such code: header(Content-type: application/octet-stream); header(Content-Disposition: attachment; filename=\$item[file_name]\); header(Content-length: .strlen($item[file_content])); echo $item[file_content] This should work... -- Mike Tsapenko Chief

[PHP] How to handle multiple value checkboxes

2002-08-29 Thread Lon Lentz
If I have a form with multiple checkboxes with different values but the same name, and someone selects a couple of them, how do I reference all of the values? Right now I am only getting the last one selected. __ Lon Lentz Applications Developer EXImpact.com --

[PHP] Session 4.2.2

2002-08-29 Thread Breno Cardoso Perucchi
I would like to know if there are any changes on session of PHP between the version 4.1.0 and 4.2.2? Thanks. Breno Cardoso Perucchi [EMAIL PROTECTED] Consultor - Omega Tecnologia http://www.omegatec.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: How to handle multiple value checkboxes

2002-08-29 Thread Matthias Stürmer
hi lon thats because for the same variable can be submitted only one value. make an array (like variable[]) out of your variable and then parse it with foreach() for working with the values selected by the user. hope you understand what i'd like to say. my english is not too good. bye, matt

Re: [PHP] How to handle multiple value checkboxes

2002-08-29 Thread Kevin Stone
form method=post action=formhandler.php input type=checkbox name=colors[] value=red input type=checkbox name=colors[] value=green input type=checkbox name=colors[] value=blue /form This creates the indexed array $_POST['colors']. The array will only have as many values as were checked. In

[PHP] Reading from a file using fgets()

2002-08-29 Thread David Christensen
When PHP reads from a file using fgets(), does it do it in order? Meaning, when reading STDIN from a file, does it read line1, then line2, line3, and so on until EOF? My purpose is to read each line of file and push it into an array. Thanks for your help, Dave -- PHP General Mailing

[PHP] Re: Session 4.2.2

2002-08-29 Thread Dallas Thunder
If you encounter any problem with session variables, it may not caused by session. An important change between 4.2.0 or above and versions below is that the 'register_globals' directive will be set Off by default in 'php.ini' file. So you can't access session variables (e.g. $var) directly,

RE: [PHP] How to handle multiple value checkboxes

2002-08-29 Thread Short, Chad
Use the [] along with the type of input you are using. Example: Select NAME=THING[] MULTIPLE This will send php an array of $thing with whatever is selected. Hope this helps. Chad. -Original Message- From: Lon Lentz [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 29, 2002 4:07 PM

RE: [PHP] How to handle multiple value checkboxes

2002-08-29 Thread Lon Lentz
That did the trick. Thanks! -Original Message- From: Short, Chad [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 29, 2002 5:38 PM To: Php-General@Lists. Php. Net Subject: RE: [PHP] How to handle multiple value checkboxes Use the [] along with the type of input you are using.

Fw: [PHP] variable reference parameters

2002-08-29 Thread Kevin Stone
Timo, This is just an idea. How about using the get_defined_vars() function, extracting the desired user defined variables, storing them in one array, and then sending that array as the single parameter to your sqlSafe() function? http://www.php.net/manual/en/function.get-defined-vars.php

[PHP] Re: Session 4.2.2

2002-08-29 Thread Breno Cardoso Perucchi
Hi, Do you have an example? Thanks. Breno Cardoso Perucchi [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I would like to know if there are any changes on session of PHP between the version 4.1.0 and 4.2.2? Thanks. Breno Cardoso Perucchi [EMAIL PROTECTED]

[PHP] Re: Reading from a file using fgets()

2002-08-29 Thread Dallas Thunder
Well, this is exactly what function file() does. David Christensen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... When PHP reads from a file using fgets(), does it do it in order? Meaning, when reading STDIN from a file, does it read line1, then line2, line3,

[PHP] Re: PASSWORD()

2002-08-29 Thread Mike Tsapenko
Hello, Victor. Your queries seem to be OK. The second one has typo: after should be single quot. Anyway this is a problem with MySQL but not with PHP. -- Mike Tsapenko Chief of Web-development Dept. AlarIT http://www.AlarIT.com Victor [EMAIL PROTECTED] ???/ ?

[PHP] credit card auth using curl function

2002-08-29 Thread phplist
Hi, I am using the CURL command to post credit card info to a gateway .exe program on a secure server. The code below works fine to produce the comma delimitted credit card authorization information to the browser page (for example: declined,Invalid form data posted,8/29/2002,18:07,0,0 ), but

RE: [PHP] How to handle multiple value checkboxes

2002-08-29 Thread Lon Lentz
Yes it does. It's unfortunate that PHP treats it this way. It makes using dynamic checkbox inputs a lot more difficult than it should be. ColdFusion and, I believe, ASP make a comma delimited list. But I did find a little snippet which allows me to cheat the need for a key in the input tag. If

[PHP] Re: Session 4.2.2

2002-08-29 Thread Dallas Thunder
Just edit your 'php.ini' file, if 'register_globals = Off', then set it to On. It will solve a lot of problems if you are learning PHP from examples. Breno Cardoso Perucchi [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, Do you have an example? Thanks.

[PHP] eregi_replace() problems

2002-08-29 Thread Tony Harrison
Can anyone tell me why my emoticons arent appearing? Please? Note: $message is a variable set by a web form. The field `pattern` is the string to search for, like :-), and `url` is the relative url to the emoticon. I just get the plain emoticon. Note: this bit is above the INSERT statement in

[PHP] Re: PASSWORD()

2002-08-29 Thread Tony Harrison
I asked a similar question the other day, I was told to use the password function on the field name, not the value, i havent tested this and its a weird way to do things, and why cant both work? (if any) Mike Tsapenko [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL

[PHP] Re: credit card auth using curl function

2002-08-29 Thread Mike Mannakee
Absolutely. Your best bet, leaving the most visible way of tracing the steps on any authorization, would be to save the returned string to a file. Open the file and pass the handle to CURL_SETOPT like curl_setopt($ch, CURLOPT_FILE, $return_data_fp); Then have your script parse the data and

  1   2   >