Re: [PHP] Help with msql_fetch_array()

2002-07-24 Thread PHPCoder
urned anything. > >-Kevin > >- Original Message - >From: "PHPCoder" <[EMAIL PROTECTED]> >To: "Matthew Bielecki" <[EMAIL PROTECTED]> >Cc: "php-general" <[EMAIL PROTECTED]> >Sent: Wednesday, July 24, 2002 11:50 AM >Subjec

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

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

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

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

2002-07-22 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 specifical

[PHP] MySQL - PHP combined log

2002-07-22 Thread PHPCoder
Hi, tried this on mysql list, no luck: I want to be able to view a single log that contains the following: IP of user : page_name (PHP only): time/date: MySQL query ( 'select * from xxx' etc.) : error msg from mysql/php if any So it's almost a hybrid between apache and mysql with some extra's

[PHP] Sessions without cookies : forms

2002-07-21 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 a

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

Re: [PHP] Sessions: watertight?

2002-07-18 Thread PHPCoder
either of the form session_name=session_id or is an empty >string. >[/quote] > >Regards >Joakim Andersson > > >>-Original Message- >>From: PHPCoder [mailto:[EMAIL PROTECTED]] >>Sent: Thursday, July 18, 2002 11:17 AM >>To: php-general >>Su

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

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

Re: [PHP] textarea new line

2002-07-05 Thread PHPCoder
When you echo, you are adding to HTML, so you need 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 "$string"; adi wrote: >i want to add in textarea a string with

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

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

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

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

Re: [PHP] Re: Generating Barcodes and printing

2002-06-27 Thread PHPCoder
7 Jun 2002, Peter wrote: > >>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. >

[PHP] Adding GD libraries after compile

2002-06-27 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

[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 ""; Martin Johansson wrote: >Is there a way to express php variables inside an echo ' '. > >I want something like this to work: > >echo ''; > >

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

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

Re: [PHP] help me please! :)

2002-06-10 Thread PHPCoder
"; $i ++; } ?> Simply echoing the \$liv_$i will not work, need to evaluate the string after parsed as in example above... Kevin Porter wrote: >You need to escape the dollar sign with a backslash to prevent PHP trying to >interpolate the variable $liv (which presumably doesn't exist). > >echo

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

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

2002-05-13 Thread PHPCoder
mer seems 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 >>

[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: The $command is sent from the previous page via text field. Whe I test this and do something like " ping 192.168.0.2", the page keeps on grow

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