RE: [PHP] Arrays/Hashes

2001-12-19 Thread Jerry Verhoef (UGBI)
You forgot the printf method printf(Some text %sBR\n,$myhash['mykey']); Jerry -Original Message- From: jimtronic [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 5:59 PM To: TD - Sales International Holland B.V. Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Arrays/Hashes I've

RE: [PHP] Re: max # of characters for links to work in emails?

2001-12-19 Thread Jerry Verhoef (UGBI)
The maximum allowed of characters in a domain name is 3 (www) + 64 (domainname) + 3 (tld) = 70 chars. So if you try to limit it within the 70 chars you should be safe. Jerry -Original Message- From: Chris Lee [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 6:10 PM To: [EMAIL

RE: [PHP] Re: max # of characters for links to work in emails?

2001-12-19 Thread Richard Black
Don't think thats necessarily true - what about news.bbc.co.uk or games.yahoo.com. Neither of them fits into the spec you described there... Richy -Original Message- From: Jerry Verhoef (UGBI) [SMTP:[EMAIL PROTECTED]] Sent: 19 December 2001 08:41 To: 'Chris Lee'; [EMAIL

RE: [PHP] Re: MySQL Native Function in PHP Query Not Working?

2001-12-19 Thread Jerry Verhoef (UGBI)
LAST_INSERT_ID() only works in a select. This should be the correct syntax, but MySQL 3.xx.xx doesnot support SubQueries. I believe that MySQL 4 does or will in the near future. SELECT * FROM table WHERE aid=(SELECT LAST_INSERT_ID()) Jerry Verhoef -Original Message- From: Chris Lee

RE: [PHP] Re: max # of characters for links to work in emails?

2001-12-19 Thread mweb
The maximum allowed of characters in a domain name is 3 (www) + 64 (domainname) + 3 (tld) = 70 chars. So if you try to limit it within the 70 chars you should be safe. Uh? First of all it should be 73 (what listed plus three dots). In the second place, do you mean allowed as in what *I*

RE: [PHP] Re: max # of characters for links to work in emails?

2001-12-19 Thread Jerry Verhoef (UGBI)
There are even more variants possible. But I am trying to get into the minds of the programmers of the Email clients, what THEY would consider the biggest allowed URL. But of course an URL could be bigger (2kb if my memory serves me correctly) And the Question was: max # of characters for links

RE: [PHP] Re: max # of characters for links to work in emails?

2001-12-19 Thread Lawrence . Sheed
http://www.isi.edu/in-notes/rfc1034.txt excerpted: To simplify implementations, the total number of octets that represent a domain name (i.e., the sum of all label octets and label lengths) is limited to 255. unless using one of the new extended names..., but I digress Typically URL's work

[PHP] RE: [PHP-DB] Re: while...if statements???

2001-12-19 Thread matt stewart
and i always thought the best tactic was to go ugly early. seriously, this isn't really that ugly a solution, most textbooks tend to tell you to use this method to start with as its a bit simpler to understand for beginners - an if...else statement to see if an initial row is returned, then you

Fwd: [PHP] Re: need some help

2001-12-19 Thread TD - Sales International Holland B.V.
Hey you might wanna look at this: http://www.mysql.com/articles/ddws/index.html it's a tutorial to PHP with MySQL, I sure liked reading it. I also got a book the PHP 4 Bible. The dutch translation has some translation errors but the english version should be fine. Has nice examples et al.

[PHP] Client Side Printing

2001-12-19 Thread Ye Tun
Hello, I am not sure if this is common question. I am just starting to write php code and I found one problem with printing. If my php server is sitting on 5th floor of our network and staff at 1st floor want to print the page without those URL and header included in the printout (just like

[PHP] inscription

2001-12-19 Thread SIM/HAOUHACH
Lynda Haouhach Ingénieur système SONATRACH Email :[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

[PHP] $PHP_SELF not working -please help

2001-12-19 Thread Caleb Carvalho
Hi there, I have created a script that is suppose to get some input from user and display back, and i have the following method FORM METHOD=POST ACTION=? echo $PHP_SELF ? so i have a script that if login fails it will ask the user to register, if(!$username) { session_unregister(userid);

[PHP] php telnet

2001-12-19 Thread kancha
The following code generated garbase output. what is wrong ?? ?php $sp = fsockopen(localhost, 23); if(!$sp){ echo error; exit; } socket_set_blocking($sp, FALSE); function getLine(){ global $sp; $op = fgets($sp, 1024); while(empty($op)){ $op = fgets($sp,

Re: [PHP] Client Side Printing

2001-12-19 Thread Miles Thompson
Turn that off in the browser print setup dialog. Alternately, there may be a Javascript function to do that, but if I was a user I would not be happy if code in a page messed with my settings. Remember PHP is server-side, not client side. Miles At 10:21 AM 12/19/2001 -0700, Ye Tun wrote:

[PHP] array_walk() and class methods

2001-12-19 Thread php4
i have class instance snagfu, of class snafu, with a method, fubar() i have an array, $tarfu, and want to run it through array_walk(), array_walk($tarfu, $snagfu-fubar) seems to be logical, if it's possible. this obviously doesn't work. How do i use a class method with array walk? or is it

[PHP] Random

2001-12-19 Thread Necro
Lo all, Can anyone please explain why this doesn't work... $floor = 10; $ceiling = 99; srand((double)microtime()*100); $random = rand($floor, $ceiling); I get the error... Warning: rand(): Invalid range: 10..99 in

Re: [PHP] php telnet

2001-12-19 Thread Mirek Novak
... and what did you expect? :o) Telnet uses charcters under ascii[32] to sync and manage connection/session - try http://www.faqs.org/rfcs/rfc854.html - description of TELNET protocol. M.N. -- kancha wrote: The following code generated garbase output. what is wrong ?? ?php $sp =

Re: [PHP] addslash/stripslashes

2001-12-19 Thread TD - Sales International Holland B.V.
On Wednesday 19 December 2001 13:12, you wrote: test\ === 'test' evals true :-) what I don't get however, the second the var is set like $string = escaping \ quotes; the backslash dissapears in the variable. The backslash is no longer there thus so having the statement mysql_query(insert into

RE: [PHP] Sending out mass mail without having timeout problems ..

2001-12-19 Thread Robert V. Zwink
?php // put this stuff at the top of the program set_time_limit(0); ignore_user_abort(1); // your mail stuff goes here // once you access the script, close your browser, // it should run in the background until finished. ? http://www.php.net/manual/en/function.set-time-limit.php

[PHP] HTTP_POST_FILES not working with 4.1.0?

2001-12-19 Thread Ron Dyck
Having trouble with HTTP_POST_FILES not working under 4.1.0. Track vars is enabled, and HTTP_POST_VARS works fine. Anyone experiencing simular problems? === Ron Dyck WebbTech www.WebbTech.net [EMAIL PROTECTED] 905 734-1164 -- PHP General

Re: [PHP] HTTP_POST_FILES not working with 4.1.0?

2001-12-19 Thread Andrey Hristov
Try $_FILES array, if it works that means that register_globals is off. Regards, Andrey - Original Message - From: Ron Dyck [EMAIL PROTECTED] To: PHPList [EMAIL PROTECTED] Sent: Wednesday, December 19, 2001 4:41 PM Subject: [PHP] HTTP_POST_FILES not working with 4.1.0? Having

RE: [PHP] HTTP_POST_FILES not working with 4.1.0?

2001-12-19 Thread Richard Heyes
Try $_FILES array, if it works that means that register_globals is off. $HTTP_POST_FILES is present with either setting of register_globals, and fwiw is working fine here with 4.1.0. Bear in mind that you still need to global it if inside a function, whereas with $_FILES you don't - it's a

Re: [PHP] Working with designers...

2001-12-19 Thread Erik Price
Hmm... can you point out to them that there's a similarity between using an external style sheet and using header/footer includes? And that as a coder, it would be your responsibility to maintain these include files, not theirs? Personally, I think .css external style sheets are awesome --

[PHP] form layout tool

2001-12-19 Thread Kelly Meeks
On going Cold Fusion convert question... I use CF Studio as my primary editor. When working with cold fusion itself, it will let you specify an database and table, and it will then create a series of html forms that allow you to add/edit/delete information in that table. Very, very handy.

[PHP] outputting db content

2001-12-19 Thread Kelly Meeks
Silly question, Does anyone have a quick example of how you would show X numbers of database records at a time from a query? (you know, list 25 of 400 records with next/previous navigation)... Thanks Kelly -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

[PHP] sessions var

2001-12-19 Thread William Sanchez Sanchez
I need some help with sessions. I need to pass variables to a page that will load in a new browser window (window.open(,myWindow,) and form ... target=myWindow). I used session_register and I tried using start_session and still no luck. Once I get the session vars registered, how do I

RE: [PHP] Client Side Printing

2001-12-19 Thread Robert Klinkenberg
As the printing is done by the browser and not by anything controlled by PHP, it is impossible to create a solution for this with PHP. You might be able to change your browser settings with some javascript for this function but not with PHP. Remember: PHP is run on the webserver and returns a

Re: [PHP] JavaScript php question - mainly JS though so slightly OT but hep needed!!! :o)

2001-12-19 Thread Martin Hughes
Many Thanks everyone!! Mart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

[PHP] Re: outputting db content

2001-12-19 Thread Manuel Lemos
Hello, Kelly Meeks wrote: Silly question, Does anyone have a quick example of how you would show X numbers of database records at a time from a query? (you know, list 25 of 400 records with next/previous navigation)... You may want to try this class that does exactly what you want and

Re: [PHP] outputting db content

2001-12-19 Thread TD - Sales International Holland B.V.
On Wednesday 19 December 2001 16:28, you wrote: yea that's easy :-) first I have to tell you that the first result is numbered 0 like in arrays ok? now you would do a select like this select * from table limit 10; this will give you the first 10 results since you didn't supply a start number

[PHP] Re: [PHP-DB] Re: while...if statements???

2001-12-19 Thread Chris Lee
personal pref. Once I knew php and mysql better I wrote my own wrappers, I found using them easier. But there is no reason why someone couldnt do fine without one. writing a set of wrappers allowed me to better optimize my queries and write code faster without having to worry about everything

[PHP] ldap rename, anyone? help!

2001-12-19 Thread Greg Ulyatt
I'm having a great deal of trouble with the new ldap_rename function... it won't seem to work for me at all! I am running on the following: Solaris 8 on Ultra1e (dev server, 256M ram) OpenLDAP 2.0.18 PHP 4.1.0 I can set the LDAP version no problem (from 2 to 3 to have this function), but every

[PHP] regular expression

2001-12-19 Thread Wakan
Hi, Can you help me on this simple regexp? I've this string: $testata = tr bgcolor=\#FF9900\ valign=\middle\td colspan=\2\ align=\center\ height=\11\div align=\left\ class=\titoliblu\NEWS A ROTAZIONE/div/tdtd class=\titolipiccolibianchi\ align=\center\ height=\11\ width=\10%\cancella/td/tr; and

[PHP] array_walk() + class methods

2001-12-19 Thread Jeff Levy
I'd like to call a class method with array_walk(). Is this possible? class widget { function sicballs($arg){ print $arg; } } $x = new widget(); $ar = array('my','values'); array_walk($ar, ???) ... the only way I've been able to get this (simplified) code to work the way I want it

[PHP] Re: Random

2001-12-19 Thread David
should be because rand() can\'t generate such a large number for u. use $max_random_number = getrandmax(); to check http://sg.php.net/manual/en/function.getrandmax.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

RE: [PHP] regular expression

2001-12-19 Thread Darren Gamble
Good day, The problem here is with the .* expression, which matches any character, including . The regex is greedy and will try and match as much as it possibly can. What you could do is change it so that it doesn't match . Then, the will be matched later in the expression,, as you want.

[PHP] QUESTION: how to validate credit card number before sent to Versign?

2001-12-19 Thread sgibbs
We collect credit card info. on our site and send it to Verisign for processing. We collect the credit card info. on the last page of our registration form. We have about 50% of the credit card numbers declined because people use dashes in their cc number (even though our directions ask them

[PHP] Socket functions

2001-12-19 Thread David
Hi, just wondering if anyone have tried the socket functions in php http://www.php.net/manual/en/ref.sockets.php does it work on win32(apache)? i tried the simple TCP/IP example on that page but it does\'nt work for me. I\'m using 4.1.0 and enabled that entension already. -- PHP General

Re: [PHP] Random

2001-12-19 Thread Knut H. Hassel Nielsen
On Thu, 20 Dec 2001, Necro wrote: Lo all, Can anyone please explain why this doesn't work... $floor = 10; $ceiling = 99; srand((double)microtime()*100); $random = rand($floor, $ceiling); I get the error... Warning: rand(): Invalid

Re: [PHP] Re: Random

2001-12-19 Thread Knut H. Hassel Nielsen
On 19 Dec 2001, David wrote: should be because rand() can\'t generate such a large number for u. use $max_random_number = getrandmax(); to check http://sg.php.net/manual/en/function.getrandmax.php Hmmm... My webserver gives me no problems witht this at all. (Sun E250 with Solaris 8,

[PHP] session destroy ??

2001-12-19 Thread Olivier Masudi
In my online store i use session. I use a script to check that a user dont make 2 order during the same session using the back button for that i put his sessionid in the db and check it before processing the order. My probleme is how can i give a new session_id to the person when he goes back

Re: [PHP] QUESTION: how to validate credit card number before sent to Versign?

2001-12-19 Thread Jon Farmer
I presume you are sending the details to verisign by posting the info from the form directly to versign. If this is the case the post to a local php script, do the validation and then use the http_post class from http://phpclasses.upperdesign.com/ to send it to verisign Regards Jon -- Jon

Re: [PHP] QUESTION: how to validate credit card number before sent to Versi gn?

2001-12-19 Thread John S. Huggins
Look at the strings section of the PHP online manual. The function of choice is probably something like str_replace(). Not sure if this is the correct thing, but I know you can do what you want with a PHP string function. Good luck and make sure to keep those damn CC numbers nowhere on your

[PHP] reading a file into a string problem : $string = join ('', file (/location/$dynamic.iq))

2001-12-19 Thread Lee Philip Reilly
Hi, I wonder if someone can help me solve this niggling problem: I have a hyperlink [javascript:openwindow('http:myserver/files.php?expid=67.iq')], which passes the argument 'expid' to the PHP script, where 'expid' is the name of a file. I want to take the file data and put it into a string.

[PHP] exit() summary

2001-12-19 Thread exit
Hello, As Jani wrote in an earlier e-mail, we have a problem with exit(). If you pass it an integer, like exit(1), it will set the exit status to 1, and _print_ 1 to the output stream. Ok, that was the problem, this are the solutions: 1. We fix exit, so that it does not print the value if it

[PHP] Re: reading a file into a string problem : $string = join ('', file (/location/$dynamic.iq))

2001-12-19 Thread Lee Philip Reilly
Okay, I see the problem. No reply necessary. Cheers, Lee -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] How should I do this site...?

2001-12-19 Thread Knut H. Hassel Nielsen
Hi there Have you tried putting this into your '.htaccess' for each hierarchy, so that it will use a different 'master.inc' for each hierarchy ? Then you could divide the master.inc into three master.incs that could include the files they needed for each of the sections. .htaccess --

[PHP] dns

2001-12-19 Thread LaserJetter
Is there a way to set up a php page to act as a name server under windows? I dont have named etc on that OS. I was thinking of maybe having PHP read from the port used for DNS services and recording the MAC address of the machine in a dateabse for example and linking this to a name i.e.

Re: [PHP] addslash/stripslashes

2001-12-19 Thread Don Read
On 19-Dec-2001 TD - Sales International Holland B.V. wrote: On Wednesday 19 December 2001 13:12, you wrote: test\ === 'test' evals true :-) what I don't get however, the second the var is set like $string = escaping \ quotes; the backslash dissapears in the variable. The backslash is no

[PHP] Help on dealing with arrays of HTTP_POST vars

2001-12-19 Thread Carlos Fernando Scheidecker Antunes
Hello All, I have developed a system to retrieve data from a table. The interface is a dynamic list of orders created from a query on the database that shows all the new orders. Next to each is a checkbox. Each checkbox has as its value the order number and is called PED1, PED2,

Re: [PHP] Help on dealing with arrays of HTTP_POST vars

2001-12-19 Thread Jim Lucas
in your SearchOrder() function change the for() to a foreach() Jim - Original Message - From: Carlos Fernando Scheidecker Antunes [EMAIL PROTECTED] To: PHP-GENERAL [EMAIL PROTECTED] Sent: Wednesday, December 19, 2001 10:15 AM Subject: [PHP] Help on dealing with arrays of HTTP_POST vars

[PHP] split/join error

2001-12-19 Thread mailing_list
Hi, I have saved an email as text-file, and want to get header and body out of the file! (header and body are seperated by the first empty line!) so I do: list($header,$body)=split(\n\n,join('',file($FILE)),2); then I need the body's lines as array: $body=split(\n,$body); but this line gives me

[PHP] Re: Socket functions

2001-12-19 Thread J Smith
I've been using them for months without any major problems. (There was a slight bug in socket_select() that caused some undesireable behaviour, as it wouldn't allow for indefinite blocking, but I submitted some patches and it was eventually fixed.) I have a search engine running that was

Re: [PHP] $PHP_SELF not working -please help

2001-12-19 Thread Steve Edberg
Is the code below in a function? If so, you'll have to globalize $PHP_SELF: function your_function() { global $PHP_SELF; ... echo $PHP_SELF; .. } alternatively, you could do function your_function() {

[PHP] Re: How should I do this site...?

2001-12-19 Thread Philip Hallstrom
I just did this for a site awhile back. All the pages use the same template, but you could modify pretty easily.Build out an array like the one below that defines your entire site heirarchy. In my example, I set the url, title, alttext (for the image button), the image name (for javascript

[PHP] RE: How should I do this site...?

2001-12-19 Thread Martin Hughes
Thank you! What is the point of using unset here (sorry - newbie question I know but I'm learning all the time :o)) Is it possible therefore to create more than 2 levels this way? If my heirachy goes 3 or 4 levels deep in some places? And could I also get a navbar to be generated dynamically

[PHP] RE: How should I do this site...?

2001-12-19 Thread Philip Hallstrom
unset will unset a varialbe. In the case I had I used to make sure that my $subAry was being unset before using it (I use it several places since several sections had sub sections). And yes, you can nest this as deep as you want since it is really just a tree. You start at the top and walk all

RE: [PHP] regular expression: THANK YOU!!!!!!

2001-12-19 Thread Darren Gamble
Good day, There's a link on PHP's site to http://www.phpbuilder.com/columns/dario19990616.php3 . It looks pretty good. There are many other sites on the 'Net with regular expression references/tutorials. You can probably find some more with just a search engine.

[PHP] Re: $PHP_SELF not working -please help

2001-12-19 Thread Phillip Oertel
Now for some strange reasons it tries to access my web direcorty that does not contain any file, and i get the 404 page not found error. check the source code of the html page. most likely you will see: FORM ... ACTION=. if not, it will still give you a hint about what's going wrong. are

[PHP] Re: session destroy ??

2001-12-19 Thread Chris Lee
?php session_start(); // destroy the session session_destroy(); $p = session_get_cookie_params(); // destory the cookie setcookie(session_name(), '' , 0, $p['path'], $p['domain']); // redirect without the SID for trans-sid users header(Location: http://$SERVER_NAME;); ? works for me. yes

Re: [PHP] sessions var

2001-12-19 Thread Chris Lee
as long as your start the session on the new page everything will work. are your clients not using cookies? and you have trans-sid enabled? you'll need to pass the SID to the new page then obv. -- Chris Lee [EMAIL PROTECTED] William Sanchez Sanchez [EMAIL PROTECTED] wrote in message

[PHP] Book.

2001-12-19 Thread Mehmet Kamil ERISEN
Hi All, I have a good understanding of PHP. I like to read more documentation advanced PHP topics and also some more information on how to run PHP from Unix, as a cron job, how can PHP scripts be called from Shell Scripts etc... Any book or doc suggestions. Thanks, erisen. = Mehmet Erisen

[PHP] Re: php telnet

2001-12-19 Thread Chris Lee
if I nc to my server on port 23 I get the same thing. ie there is nothing wrong. your going to have to emulate the telnet protocal now, thats just the connect string. -- Chris Lee [EMAIL PROTECTED] Kancha [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... The following code

[PHP] Re: inscription

2001-12-19 Thread Chris Lee
thanks for the inscription. here's mine. -- Chris Lee [EMAIL PROTECTED] Sim/Haouhach [EMAIL PROTECTED] wrote in message 58C7D97FA088D31190FD0090277B017502EA06DC@EXCHANGE">news:58C7D97FA088D31190FD0090277B017502EA06DC@EXCHANGE... Lynda Haouhach Ingénieur système SONATRACH Email :[EMAIL

Re: [PHP] sessions var

2001-12-19 Thread Mehmet Kamil ERISEN
One problem that I have with sessions it that if your login page is in www.yoursite.com and the you pop a page yoursite.com I think the Session is not recognized. just a hint. --- William Sanchez Sanchez [EMAIL PROTECTED] wrote: I need some help with sessions. I need to pass variables to a

[PHP] Re: JavaScript php question - mainly JS though so slightly OT but hep needed!!! :o)

2001-12-19 Thread Chris Lee
thats exactly how you do it. foreach( $array as $pos = $val ) echo a href='javascript:windowpopup('page.php?id=$pos')'$val /abr ; -- Chris Lee [EMAIL PROTECTED] Martin Hughes [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... How could I write

RE: [PHP] addslash/stripslashes

2001-12-19 Thread Martin Towell
When putting strings into form values (and maybe other places too), I would advise wrapping the variable in: htmlentities(); so this: INPUT TYPE=TEXT NAME=name VALUE=?= $string; ? would become this: INPUT TYPE=TEXT NAME=name VALUE=?= htmlentities($string); ? and magically

Re: [PHP] sessions var

2001-12-19 Thread Jim Lucas
as long as the domain of the cookie is set to yoursite.com it will be readable from whateveryouwant.yoursite.com but if the domain is set to www.yoursite.com you won't be able to read it from yoursite.com Jim - Original Message - From: Mehmet Kamil ERISEN [EMAIL PROTECTED] To: [EMAIL

[PHP] sockets ??

2001-12-19 Thread brendan
have the below code.. and am having two issues.. the first is that str_read comes up with an error 'read() expects parameter 2 to be long, string given' - is this because i am recieving binary from host? the value returned is totally empty .. i know i need to hanshake and all but how do I

[PHP] Slash problem

2001-12-19 Thread Evansville Scene
I'm fairly new @ PHP, so forgive me if the answer is trivial ... In many cases, if I take in data from a form and the user uses an apostrophe, the data that is sent to me has a slash in it. For example: Jones\' Auto Repair Is there an easy fix? I'm not sure why this is occurring ... It\'s

Re: [PHP] Slash problem

2001-12-19 Thread Jim Lucas
it is a thingy called magic quotes. setup in the php.ini file. turn it off and they will go away. or, if you can't add a stripslashes() to every variable that will passed this way. Jim - Original Message - From: Evansville Scene [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent:

RE: [PHP] Slash problem

2001-12-19 Thread Martin Towell
either set magic_quotes_gpc to off in you .ini file - or use stripslashes() on the variable -Original Message- From: Evansville Scene [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 20, 2001 11:40 AM To: [EMAIL PROTECTED] Subject: [PHP] Slash problem I'm fairly new @ PHP, so

RE: [PHP] Slash problem

2001-12-19 Thread steph
http://www.php.net/manual/en/function.stripslashes.php -Original Message- From: Evansville Scene [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 19, 2001 4:40 PM To: [EMAIL PROTECTED] Subject: [PHP] Slash problem I'm fairly new @ PHP, so forgive me if the answer is trivial ...

RE: [PHP] Slash problem

2001-12-19 Thread Bas van Rooijen
set_magic_quotes_runtime (false) bvr. On Thu, 20 Dec 2001 09:43:28 +1100, Martin Towell wrote: either set magic_quotes_gpc to off in you .ini file - or use stripslashes() on the variable -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: [PHP] Book.

2001-12-19 Thread Mehmet Kamil ERISEN
Hi, I think I'm misunderstood. I do not want to run in cgi mode. Thanks, Mehmet. --- Martín Marqués [EMAIL PROTECTED] wrote: On Mié 19 Dic 2001 19:14, you wrote: Hi All, I have a good understanding of PHP. I like to read more documentation advanced PHP topics and also some more

Re: [PHP] Book.

2001-12-19 Thread Bas van Rooijen
No not CGI, binary (instead of apache module). - Just leave out the --with-apache part when you do configure. by default 'make install' will put the php binary in /usr/local/bin - On top of your PHP script add the following line: #!/usr/local/bin/php - Make sure you don't use MS-DOS (but

RE: [PHP] Re: Remote image

2001-12-19 Thread David Piasecki
Is anyone familiar with the overhead that this type of system might create, as compared to a standard request/response to apache? That is, to have PHP intercept the request for an image, check HTTP_REFERER - if it is null or from the local server, open the file, redirect to browser, close file,

[PHP] Quanta IDE - PHP Highlighing for 4.0.1

2001-12-19 Thread Mike Eheler
Attached is a text file that will update Quanta IDE 2.0.1 syntax highlighting for PHP. Simply use your favourite text edit quanta/kwrite/highlight.cpp in your quanta-2.0.1 source tree, and paste the text from this attached file overtop of the phpKeywords and phpTypes variables. If anyone

[PHP] Re: Quanta IDE - PHP Highlighing for 4.0.1

2001-12-19 Thread Mike Eheler
Shoot.. it didn't attach. That's probably a good thing. I'll put together a diff patch and put it somewhere for download. Mike Mike Eheler wrote: Attached is a text file that will update Quanta IDE 2.0.1 syntax highlighting for PHP. Simply use your favourite text edit

Re: [PHP] Book.

2001-12-19 Thread Martín Marqués
On Mié 19 Dic 2001 19:14, you wrote: Hi All, I have a good understanding of PHP. I like to read more documentation advanced PHP topics and also some more information on how to run PHP from Unix, as a cron job, how can PHP scripts be called from Shell Scripts etc... You need to compile PHP

[PHP] PHP 4.1.0 patch for Quanta IDE, The Sequel

2001-12-19 Thread Mike Eheler
http://sourceforge.net/tracker/index.php?func=detailaid=495239group_id=4113atid=304113 Download the attached file, and run patch -p1 -i quanta-2.0.1-php-4.1.0.diff That will patch your source tree.. then just configure, make, install. I've actually tested this one, so go nuts people. :)

[PHP] temporary image

2001-12-19 Thread Michael Mehlmann
hallo, my applications generates a html-page, with a link to an image. this image is created by the application, and should exist only temporarily - so it can be deleted after being accessed by the html-page - any ideas how to implement this? is working with timetamps (microseconds) safe for

[PHP] Re: Slash problem

2001-12-19 Thread Mike Eheler
This is done because magic_quotes_gpc is turned on. This makes it possible to just insert submitted data into a MySQL database, without preparing it first. You can turn it off if you have access to the server config, or.. you can do this: if (get_magic_quotes_gpc()) { foreach

Re: [PHP] Slash problem

2001-12-19 Thread Tom Rogers
Hi set this in your php.ini file: magic_quotes_gpc = Off You'll have to use addslashes before you can store these variables with an ' in a database after turning it off. Tom At 10:39 AM 20/12/01, Evansville Scene wrote: I'm fairly new @ PHP, so forgive me if the answer is trivial ... In many

Re: [PHP] Slash problem

2001-12-19 Thread Mike Eheler
I disagree. That doesn't affect whether or not GPC variables are addslashes()'d. Mike Bas Van Rooijen wrote: set_magic_quotes_runtime (false) bvr. On Thu, 20 Dec 2001 09:43:28 +1100, Martin Towell wrote: either set magic_quotes_gpc to off in you .ini file - or use stripslashes()

Re: [PHP] outputting db content

2001-12-19 Thread Greg Donald
Does anyone have a quick example of how you would show X numbers of database records at a time from a query? (you know, list 25 of 400 records with next/previous navigation)... Feel free to rip the navigation out of phpLinks and use it: http://phplinks.org/ Have a look in functions.php, I

Re: [PHP] temporary image

2001-12-19 Thread Bogdan Stancescu
Hi! You may want to check out the tempnam() function -- it's under filesystem functions in the downloadable documentation. Bogdan hallo, my applications generates a html-page, with a link to an image. this image is created by the application, and should exist only temporarily - so it can

Re: [PHP] temporary image

2001-12-19 Thread Bogdan Stancescu
On the other hand if you want to keep track of the number of files generated you might want to try something like this: $i=1; $thePath=$temp_dir./$fileprefix; while (file_exists($thePath.$i)) { $i++; } $thePath.=$i; ($thePath stores a valid temp

[PHP] PHP XML

2001-12-19 Thread Martin Hughes
Heya, Is it possible to integrate XML with PHP - ie get data out of an XML file and format it in html using php? Or alternatively, use php within an XSL file...? Cheers Mart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

[PHP] Re: PHP XML

2001-12-19 Thread Martin Hughes
Sorry - I should perhaps say that I'm only intending to code this site for IE(5/6) - there are too many issues with NetS - I **KNOW** that that's bad and lazy, but that's the way it's gonna be :o) M -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: Re: [PHP] Re: Random

2001-12-19 Thread David
yeah, my linux(Mandrake 8, Apache 1.3.22, PHP 4.1.0) box also gives me a 6 digit integer each time too. but when i tried on my win32 (Win2k, Apache 1.3.22, PHP 4.1.0), it is limited to a max of 32767 as indicated with getrandmax(). the origional author of the problem probably using windows

Re: [PHP] PHP XML

2001-12-19 Thread Bas van Rooijen
For XML use parser: http://www.php.net/manual/en/ref.xml.php PHP in .xsl file is possible, edit your httpd.conf find this line: AddType application/x-httpd-php .phtml .php .php3 and add extensions that should be parsed by PHP, like so: AddType application/x-httpd-php .phtml .php .php3 .xsl

Re: [PHP] PHP XML

2001-12-19 Thread Martin Hughes
Thanks! Much appreciated. M Bas Van Rooijen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... For XML use parser: http://www.php.net/manual/en/ref.xml.php PHP in .xsl file is possible, edit your httpd.conf find this line: AddType application/x-httpd-php .phtml .php .php3 and

[PHP] Re: Book.

2001-12-19 Thread David
hmm, this how i use php for cron jobs: #!/usr/local/bin/php // location of php binary ?php // Do your php stuff here ? then just ask cron to run this script at your wish of time interval I have a good understanding of PHP. I like to read more documentation advanced PHP topics and also some

Re: [PHP] PHP XML (2)

2001-12-19 Thread Bas van Rooijen
and restart ofcourse ;) bvr. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

[PHP] Re: Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Garth Dahlstrom
My 2 cents... I think exit should be fixed as you describe... And I think die should behave as it does in perl which is to print out whatever it is passed. -Garth --- Jani Taskinen - Question: Should exit() print out the integer exit-status? - Wed, 19 Dec 2001 01:38:39 +0200 (EET)

[PHP] socket read byte by byte

2001-12-19 Thread brendan
another question for the continuing saga .. I am trying to undertake a handshake with the telnet (tn3270) server .. using $get=socket_read($socket, 128, PHP_BINARY_READ ); i now need to step through $get byte by byte how do i do an equivilent fgetc? ie while (!feof($get)) { echo fgetc($iget);

Re: [PHP] How to open an existing Excel file(.xls) from PHP program

2001-12-19 Thread Bogdan Stancescu
There was a similar thread on the Midgard mailing list not long ago -- you may want to take a look for possible solutions: http://marc.theaimsgroup.com/?l=midgard-userm=100653565721944w=2 Hi, How to open an existing excel file(.xls) from PHP, and edit the contents of the particular

[PHP] PHP 4.1.0 and my system's expat 1.95.2 don't get along...

2001-12-19 Thread Russ Goodwin
Please help... (4.1 install problem) I have two nearly-identical systems production and backup. When we upgrade, we do backup first to work out any kinks, then production. Last night I upgraded backup in the following order: MySQL 3.23.46, OpenSSL 0.9.6b, Curl 7.9.2, Mod_SSL 2.8.5-1.3.22,

[PHP] Segmentation faults on headers()

2001-12-19 Thread Scott w
Hello, I have a problem I can't quite figure out. I recently upgraded PHP from 4.0.6 to 4.1.0. I can no longer use auth-headers... When I try to load a page with for instance: ?php if(!isset($PHP_AUTH_USER)) { header('WWW-Authenticate: Basic realm=Admin Area'); header('HTTP/1.0

  1   2   >