Re: [PHP] Re: MySQL - PHP combined log

2002-07-24 Thread PHPCoder
Well, I think the solutions or ideas are maybe a bit too involved. I was hoping that the errors I am interested in were already logged by default to some obscure location, and I *could* if needed just go and scrutinize them by hand. But, it seems like a detailed (specially mysql) error log does

[PHP] When to destroy sessions that iterate

2002-07-24 Thread PHPCoder
Prolly a silly question, but I have a session process that never really ends as it is supposed to allow the user to carry on submitting etc. So I don't know where and when to end the session, and if it is really nescessary to end a session? Obviously a logout button will do the trick, but

Re: [PHP] Help with msql_fetch_array()

2002-07-24 Thread PHPCoder
I can almost guarantee that it's not the second line that is failing, the problem here is that $result is not containing naything, and that is normally due to the fact that you are not connecting to the db, or the table tablename is not there. I use the following format as my standard MySQL

Re: [PHP] Help with msql_fetch_array()

2002-07-24 Thread PHPCoder
then the object stored in $result wiill more than likely evaluate to TRUE. For the determining factor you should count the number of rows with mysql_num_rows($result). If the returned value is zero then you know it hasn't returned anything. -Kevin - Original Message - From: PHPCoder [EMAIL

Re: [PHP] Re: MySQL - PHP combined log

2002-07-23 Thread PHPCoder
Thanks, but all these methods require modification of the scripts already on the server, and it won't ensure any new script being written by a user on my system to comply. Are you all saying that there are no logs kept by default of errors generated on php/mysql pages at all unless

[PHP] Sessions without cookies : forms

2002-07-22 Thread PHPCoder
Hi, thanks for all the replies on my two previous postings relating to sessions and cookies. I have set my mind on using sessions but without cookies, so that entails passing the SID via relative URL's. My problem comes in here, when I create a simple login page with a form that send username

[PHP] Sessions: watertight?

2002-07-18 Thread PHPCoder
Hi I'm doing some reading on sessions and how it works etc, and have a concern (which is probably fed by my ignorance on the topic). The couple of simple session examples I have found in the PHP/MySQL book by Luke Welling Laura Thompson gives a simple 3 page session example where the session

Re: [PHP] Sessions: watertight?

2002-07-18 Thread PHPCoder
the session id automatically. Alternatively, you can use the constant SID which is defined, if the client did not send the appropriate cookie. SID is either of the form session_name=session_id or is an empty string. [/quote] Regards Joakim Andersson -Original Message- From: PHPCoder

[PHP] Cookies - good or bad???

2002-07-18 Thread PHPCoder
I'm really battling with this whole session thing. My first impressions are that cookies are OK, and really helps to make sessions workable and efficient, YET, from a developers point of view, I always play devils advocate, and I'm wondering about those stubbourne individuals out there who

Re: [PHP] Inclusion error contd..

2002-07-16 Thread PHPCoder
Check execute permissions on the PHP file, try chmod 755. Sachin Keshavan wrote: Hello all, Thanks for the suggestions. But my .php file does not have any include statement any where in the page. Is there any thing which I have to check out? The site contains 6 .php files, and it is only in

Re: [PHP] textarea new line

2002-07-05 Thread PHPCoder
Sorry, you DO need nl's, but it's \n not n\ PHPCoder wrote: When you echo, you are adding to HTML, so you need br for new lines not \n. There is a function called nl2br that converts the nl into br's for you, so do this; $string=-line1n\ -line2 n\-line3; $string = nl2br($string

Re: [PHP] textarea new line

2002-07-05 Thread PHPCoder
When you echo, you are adding to HTML, so you need br for new lines not \n. There is a function called nl2br that converts the nl into br's for you, so do this; $string=-line1n\ -line2 n\-line3; $string = nl2br($string); echo brtextarea name='aria' cols='50' rows='2'$string/textarea; adi

[PHP] Solution to register_globals=off existing code???

2002-07-03 Thread PHPCoder
Hi Already posted a question asking what to do with existing code that uses register_globals=on and migrating to a new PHP with register_globals=off; solution seemed to be have to re-code; I came up with this code, and am basically asking the more enlightened if this might be a solution, ie,

