Re: [PHP] Include Part 2

2002-09-29 Thread Justin French
Is this to pull the rows out of a database?? You could start with a simple example, which is just a basic config setting, and use the $myrow array in your sql while loop to do a lot of the work. ? // set your column names $colsToSelect = 'title, format, category'; // select $sql = SELECT

Re: [PHP] Include Part 2

2002-09-29 Thread Chris Shiflett
Chuck PUP Payne wrote: By the way I have time this but what is happen and maybe this will clear up things. That certainly made things clear. :-) I only calling this first myrow call titles. It's not going on to the other two. Now in my php page I have this... $myrow =

[PHP] Static constants? Server persistent?

2002-09-29 Thread Jean-Christian Imbeault
This is a bit hard for me to explain but is there any way to have PHP store a persistent server-side constant. Something that will stay in RAM and is not dependent on client connection. For example I have this code in consts.inc file: define (HOME_PAGE, http://myip.com/index.html); But if I

Re: [PHP] Static constants? Server persistent?

2002-09-29 Thread Justin French
There is a directive in php.ini which allows a file to be included on EVERY page that php parses... one at the very start, and one at the very end of the script. So in theory, you could include consts.inc as a always-include file at the top of every script, by setting the right directive in

Re: [PHP] Static constants? Server persistent?

2002-09-29 Thread Jean-Christian Imbeault
Justin French wrote: There is a directive in php.ini which allows a file to be included on EVERY page that php parses... one at the very start, and one at the very end of the script I'm pretty sure this is server-wide, but maybe it could be site- or directory-wide by setting the variable

[PHP] connection

2002-09-29 Thread DC
Hi, OK I have my first php/mysql web site complete working on my computer using apache server. When I transfer the files to web space, I receive errors regarding connection to database. Obviously the various pieces of code I have used to connect it all up eg ? $dbcnx =

Re: [PHP] connection

2002-09-29 Thread Justin French
You need to set the parameters to whatever your ISP granted you for use of MySQL... $dbcnx = mysql_connect(servername,username,password); You should ask your ISP what these are. Justin French on 29/09/02 9:54 PM, DC ([EMAIL PROTECTED]) wrote: Hi, OK I have my first php/mysql web site

[PHP] auto_prepend: *Exactly* like include()?

2002-09-29 Thread Jean-Christian Imbeault
Does using the auto_prepend config option in the php.ini file act exactly like and include() call. An include call will read the file off disk ... will auto.prepend do the same thing or will PHP keep the file in memory for quick retrival? Jc -- PHP General Mailing List

Re: [PHP] Static constants? Server persistent?

2002-09-29 Thread Justin French
on 29/09/02 9:36 PM, Jean-Christian Imbeault ([EMAIL PROTECTED]) wrote: Justin French wrote: There is a directive in php.ini which allows a file to be included on EVERY page that php parses... one at the very start, and one at the very end of the script I'm pretty sure this is

Re: [PHP] Static constants? Server persistent?

2002-09-29 Thread Jean-Christian Imbeault
Justin French wrote: You're right... it's an include... THEN the vars will be in memory... This is the best you can do, AFAIK, without hacking the source of PHP :) Just asking, do you know the source well enough to say with *certainty* that the auto prepend file is not kept in memory? If

Re: [PHP] Static constants? Server persistent?

2002-09-29 Thread Justin French
on 29/09/02 10:09 PM, Jean-Christian Imbeault ([EMAIL PROTECTED]) wrote: Just asking, do you know the source well enough to say with *certainty* that the auto prepend file is not kept in memory? I'm merely guessing. Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Static constants? Server persistent?

2002-09-29 Thread Jean-Christian Imbeault
Justin French wrote: I'm merely guessing. Ok. Thanks for the guess. I'll post on the dev list and see if I can get a definitive answer. Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] passing select list variable from page1 to insertstatement astable name on page2

2002-09-29 Thread John W. Holmes
The variable is being passed properly; it just doesn't have a value. Where are you setting $listbox?? ---John Holmes... -Original Message- From: Chip Wiegand [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 06, 2002 9:28 AM To: 1LT John W. Holmes Cc: php Subject: Re: [PHP] passing

