RE: [PHP] Arrays/Hashes

2001-12-19 Thread Jerry Verhoef (UGBI)
You forgot the printf method printf("Some text %s\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 n

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 PROTECT

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 [mai

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 *

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 fin

[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 c

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. als

[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 pr

[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 so i have a script that if login fails it will ask the user to register, if(!$username) { session_unregister("userid"); session_uregister("userpassword"); ech

[PHP] php telnet

2001-12-19 Thread kancha
The following code generated garbase output. what is wrong ?? The output was as follows: [root@ispms html]# php telnet.php X-Powered-By: PHP/4.1.0 Content-type: text/html ÿý▒ÿý ÿý#ÿý'[root@ispms html]# -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTEC

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: >He

[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 e

[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 d:\htdocs\ezo

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 ?? > >$sp = fsockop

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("inser

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

2001-12-19 Thread Robert V. Zwink
http://www.php.net/manual/en/function.set-time-limit.php http://www.php.net/manual/en/function.ignore-user-abort.php Robert V. Zwink http://www.zwink.net/daid.php -Original Message- From: bain [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 11, 2001 3:41 AM To: php general list Subje

[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 Ma

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? > Havi

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 "sup

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 -- t

[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. U

[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 PR

[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 ). I used session_register and I tried using start_session and still no luck. Once I get the session vars registered, how do I access them from the new

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 'pl

RE: [PHP] outputting db content

2001-12-19 Thread Greg Schnippel
> 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)... I've used this code snippet and lots of projects and it seems to work pretty well. Would appreciate advice on

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 wan

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 af

[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 e

[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 t

[PHP] regular expression

2001-12-19 Thread Wakan
Hi, Can you help me on this simple regexp? I've this string: $testata = "NEWS A ROTAZIONEcancella"; and this eregi: eregi("^(.*)$",$header,$regs); In this way I'd like to obtain the properties of the row (ie: bgcolor=\"#FF9900\" valign=\"middle\") and all the columns in the row (the content of e

[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 is

[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 wan

[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 not

[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 Mail

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()

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, A

[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 to

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

2001-12-19 Thread Martin Hughes
Heya, OK - I have a site I've been working on on and off for a while. It started as a static page, then I changed it so it uses php. This was great - until I started putting content in the design. I now have about 300 *.inc files for the site, and updating them is a joke! The site is designed in

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 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 Farm

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 ma

[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. Wh

[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 is

[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 -- p

[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. server.my

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 backs

[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, PED3,PEDn,...

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

[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

[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 buil

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 r

[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 f

[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. D

[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: . if not, it will still give you a hint about what's going wrong. are you constructin

[PHP] Re: session destroy ??

2001-12-19 Thread Chris Lee
http://$SERVER_NAME";); ?> works for me. yes its stupid, but a session has to be started beore it can be destroyed. -- Chris Lee [EMAIL PROTECTED] "Olivier Masudi" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > In my online store i use session. > > I

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 co

[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 >

[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 " $val "; -- Chris Lee [EMAIL PROTECTED] "Martin Hughes" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > How could I write the function windowPopup(XX) where XX is a variab

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: would become this: and magically watch all your troubles melt away - well maybe not ALL your troubles, but at least the trouble as mention

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: <[EMA

[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 wor

[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 be

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: Wedn

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 for

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 ... I

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]

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 UNI

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, if

[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 know

[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 quanta/kwrite/

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 4.1.0 patch for Quanta IDE, The Sequel

2001-12-19 Thread Mike Eheler
http://sourceforge.net/tracker/index.php?func=detail&aid=495239&group_id=4113&atid=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. :) Ple

[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 crea

[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 ($HTTP_POST_

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 >>

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

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 fil

[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] Fo

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 to

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 b

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 .

[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 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 more >information on how to run

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 (E

[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); }

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

2001-12-19 Thread Balaji Ankem
    Hi,         How to open an existing excel file(.xls) from PHP, and edit the contents of the particular cell.   Thanks in advance Regards Balaji     --- Information transmi

  1   2   >