Re: [PHP] Solution to register_globals=off existing code???

2002-07-03 Thread PHPCoder
DOH! Now you tell me!!! :-[ Hah, thanks man, should have known that there is always a simple solution in PHP, just need to know where to look for it... Kevin Stone wrote: Or just use extract($HTTP_POST_VARS); Same thing. :) -Kevin - Original Message - From: PHPCoder [EMAIL

[PHP] Register Globals = off

2002-06-30 Thread PHPCoder
Hi Going through some literature, it seems like the use of registered globals can cause security issues. Now, the dilemma, all my previous PHP installations ( for the last year or so ) have come with register globals = on in the php.ini file by default, and users on my system has happily

[PHP] Adding GD libraries after compile

2002-06-28 Thread PHPCoder
Hi I have a working PHP build on my webserver, but it seems it was compiled without support for gd or pdflib and a couple of others. Since rebuilding PHP requires a rebuild of apache as well, I really don't want to go that route unless 100% essential. So, is there a way I can add these libs now

Re: [PHP] Re: Generating Barcodes and printing

2002-06-28 Thread PHPCoder
: Read the stuff you find on google first though - there was an article I read about certain inks absorbing InfraRed light so barcodes printed in them will not work! The HP ink used in the Deskjet 693 and 660 seems to be ok for this job. Phpcoder [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED

[PHP] Generating Barcodes and printing

2002-06-27 Thread PHPCoder
Hi, I would like to generate barcodes and have it print out the barcode automatically from awebpage, is this possible? How? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] function echo ' '

2002-06-25 Thread PHPCoder
Yes, just use instead of '. Using ' causes the contents to be treated as literal strings, and the $ is therefore not treated as a $. Just do: echo a href=\$address\; Martin Johansson wrote: Is there a way to express php variables inside an echo ' '. I want something like this to work:

[PHP] Tracking file downloads

2002-06-18 Thread PHPCoder
Hi I would like to know any ideas on tackling the following: I would like to have people give me their details via a form and then allow them to download files from the server, and I would also like to keep track/record of the files that are downloaded. The record doesn't need to be kept,

[PHP] Sessions : see also Tracking file downloads

2002-06-18 Thread PHPCoder
HI While waiting for responses on my first question, I've done some reading on sessions, and came up with the following questions: First, I have been coding with PHP for a while without knowing about sessions, and have completed a couple of rather large projects without using sessions as such,

Re: [PHP] help me please! :)

2002-06-10 Thread PHPCoder
?php $i = 1; $liv_1 = one; $liv_2 = two; $liv_3 = three; $liv_4 = four; $liv_5 = five; while ($i = 5 ) { $do = echo \$liv_{$i};; eval($do); echo br; $i ++; } ? Simply echoing the \$liv_$i will not work, need to evaluate the string after parsed as in example above... Kevin Porter wrote: You

[PHP] SMARTCARDS - PHP + MySQL

2002-05-24 Thread PHPCoder
HI I would like to hear from anyone who have possibly worked on implementing a smartcard solution to controll access to a website. I am looking into possibilities for a proposal, and one of the requirements of the client is that the system data has to be accessible via the web, and that the

[PHP] Script executes for longer than 30s

2002-05-13 Thread PHPCoder
HI I wrote a basic script that takes the input of a textfield and passes it onto the system() function and then echo's the result, somethinglike this: ?php $result = system($command); echo $result; ? The $command is sent from the previous page via text field. Whe I test this and do something

Re: [PHP] Script executes for longer than 30s

2002-05-13 Thread PHPCoder
a poor technique to me. In your example, the ping command will never complete (unless php closes it down). Why not limit the number of pings with ping -c 10 192.168.0.2? HTH Chris PHPCoder wrote: HI I wrote a basic script that takes the input of a textfield and passes it onto

[PHP] Self Destruct code

2002-05-07 Thread PHPCoder
Hi I have a funny request; I wrote a system for a client and am rather concerned that I am not going to receive payment for the work done. They want me to hand over the code before they are willing to pay, so basically I will be left at their mercy; if they don't pay, they will still have a