RE: [PHP] Problems with dbase_create function

2002-09-29 Thread John W. Holmes
Does the web server have permission to write to the directory where you are trying to create the database? PHP runs as the web server when installed as a module and it needs permission to write in that directory. ---John Holmes... -Original Message- From: Matt Neimeyer [mailto:[EMAIL

[PHP] date question

2002-09-29 Thread Jonas Geiregat
I have a date ex 24/08/02 and I need to see if that date is the same date as it is today (only one month later) but 5day's in advanced = that would be 24/09/02 so if(date == date now - 5) {true} else{false} how can I do this right ? -- PHP General

[PHP] Re: date question

2002-09-29 Thread Jean-Christian Imbeault
Jonas Geiregat wrote: I have a date ex 24/08/02 and I need to see if that date is the same date as it is today (only one month later) but 5day's in advanced = that would be 24/09/02 so if(date == date now - 5) {true} else{false} how can I do this right ? Look at

Re: [PHP] date question

2002-09-29 Thread Justin French
Not sure why you need the 5 days in advance bit, but this might give you the tools to work it all out. I prefer to work with dates in unix timestamp format (seconds). To get now, use time() To get next month, there's a kewl function called strtotime(), which converts english phrases into

[PHP] Re: date question

2002-09-29 Thread Jonas Geiregat
and If I want to calculate from given date the next month like strtotime(next month) gives me the date of one month in advanced from NOW but I want to get the date one month in advanced from a given date not NOW Jonas Geiregat wrote: I have a date ex 24/08/02 and I need to see if that date is

Re: [PHP] Re: date question

2002-09-29 Thread Matt
From: Jonas Geiregat [EMAIL PROTECTED] Sent: Sunday, September 29, 2002 10:56 AM Subject: [PHP] Re: date question and If I want to calculate from given date the next month like strtotime(next month) gives me the date of one month in advanced from NOW but I want to get the date one month

[PHP] Copying a remote graphic to my server.

2002-09-29 Thread scott
Hello there I am trying to copy a remote graphic from http://blah.com/blah.jpg to my server. How would I achieve this in php I have looked on the archives but can't seem to find the best way. I am running 4.1.2 on apache unix. I understand copy will not work on remote files (tried it) but I am

Re: [PHP] Copying a remote graphic to my server.

2002-09-29 Thread Rasmus Lerdorf
In PHP 4.3 you can actually just use copy(). In previous versions if you just want to dump it out you can use readfile(), or if you want to store it, use a simple fopen(), while(!feof()) fread() loop. -Rasmus On Sun, 29 Sep 2002, scott wrote: Hello there I am trying to copy a remote

php-general Digest 29 Sep 2002 15:43:02 -0000 Issue 1614

2002-09-29 Thread php-general-digest-help
php-general Digest 29 Sep 2002 15:43:02 - Issue 1614 Topics (messages 118035 through 118078): Posting a value to one form to another 118035 by: Uma Shankari T. 118037 by: Thoenen, Peter Mr. EPS 118040 by: Sascha Cunz 118041 by: Uma Shankari T.

RE: [PHP] Problems with dbase_create function

2002-09-29 Thread Matt Neimeyer
I considered that... Problem is I'm not 100% certain how to set that the correct way... (so as not to screw anything else up) Recommendations? Thanks PS It's good to know I wasn't completely off base... thanks millions! Does the web server have permission to write to the directory where you

Re: [PHP] Static constants? Server persistent?

2002-09-29 Thread Mike Mannakee
Just out of curiosity, what problem are you trying to solve? Including a file is so easy and takes so little time I wonder how this could be a problem. I've worked for a web site that was getting millions of page views per day (Billions per month) running php/mysql and the issue never came up.

[PHP] Session Not Saving?

2002-09-29 Thread Stephen Craton
I'm having another problem with my member's area script. When someone logs in, it's supposed to register their username into a session and it displays fine on the first page. But once you navigate to another part of the area, it does not tell you you are logged in, instead it gives me the error I

Re: [PHP] Static constants? Server persistent?

2002-09-29 Thread Jean-Christian Imbeault
Mike Mannakee wrote: Just out of curiosity, what problem are you trying to solve? Including a file is so easy and takes so little time I wonder how this could be a problem. Good question, glad you asked. I have a header on all my pages. The header is HTML and contains images. So of

Re: [PHP] Session Not Saving?

2002-09-29 Thread debbie_dyer
Are you calling session_start() on the other pages inside the secure area? - Original Message - From: Stephen Craton [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, September 29, 2002 5:23 PM Subject: [PHP] Session Not Saving? I'm having another problem with my member's area

Re: [PHP] Static constants? Server persistent?

2002-09-29 Thread John Hinton
Jean-Christian Imbeault wrote: Mike Mannakee wrote: Just out of curiosity, what problem are you trying to solve? Including a file is so easy and takes so little time I wonder how this could be a problem. Good question, glad you asked. I have a header on all my pages. The header is

[PHP] calling session_start()

2002-09-29 Thread Børge Strand
Hi All, When does session_start() have to be called? I have the following setting: A bunch of php pages are placed in a frameset. If someone tries to access one of these pages without the session-id cookie being set, the page calls a reloading of the frameset. The frameset page itself is the

Re: [PHP] Session Not Saving?

2002-09-29 Thread Chris Shiflett
I'm not sure why you are trying to use session_is_registered() to validate a user, but you should get rid of that. With sessions, you want to start the session on every page you need session management. If you have a session module that you include everywhere, you can do this by registering

[PHP] %e blank with date_format() on windows

2002-09-29 Thread Gerard
%e with date_format doesn't print out anything on my windows 2k/xp machines, but does on linux. All other chars print fine. Is this a locale setting issue or something? Gerard -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] calling session_start()

2002-09-29 Thread debbie_dyer
session_start() has to be called on every page where you want to use the session, before you try referencing it - you also have to call it before outputting anything else (you must be doing it after and this is what is causing your error) - Original Message - From: Børge Strand [EMAIL

[PHP] Forms: How-to not display it if user hits back?

2002-09-29 Thread Jean-Christian Imbeault
I have the following scenario 1- user comes to page A, clicks a button to get to page B 2- Page B is a form the user fills and hits the submit button 3- form data is received and I use header() to send him back to page A So A - B - A The problem I have is with Netscape 7, possibly other

RE: [PHP] Forms: How-to not display it if user hits back?

2002-09-29 Thread John W. Holmes
Use GET instead of POST. Other than that, I don't think so. It's a client side issue and all browsers handle it differently, I think. ---John Holmes... -Original Message- From: Jean-Christian Imbeault [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 29, 2002 1:24 PM To: [EMAIL

RE: [PHP] calling session_start()

2002-09-29 Thread John W. Holmes
-Original Message- From: Børge Strand [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 29, 2002 1:12 PM To: [EMAIL PROTECTED] Subject: [PHP] calling session_start() Hi All, When does session_start() have to be called? I have the following setting: A bunch of php pages

RE: [PHP] Problems with dbase_create function

2002-09-29 Thread John W. Holmes
You pretty much have to give the directory 777 permissions. On a shared server, this is not the ideal solution, but it's the only one. No worries if you're on a dedicated server. ---John Holmes... -Original Message- From: Matt Neimeyer [mailto:[EMAIL PROTECTED]] Sent: Sunday,

[PHP] Not Displaying From Vars??

2002-09-29 Thread Stephen Craton
I bet you're getting sick of hearing from me but yet again, I'm having trouble. I have a form that you type in a number for how many hours an employee has worked. When they submit the form, it's supposed to display, again, what they typed in and record them to a database to be used for a later

[PHP] pdf question

2002-09-29 Thread Jonas Geiregat
this is my code ?php $pdf = pdf_new(); pdf_open_file($pdf); pdf_begin_page($pdf, 595, 842); pdf_set_font($pdf, Times-Roman, 30, host); pdf_set_value($pdf, textrendering, 1); pdf_show_xy($pdf, text here, 50, 750); pdf_end_page($pdf); pdf_close($pdf); $data = pdf_get_buffer($pdf);

[PHP] error suppresion

2002-09-29 Thread Gary
I have a form, the action is PHP_SELF. When the form is submitted it prints the info lower on the page. The problem, the errors for the empty fields are printed until the form is submitted. What would be the best way of suppressing these error? TIA Gary -- PHP General Mailing List

RE: [PHP] Not Displaying From Vars??

2002-09-29 Thread John W. Holmes
Try $_POST['sun_reg'] or $_GET['sun_reg'], depending on the method of your form. You probably have register globals off, that's why $sun_reg isn't created. That's a good thing. ---John Holmes... -Original Message- From: Stephen Craton [mailto:[EMAIL PROTECTED]] Sent: Sunday,

RE: [PHP] Not Displaying From Vars??

2002-09-29 Thread Stephen Craton
I just tried it and it doesn't work either. Thanks, Stephen http://www.melchior.us http://php.melchior.us :: -Original Message- :: From: John W. Holmes [mailto:[EMAIL PROTECTED]] :: Sent: Sunday, September 29, 2002 1:07 PM :: To: 'Stephen Craton'; [EMAIL PROTECTED] :: Subject: RE:

RE: [PHP] error suppresion

2002-09-29 Thread John W. Holmes
I have a form, the action is PHP_SELF. When the form is submitted it prints the info lower on the page. The problem, the errors for the empty fields are printed until the form is submitted. What would be the best way of suppressing these error? The best way to suppress your errors is to fix

[PHP] Copying a remote graphic to my server.

2002-09-29 Thread scott
Hello there I am trying to copy a remote graphic from http://blah.com/blah.jpg to my server. How would I achieve this in php I have looked on the archives but can't seem to find the best way. I am running 4.1.2 on apache unix. I understand copy will not work on remote files (tried it) but I am

Re: [PHP] Not Displaying From Vars??

2002-09-29 Thread debbie_dyer
Yeah got to be register_globals and also a tip to save future problems if you are working with forms and u want to redisplay submitted data you will need to learn about stripslashes (if you have magic_quotes_gpc on) and htmlspecialchars. And for the db additions addslashes (for if

[PHP] mail + memory question

2002-09-29 Thread Jonas Geiregat
this is my code what I want to do is generate a pdf file(not save it on hd of server but in memory) then send it as attachement to someone $pdf = pdf_new(); pdf_open_file($pdf,); pdf_begin_page($pdf, 595, 842);

[PHP] Multivalue RDBMS's

2002-09-29 Thread Bill Farrell
Hi, all, Just out of curiosity, are there any people out there using PHP with UniVerse/UniData, Pick, mvBase or any other multivalue database? I'm getting brave with PHP and writing some connection and Dynamic String Array (Pick record) handling objects and wonder if anyone has been down this

[PHP] mail + pdf + memory question

2002-09-29 Thread Jonas Geiregat
this is my code what I want to do is generate a pdf file(not save it on hd of server but in memory) then send it as attachement to someone $pdf = pdf_new(); pdf_open_file($pdf,); pdf_begin_page($pdf, 595, 842);

Re: [PHP] error suppresion

2002-09-29 Thread Gary
John W. Holmes wrote: I have a form, the action is PHP_SELF. When the form is submitted it prints the info lower on the page. The problem, the errors for the empty fields are printed until the form is submitted. What would be the best way of suppressing these error? The best way to

RE: [PHP] error suppresion

2002-09-29 Thread John W. Holmes
Just reduce the error_reporting() level while you display the form, then. Set it so it does not show NOTICES. ---John Holmes... -Original Message- From: Gary [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 29, 2002 2:29 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] error

RE: [PHP] Not Displaying From Vars??

2002-09-29 Thread John W. Holmes
Post your code... -Original Message- From: Stephen Craton [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 29, 2002 2:11 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Not Displaying From Vars?? I just tried it and it doesn't work either. Thanks, Stephen

Re: [PHP] Not Displaying From Vars??

2002-09-29 Thread debbie_dyer
Its a setting in php.ini where PHP creates vars from form data/cookies if its on. If it is on - its a security risk because anyone can change the value of the data in your script by passing values in thru the URL. So you need to keep it switched off (whereby vars will not be created from form

Re: [PHP] error suppresion

2002-09-29 Thread Jean-Christian Imbeault
Gary wrote: They are not really errors they are reporting that the form fields are empty until the form is submitted. Notice: Undefined index: That means your code is not doing any checking of the incoming data. You should always check that the data coming is what you expect it to be.

[PHP] OT-best PDF creation tool

2002-09-29 Thread Ryan A
Hey guys, I know this is totally off topic on a php list but I have a client who wants a PDF document and since I have never made one before...which is the easiest and best tool (hopefully free) to make a PDF form? I know a lot of you guys make websites yourselfs and most proberly worked on

Re: [PHP] OT-best PDF creation tool

2002-09-29 Thread debbie_dyer
hey! you cant say hey guys these days - there are females in the industry too u know :) - Original Message - From: Ryan A [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, September 29, 2002 7:40 PM Subject: [PHP] OT-best PDF creation tool Hey guys, I know this is totally off topic

[PHP] hash function secret

2002-09-29 Thread Pablo Oliva
I was reading the sept. issue of linux magazine and they discussed security issues with web apps. They mentioned that to generate signatures, you should include a secret with your hash function: s = S(m) = H(secret, H(m, secret)) What is the secret, just a sort of secret code that you

Re: [PHP] hash function secret

2002-09-29 Thread debbie_dyer
I don't see how it could be randomly generated else how would you be able to use it for authenticating etc but then I'm not a security expert. I use a long character string known only to me and stored outside my web directory. Maybe other ppl do differently I don't know. - Original Message

[PHP] Debbie-Re: [PHP] OT-best PDF creation tool

2002-09-29 Thread Ryan A
Hey Debbie, thanks for writing, Sorry, no offense meant but I call all my pals guys. Yeah, I know there are females in the industary and i'm sure most of them work for Microsoft writing the error messages that keep on nagging and that make absolutely no sense! hehhehehe couldnt resist, just

[PHP] Re: Debbie-Re: [PHP] OT-best PDF creation tool

2002-09-29 Thread debbie_dyer
Ryan LOL ok - no offence taken. And be careful what u promise - tens (hundreds even dont know how many are on this list) of females probably just received it and I am sure you will be well spotted if you break it :) Debbie - Original Message - From: Ryan A [EMAIL PROTECTED] To:

RE: [PHP] Not Displaying From Vars??

2002-09-29 Thread Stephen Craton
Here's the part that's supposed to display the information. I've only filled in one area so far: tr tdfont size=2 face=Arial, Helvetica, sans-serifSunday/font/td td align=center valign=middle?php echo $_GET[sung_reg]; ?/td

Re: [PHP] Not Displaying From Vars??

2002-09-29 Thread debbie_dyer
Wheres the form tag? - Original Message - From: Stephen Craton [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Sunday, September 29, 2002 8:19 PM Subject: RE: [PHP] Not Displaying From Vars?? Here's the part that's supposed to display the information. I've only

Re: [PHP] Not Displaying From Vars??

2002-09-29 Thread Chris Shiflett
Your description of register_globals is good, except that the security risk is a matter of opinion. I would argue that register_globals only presents a security risk to inexperienced developers. The client can submit any data to your application regardless of any configuration (and even

[PHP] navigatie doesn't work in this script

2002-09-29 Thread danny
I made a MySQL database with a dictionary in it. Above there is a form in wich you can specify some parameters. The problem is that the navigation doesn't work well. I always get the first 5 results. Can somebody help me out? There are about 56 records in the database. The (not quite) working

RE: [PHP] navigatie doesn't work in this script

2002-09-29 Thread John W. Holmes
You have LIMIT 0,5 in your query...what do you expect to happen? You're only going to get five rows with that in there. ---John Holmes... -Original Message- From: danny [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 29, 2002 3:21 PM To: [EMAIL PROTECTED] Subject: [PHP]

Re: [PHP] Not Displaying From Vars??

2002-09-29 Thread debbie_dyer
Chris Yes you are right in what you say but:- I would argue that register_globals only presents a security risk to inexperienced developers. And how many of these are putting code on the net? - Thousands. Also, all programmers (even the most experienced) are only human and prone to error and

Re: [PHP] navigatie doesn't work in this script

2002-09-29 Thread danny
In production this database will be verry big (about 1 records) and for almost every record a MP3 or picture. So i want to show only 5 records at a time. Therefore i tried to create a navigation system. And it isn't working properly now. (It doesn't go up), i always get the same five records.

RE: [PHP] navigatie doesn't work in this script

2002-09-29 Thread John W. Holmes
Search the archives for previous next links and you'll see a ton of ways to do this. You are setting the variables to 0 and 5 and then issuing the query. You have to put some logic in there to only set it to those values if it's the first time this page is called. If a $tot or $van value is

Re: [PHP] mail + pdf + memory question

2002-09-29 Thread Rasmus Lerdorf
$mail-getFile() obviously reads in a file from the disk. You already have your attachment in memory, so don't call that function. Just do $attachment = $data; -Rasmus On Sun, 29 Sep 2002, Jonas Geiregat wrote: this is my code what I want to do is generate a pdf file(not save it on hd of

RE: [PHP] Not Displaying From Vars??

2002-09-29 Thread John W. Holmes
Does just a simple form work? form method=GET input type=text name=test input type=submit name=submit /form ? if(isset($_GET['submit'])) { echo $_GET['test'] . was submitted; } ? ---John Holmes... -Original Message- From: Stephen Craton [mailto:[EMAIL PROTECTED]] Sent: Sunday,

Re: [PHP] navigatie doesn't work in this script

2002-09-29 Thread danny
John, Ik took this script from a script-library. The problem (i think) is that the counter $tot isn't going up. It remains 5 ex: http://www.oostendseverhalen.be/test_met_navigatie3.php?page=8van=35tot=5 John W. Holmes [EMAIL PROTECTED] schreef in berichtnieuws 001a01c267f3$90b8a8d0$[EMAIL

[PHP] Size of SHA1 or MD5 hash hex-encoded?

2002-09-29 Thread Eivind Olsen
Hello. I'm just trying to mess around with the MHASH-library functions to create MD5 and SHA1 hashes. Is there a limit to how large the output from mhash(MHASH_MD5, $input) or mhash(MHASH_SHA1, $input) will be? I'd like to store some MD5 (or SHA1) hashes in a database (after converting them

RE: [PHP] Update identical table

2002-09-29 Thread David Freeman
I have 2 identical tables called tmp_data and data. (on the same mysql database). What would be the simple and more convenient way to update table data with a row from table tmp_data. What about getting rid of tmp_data completely and adding an extra column to your data table. The

Re: [PHP] error suppresion

2002-09-29 Thread Gary
Jean-Christian Imbeault wrote: Gary wrote: They are not really errors they are reporting that the form fields are empty until the form is submitted. Notice: Undefined index: That means your code is not doing any checking of the incoming data. You should always check that the data

[PHP] Undefined constant error

2002-09-29 Thread Voisine
Hello, I'm learning PHP from a book PHP for newbie writen in French and I have an error on one of the exemple. Undifined constant 'compteur' on line 15 which is : if (compteur == 1) { What I'm doing wrong? This is the script ?php include(config.inc.php); $query = SELECT * FROM Type ORDER BY

Re: [PHP] Undefined constant error

2002-09-29 Thread Sascha Cunz
There seems to be a print-error in this book. It's missing a '$' This line: if (compteur == 1) { should be: if ($compteur == 1) { Sascha Am Montag, 30. September 2002 01:52 schrieb Voisine: Hello, I'm learning PHP from a book PHP for newbie writen in French and I have an error

Re: [PHP] Update identical table

2002-09-29 Thread Justin French
on 30/09/02 8:09 AM, David Freeman ([EMAIL PROTECTED]) wrote: What about getting rid of tmp_data completely and adding an extra column to your data table. The extra column, say approved would act as a flag that, if set (ie. = 1) means that the data is confirmed and, if not set, means the

Re: [PHP] Undefined constant error

2002-09-29 Thread Matt
From: Voisine [EMAIL PROTECTED] Sent: Sunday, September 29, 2002 7:52 PM Subject: [PHP] Undefined constant error I'm learning PHP from a book PHP for newbie writen in French and I have an error on one of the exemple. Undifined constant 'compteur' on line 15 which is : if (compteur == 1)

Re: [PHP] Undefined constant error

2002-09-29 Thread Sascha Cunz
make sure you have register_globals on in php.ini or your next question will be 'why isn't $compteur set to the value posted?' Better would be to change the line to the new magic globals, and learn the right way from scratch: I agree with you as far, as to learn the right way from scratch -

[PHP] Re: Thanks

2002-09-29 Thread Voisine
Thank you Sascha and Matt you got it ! Everything is working fine now. There is a lot of printing error in this book :( Regards! Voisine Voisine wrote: Hello, I'm learning PHP from a book PHP for newbie writen in French and I have an error on one of the exemple. Undifined constant

Re: [PHP] Re: Thanks

2002-09-29 Thread Sascha Cunz
Thank you Sascha and Matt you got it ! Everything is working fine now. There is a lot of printing error in this book :( Sadly that's a property of most IT-Books :-( I've hardly ever seen another kind of books with more printing errors than IT books used to have... Sascha -- PHP General

RE: [PHP] Member's Area Script

2002-09-29 Thread Stephen Craton
I'm having the error again this time on my webserver. I have it set as a global variable but it's not working. It can be found at http://mom.melchior.us. Type in test for the username and password. Why??? Thanks, Stephen http://www.melchior.us http://php.melchior.us :: -Original

Re: [PHP] navigatie doesn't work in this script

2002-09-29 Thread Tom Rogers
Hi, Monday, September 30, 2002, 5:20:48 AM, you wrote: d I made a MySQL database with a dictionary in it. Above there is a form in d wich you can specify some parameters. The problem is that the navigation d doesn't work well. I always get the first 5 results. Can somebody help me d out? There

[PHP] How to specify to browser to cache contents?

2002-09-29 Thread Jean-Christian Imbeault
Is the a particular header() call or other setting I can use to tell the client browser to cache the contents of my php pages? (I am using Apache). It seems like my browser (N7) doesn't even cache the images on the pages even though those are static ... Jc -- PHP General Mailing List

[PHP] syntax question

2002-09-29 Thread Jeff Bluemel
couple of questions... I'm am learning php mysql without any books (will also be using postgres, and informix, but assuming most of these are about the same other then sql syntax), and through internet resources. there are a lot of good step throughs on a lot of stuff, but there are some

Re: [PHP] syntax question

2002-09-29 Thread Justin French
on 30/09/02 2:44 PM, Jeff Bluemel ([EMAIL PROTECTED]) wrote: if there a command that will give me the name of the fields in the result set? mysql_field_name() might help... but generally I know what fields I want to grab, so I don't need this... I found this answer on http://php.net/mysql.

Re: [PHP] How to specify to browser to cache contents?

2002-09-29 Thread Justin French
If there's a noticeable difference between two browsers, and you're currently NOT setting any headers for caching, the blame will probably lie in the preference setting of the browser, not in your code. Justin French on 30/09/02 2:24 PM, Jean-Christian Imbeault ([EMAIL PROTECTED]) wrote: Is

[PHP] preg_match problem

2002-09-29 Thread Chris N
Ok heres the situation, I have a string like this $this-_item[title] = 28.09.02 - Some silly Text (First) (Second); Im trying to do a preg_match on it to check it to make sure its in a certian format. Heres my preg_match preg_match(/^(\d+)\.(\d+)\.(\d+)\s+\-\s+(.+)\s+\((.+)\)$,

[PHP] algorithm design

2002-09-29 Thread Pablo Oliva
I have a new project that I might be working on and need some guidance from the more experienced software designers on this list. The project is taking input from users and sorting the users, based on the input, into 4 or 5 separate types of users, categorizing them into these categories. I have

Re: [PHP] syntax question

2002-09-29 Thread Chris Shiflett
Justin French wrote: on 30/09/02 2:44 PM, Jeff Bluemel ([EMAIL PROTECTED]) wrote: how to I test for a null value? empty()? isset()? if($var == )? if($var == NULL)?? have a look in the php manual for string functions, and comparison operators I think he maybe meant testing for

RE: [PHP] syntax question

2002-09-29 Thread Smith, Benjamin
Check out this tutorial on the MySQL website: http://www.mysql.com/articles/mysql_intro.html It contains links to the basics of SQL and its syntax, as well as giving you a good grounding in MySQL specifically. As others have stated, most of the functionality you really need should be built

Re: [PHP] How to specify to browser to cache contents?

2002-09-29 Thread Jean-Christian Imbeault
Justin French wrote: If there's a noticeable difference between two browsers, and you're currently NOT setting any headers for caching, the blame will probably lie in the preference setting of the browser, not in your code. I thought exactly the same thing before posting. So I made sure

[PHP] .php to .html?

2002-09-29 Thread Jean-Christian Imbeault
I am using PHP 4.2.3 and Apache 1.3.26 When a user comes to one of my php pages it comes out has http:..ip/page.php How can I make my pages come out as .html instead of .php? Thanks! Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: auto_prepend: *Exactly* like include()?

2002-09-29 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... Does using the auto_prepend config option in the php.ini file act exactly like and include() call. An include call will read the file off disk ... will auto.prepend do the same thing or will PHP keep the file in memory for quick

[PHP] N7: Media (Page Info Tab) contents not cached bug?

2002-09-29 Thread Jean-Christian Imbeault
When using the View|Page Info Menu item I get a nice tabbed window showing information for the page I just loaded. Clicking the Media tab shows what contents the page needed and importantly whether the contents are cached or not. If I load .php pages I am developing off a local server

RE: [PHP] .php to .html?

2002-09-29 Thread Peter Houchin
just save the files u create as .html make sure in your apache httpd.conf where you reference for .php that u have html in here as well and all will be sweet. eg in this line AddType application/x-httpd-php .php4 .php .htm .php3 .html anything you put in that line will be passed through php

[PHP] Re: dropping mail into queue

2002-09-29 Thread Manuel Lemos
Hello, On 09/08/2002 11:51 AM, Petre Agenbag wrote: Hi list Is is possible to change the default behaviour of the mail() function to send the message to the queue instead of trying to send it immediately? I did do some research into this a while back, but it never really got to a point

Re: [PHP] N7: Media (Page Info Tab) contents not cached bug?

2002-09-29 Thread Chris Shiflett
I do not know the answer to your question for certain, but perhaps it has to do with the Cache-Control HTTP header. This header has a directive called no-cache which allows caching but requires that the cached copy be revalidated each time. To test this, try changing the image source (on your

Re: [PHP] How to specify to browser to cache contents?

2002-09-29 Thread Chris Shiflett
IE ignores the no-store directive of the Cache-Control header, and this is the most common reason behind behavior such as you are describing. Basically, because Netscape (and other browsers) adhere to the HTTP specification, it may appear as if they are misbehaving when it in fact quite the

Re: [PHP] syntax question

2002-09-29 Thread Jeff Bluemel
mysql_field_name() might help... but generally I know what fields I want to grab, so I don't need this... I found this answer on http://php.net/mysql. just as you could :) I've been coding in other languages for about 6 years now, and I have looked through a lot of the mysql stuff, and the

Re: [PHP] .php to .html?

2002-09-29 Thread Jean-Christian Imbeault
Peter Houchin wrote: just save the files u create as .html make sure in your apache httpd.conf where you reference for .php that u have html in here as well and all will be sweet. eg in this line AddType application/x-httpd-php .php4 .php .htm .php3 .html Super! That helps *so* much!

Re: [PHP] syntax question

2002-09-29 Thread Jeff Bluemel
let me be more specific... if a field value is null how do I test for it in the result set, or the array? here's a real live example... I'm working with prepaid phone cards, and if a card has not expired yet then the field zombie_date will be null. so - when I do the mysql_fetch_assoc ($sql)

  1   2   >