[PHP] DATE Questions

2001-11-20 Thread Oosten, Sjoerd van
Hello, I'm working on a project planning system and what i want to do is making a sort of table structure with an overview form today till a month later. All the projects that are between these dates must be viewed. Right now i have the following questions: - How can i determine how much days

[PHP] Re: \|/ $PHP_SELF

2001-11-20 Thread Gerry Figueroa Anadon
Any Ideas as to how I could be able to acomplish this? or How could I get the path of the main page and pass it on to the included file for processing?. thanks! Fred wrote: > $PHP_SELF will always give the name and path of the main file, even if the > variable is set in an included file. The

[PHP] Re: DATE Questions

2001-11-20 Thread Fred
If you are interested I can show you a script that will generate a monthly calendar based on the current date. It has links to go forward and backward by month. It is a fairly simple script that I found at hotscripts.com, but it has amazing potential. I have used it as the basis for some rather

Re: [PHP] configure problem: --with-mysql=/what exactly?

2001-11-20 Thread Arpad Tamas
Hi, Do you have msyql-dev (or similar) package installed? Arpi > I have tried the following, each time removing config.cache > beforehand: > > --with-mysql=/usr > --with-mysql=/usr/include > --with-mysql=/usr/include/mysql > --with-mysql=/usr/lib > > According to a friend with mysql Debs

Re: [PHP] Download File Problem - text not appearing on downloaded file

2001-11-20 Thread Gede Gilijk
Joe, I have been there:-) I use this scripts The first time I run this script, I works fine. The file downloads properly to the client machine with the right size and content. Most of the file is text file. After some times, I met the same problem as yours. The file size is 0. I don't know,

[PHP] Name of file?

2001-11-20 Thread Jaime Iniesta Aleman
Here goes an easy one... I need a script that returns me the name of the page it is in. I mean, if this script is in a page called "test3.php", then it should return "test3.php", and if it is on a page called "heynow.php" it should return, you guessed it, "heynow.php". Thanks! -- PHP General

php-general@lists.php.net

2001-11-20 Thread Stephan Buchholz
probably priority issue. try: if (($One & $Two) == $One) - - in your example this means: ((0100 & ) == 0100) (0100 == 0100) TRUE ...in other case 0100 & ( == 0100) is 0100 & 0 is always 0 hope this helps Buchholz "Fred" wrote > From: "Fred" <[EMAIL PROTEC

[PHP] session variables in functions....

2001-11-20 Thread wim van houts
Somebody knows why I cannot reach the $HTTP_SESSION_VARS in a function For example, why does this not output the "en-US" string three times: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To

[PHP] MySQL and GROUP BY

2001-11-20 Thread David Freeman
Hi All, I suspect this really can by done in my SQL query rather than afterwards in PHP but I haven't been able to find a way. I have a table with three fields: 1. First_Name 2. Last_Name 3. Business_Name A row that has a first and last name will not have a business name. A row with a busin

[PHP] Re: POST files with PHP

2001-11-20 Thread _lallous
Never tried that, But i'm afraid that by reading a binary file like: join('', file('binfile')) will brake the file! try using fopen('binfile', 'rb') and fread() and filesize() good luck. "Daniel Reichenbach" <[EMAIL PROTECTED]> wrote in message 01c17111$02617a50$796010ac@danielmob">news:000

[PHP] Re: session variables in functions....

2001-11-20 Thread Julio Nobrega Trabalhando
Make it global or pass it as an argument: function CurrentLang(){ global $HTTP_SESSION_VARS; $language = $HTTP_SESSION_VARS["LangID"]; echo($language); } Or: function CurrentLang($HTTP_SESSION_VARS){ $language = $HTTP_SESSION_VARS["LangID"]; echo($language); } --

[PHP] odbc_num_rows always returns -1

2001-11-20 Thread Peter Lavender
Hi Everyone, As the subject says. I'm using 4.0.6 on IIS/win2k to a MSSQL 2000 database. I wish to check if a query returns any values, so the code I have is nothing more than: $numRows = odbc_num_rows($result); print ("$numRows"); if ($numRows <= 0) { print("Nothing to show"); } Have I

[PHP] How to check what country the user is comming from ?

2001-11-20 Thread Fly
thx Kamil Muszynski -- 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: Name of file?

2001-11-20 Thread Henrik Hansen
[EMAIL PROTECTED] (Jaime Iniesta Aleman) wrote: > Here goes an easy one... I need a script that returns me the name of the > page it is in. I mean, if this script is in a page called "test3.php", then > it should return "test3.php", and if it is on a page called "heynow.php" it > should retur

Re: [PHP] How to check what country the user is comming from ?

2001-11-20 Thread Duncan Hill
On Tue, 20 Nov 2001, Fly wrote: > thx Kamil Muszynski Practically, you can't. Technically, you can. Take the IP, run it through whois.arin.net. If that returns apnic, ripe etc, run it through those.. you might get the answer you want. Calls to apnic etc are probably blocking calls - slowin

[PHP] Download textfile

2001-11-20 Thread Arno
When I link a textfile, the textfile is opened in the browser. I want the SaveAs box to be shown. Is this possible and if so how to do that? TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To co

RE: [PHP] Re: DATE Questions

2001-11-20 Thread Oosten, Sjoerd van
Of course i'm very interested! Greetings, Sjoerd van Oosten Digitaal vormgever [EMAIL PROTECTED] Datamex E-sites B.V. http://www.esites.nl Minervum 7368 Telefoon: (076) 5 730 730 4817 ZH BREDA Telefax: (076) 5 877 757 _

Re: [PHP] Daemons (was: How to check what country the user is comming from ?)

2001-11-20 Thread Stefan Rusterholz
Can you explain me, how to build a (standalone) daemon or point me to a good tutorial? Thank you for help in advance Stefan Rusterholz, [EMAIL PROTECTED] -- interaktion gmbh Stefan Rusterholz Zürichbergstrasse 17 8032 Zürich -- T. +4

[PHP] File download results question

2001-11-20 Thread Joe Van Meer
Hi there. I have a small php app that allows a user to download a txt file that's created 'on the fly' from a database. Everything is working great except for the actual results displayed on the file...it get results similar to the code below...it's insertng tags (and square characters) all over

[PHP] Re: Download textfile

2001-11-20 Thread Joe Van Meer
Hi Arno, I was shown this code yesterday...it will allow a download of a file. Of course you'll have to change the file name :) Cheers Joe "Arno" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > When I link a textfile, the textfile is opened in the browser.

[PHP] Help with PHP_AUTH_USER needed.

2001-11-20 Thread De Necker Henri
Hi there!I want to know how to reload the following script of mine by using a cookie.If the cookie expires the user must lgin again.I can get it right to reload the authentication script This is my code im using in my secure pages : require_once("inc/db.inc"); if(!isset($Cookie)){ include("qui

[PHP] Re: odbc_num_rows always returns -1

2001-11-20 Thread Joe Van Meer
Hi Peter, from what I hear (and what I've read) with sqlServer you'll always get a result of -1 for num_rows. To get an accurate count you'll have to use the count() on the db in a select query. That's one workaround, no doubt there are others. SELECT COUNT(my_id) FROM TABLE ... Cheers Joe :)

[PHP] Re: odbc_num_rows always returns -1

2001-11-20 Thread Joe Van Meer
Also (I forgot to tell you) you can use that -1 number. The fact that it is -1 tells you you have records that have been retrieved. Otherwise it will return 0. Cheers, Joe :) "Joe Van Meer" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi Peter, from what I

Re: [PHP] Download textfile

2001-11-20 Thread Paul Warner
"Arno" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > When I link a textfile, the textfile is opened in the browser. I want the > SaveAs box to be shown. Is this possible and if so how to do that? I apologize for not having a complete answer, but I do have an

[PHP] Re: File download results question

2001-11-20 Thread Joe Van Meer
I figured it out... strip_tags() function did the trick . Joe "Joe Van Meer" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi there. I have a small php app that allows a user to download a txt file > that's created 'on the fly' from a database. Everything

[PHP] Regular Expressions.

2001-11-20 Thread Jeff Lewis
I'm trying to port over some Perl to PHP and have come to a string of regular expressions like this. There are probably 30 of them: $message =~ s~\[color=([\w#]+)\](.*?)\[/color\]~$2~isg; $message =~ s~\[black\](.*?)\[/black\]~$1~isg; $message =~ s~\[white\](.*?)\[/white\]~$1~isg; How can I ac

[PHP] Re: File download results question

2001-11-20 Thread Henrik Hansen
[EMAIL PROTECTED] (Joe Van Meer) wrote: > I figured it out... strip_tags() function did the trick . > use strip_tags with caution because it removes some valid text ex: something < something will be something after using strip_tags on the text. -- Henrik Hansen -- PHP General Mailing L

Re: [PHP] Regular Expressions.

2001-11-20 Thread Andrey Hristov
$message = preg_match ("~\[color=([\w#]+)\](.*?)\[/color\]~", "$2"); try with this - Original Message - From: "Jeff Lewis" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 20, 2001 3:37 PM Subject: [PHP] Regular Expressions. I'm trying to port over some Perl to PHP and

Re: [PHP] Regular Expressions.

2001-11-20 Thread Stefan Rusterholz
I ran into that problem also when I first tried to script with PHP. 1. preg_match("/yourexpression/",$text,$matches); always set the / at beginning and end of the regex (as you did in perl) 2. preg_match("/\[/", this won't match the char [ because of the double-quotes (") it es

Re: [PHP] Regular Expressions.

2001-11-20 Thread Andrey Hristov
You don't have to start with /, because you can start with |, ~, or something else which does not appear in the regex string. The idea is the first character must be and the last. - Original Message - From: "Stefan Rusterholz" <[EMAIL PROTECTED]> To: "Jeff Lewis" <[EMAIL PROTECTED]> Cc:

Re: [PHP] exporting

2001-11-20 Thread Jon Farmer
> hey guys.. > > does anyone have any ideas on how to export information from a mysql > database to microsoft word, excel, access, note pad or any other such > application? > There is a class on http://phpclasses.upperdesign.com/ That allows you to create a excel file from php. Should be fairly

[PHP] Error Code for fsockopen()??? What it mean?

2001-11-20 Thread Scott Fletcher
Hi! I use this script and I recieve an error code, what does this mean in english? I can understand the "0" or the "1", but "2" fsockopen (HOSTNAME, &$errno, &$errstr) or die("$errno: $errstr"); Thanks, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-m

Re: [PHP] MySQL and GROUP BY

2001-11-20 Thread Jon Farmer
> At the moment I am doing something like this for my SQL statement > (simplified for just the bit I need to figure out): > > SELECT * FROM My_Table ORDER BY Business_Name, Last_Name, First_Name; > > What I would _like_ to have happen is that the select list will end up > sorted by business name a

[PHP] WXFEED Weather Script

2001-11-20 Thread Brian Paulson
I am trying to locate a script called WXFEED by John Sanders. The only place this script seems to be located is on hotscripts but the link no longer works. So if any one has downloaded it and still has it around I would appreciate it if I could get a copy. Thank You Brian Paulson Sr. Web Develope

[PHP] Re: File download results question

2001-11-20 Thread Joe Van Meer
Is there another way to do this...I'd like to be able to display html code on my php pages (code examples) Thx Joe "Henrik Hansen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > [EMAIL PROTECTED] (Joe Van Meer) wrote: > > > I figured it out... strip_tags() f

Re: [PHP] WXFEED Weather Script

2001-11-20 Thread Dan McCullough
I would like it as well. --- Brian Paulson <[EMAIL PROTECTED]> wrote: > I am trying to locate a script called WXFEED by John Sanders. The only > place this script seems to be located is on hotscripts but the link no > longer works. So if any one has downloaded it and still has it around I > would

Re: [PHP] WXFEED Weather Script

2001-11-20 Thread Dan McCullough
try this ... I dont read french and I am having some problems downloading. http://www.neteconomie.com/perl/navig.pl/neteconomie/guides/scripts/fiche/20010217163348 --- Dan McCullough <[EMAIL PROTECTED]> wrote: > I would like it as well. > --- Brian Paulson <[EMAIL PROTECTED]> wrote: > > I am tryi

[PHP] Multiple Entry SELECT and JavaScript interaction

2001-11-20 Thread Sean Dougherty
I have a curious problem that I don't have a clue how to solve that's probably simple but I can't find it documented anywhere. It might be the first PHP-induced limitation I've run into... In order to allow multiple entry on a form object, the name of the form has to end with the brackets [], bu

[PHP] Display Problemo

2001-11-20 Thread Lerp
I have a small php app that I'm building to display, insert, edit, etc... various types of code snipits (asp, php, html, etc...) in a db. I also have a download option that creates a text file with the code that they've selected. I have 2 problems...the first is that when I go to view the text fi

[PHP] kill a session...

2001-11-20 Thread Romeo Manzur
Somebody know how to kill a session when a user left the page??? -- 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: kill a session...

2001-11-20 Thread Lerp
session_start(); /unset any session variables session_unset("islogged"); /kill the session session_destroy(); HTH Joe:) "Romeo Manzur" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Somebody know how to kill a session when a user left the page??? > -- PH

[PHP] using php exec command

2001-11-20 Thread Mark Lo
Hi, I would like to know how to use the exec command to assign a new system users. I have sent out this questions so many times, but doesn't get any reply. Does It means this is ridiculous to assign a new system user using PHP EXEC command. Thank you for your attentions, Mark Lo --

[PHP] RE :[PHP] Multiple Entry SELECT and JavaScript interaction

2001-11-20 Thread Jon Farmer
>In order to allow multiple entry on a form object, the name of the >form has to end with the brackets [], but then when I do that I can't refer >to it from within JavaScript because as a variable name it becomes illegal. >I have to be able to refer to the SELECT object to change its contents bas

Re: [PHP] Display Problemo

2001-11-20 Thread Stefan Rusterholz
I see 2 possibilities to go and 1 warning: 1th way to go: you insert another field into your db called "originalCode" for example where you insert the code also but don't modify it at all. If someone wants to download the code you fetch the code from that field 2th way to go: you stay with

Re: [PHP] Display Problemo

2001-11-20 Thread Jack Dempsey
1. what do you want the tags to be? a simple str_replace('','',$text) will strip the tags... 2. use html text jack Lerp wrote: > I have a small php app that I'm building to display, insert, edit, etc... > various types of code snipits (asp, php, html, etc...) in a db. I also have > a downloa

[PHP] Re: Multiple Entry SELECT and JavaScript interaction

2001-11-20 Thread Daniel Berwig
You can't use brackets in this case. The Javascript won't reconize the name of the form element. Try using another caracter that can be reconized, like underscore. "Sean Dougherty" <[EMAIL PROTECTED]> escreveu na mensagem [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have a curious problem th

[PHP] language.variables.predefined.php

2001-11-20 Thread Markus Bertheau
Good day, refering to /manual/en/ -- 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: \|/ $PHP_SELF

2001-11-20 Thread Fred
If you just need the filename of the include file you can set it in code by assigning it to a variable at design time. Something like $ThisPage = "include.php". You could also do this for the entire path, but it would need to be changed whenever you put the script in a different place. Fred G

[PHP] Re: Multiple Entry SELECT and JavaScript interaction

2001-11-20 Thread Daniel Berwig
I almost forgot that... you can refer to the form element by the objects array, like this: document.form[0].elements[1].value "Sean Dougherty" <[EMAIL PROTECTED]> escreveu na mensagem [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have a curious problem that I don't have a clue how to solve t

[PHP] language.variables.predefined.php

2001-11-20 Thread Markus Bertheau
(Hey, bug in Evolution. Hope it works now.) Good Day, refering to /manual/en/language.variables.predefined.php you write "If the register_globals directive is set, then these variables will also be made available in the global scope of the script; i.e., separate from the $HTTP_*_VARS arr

[PHP] AddType x-httpd-php to Root Directory Fouls Authentication

2001-11-20 Thread Jeff Hill
Why would Apache foul up authentication requests when the following .htaccess file is placed in my root directory: AddType application/x-httpd-php html All users who enter any subdirectory with a .htaccess authentication requirement get a 401 error instead of the pop-up authentication re

Re: [PHP] Re: DATE Questions

2001-11-20 Thread Fred
Alright. I was recently writting an attendance application for a school. I wanted to beable to display attendance information from mysql in a calendar, but I did not want to have to write the calendar script from scratch. I must have looked at thirty or so calendar scripts before I found this o

Re: [PHP] floating point exception after php 4 upgrade on raq 2

2001-11-20 Thread Steve Werby
"Paul Schreiber" <[EMAIL PROTECTED]> wrpte" > >From /var/log/httpd/error: > [Mon Nov 19 19:53:19 2001] [notice] child pid 30261 exit signal Floating > point exception (8) > # uname -a > Linux www 2.0.34 #1 Thu Feb 25 21:04:19 PST 1999 mips unknown > # gcc -v > Reading specs from /usr/lib/gcc-lib/

Re: [PHP] MySQL and GROUP BY

2001-11-20 Thread Steve Werby
"David Freeman" <[EMAIL PROTECTED]> wrote: > SELECT * FROM My_Table ORDER BY Business_Name, Last_Name, First_Name; > > What I would _like_ to have happen is that the select list will end up > sorted by business name as well as last name and then first name. At > the moment this query is resulting

RE: [PHP] Re: DATE Questions

2001-11-20 Thread Oosten, Sjoerd van
Fred thanks a lot, you really helped me out! Sjoerd van Oosten Digitaal vormgever [EMAIL PROTECTED] Datamex E-sites B.V. http://www.esites.nl Minervum 7368 Telefoon: (076) 5 730 730 4817 ZH BREDA Telefax: (076) 5 877 757 ___

[PHP] A tricky one?

2001-11-20 Thread Raymond Lilleødegård
Hi! I'm trying to make this form working with a mail() script. I made this form. Then the customer could write how many "pizzas" or "hamburgers" as he want. But how do I solve this without too much headache? Havent slept for days because of this problem : ) script

[PHP] odbc with access on win2k

2001-11-20 Thread Paul Roberts
I just installed win2k to dual boot with 98 while I change over os's, I have a script that connects to an access 97 DB via odbc_connect, it works fine under win 98 but gives an error that it can't connect on win2000.(error follows) any ideas what I'm doing wrong, I have set up user and file dsn o

[PHP] Re: A tricky one?

2001-11-20 Thread Raymond Lilleodegard
Thanks for answering. But this only works if the customer orders one of each. Do you know how to do it if, lets say the customer order 2 hamburgers and nothing else? Raymond "Raymond LilleøDegåRd" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi! > > I'm

[PHP] include "http" problem

2001-11-20 Thread Mike Webby
include ("http://www.somesite.com/somepage.html";); Worked perfect on our unix box and our win98 machines but when we installed PHP on our Windows server it no longer worked and tottaly ignored the include unless we used the path instead like. include ("somepage.html"); [EMAIL PROTECTED]

RE: [PHP] Re: A tricky one?

2001-11-20 Thread Matthew Luchak
how about... Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: Raymond Lilleodegard [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 20, 2001 1:57 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: A tricky one? Thanks for a

[PHP] Page creation interfaces?

2001-11-20 Thread Steven Katz
Are there any existing php-driven systems out there that allow people who no nothing about html to create and maintain their own pages, such as with a forms-based administrative interface? Steven -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: [PHP] Re: DATE Questions

2001-11-20 Thread Fred
Glad to help. I'd be interested to know how it works out. Fred Sjoerd Van Oosten <[EMAIL PROTECTED]> wrote in message C9F89DA57491D511BDAF00E0180C348103BFF1@ESADM01">news:C9F89DA57491D511BDAF00E0180C348103BFF1@ESADM01... > Fred thanks a lot, you really helped me out! > > ___

[PHP] Re: include "http" problem

2001-11-20 Thread Fred
I may be wrong, but I believe that allow_url_fopen needs to be turned on in the config file for this to work. Fred Mike Webby <[EMAIL PROTECTED]> wrote in message 011001c171f6$26da0380$0200a8c0@nay">news:011001c171f6$26da0380$0200a8c0@nay... include ("http://www.somesite.com/somepage.html";); W

[PHP] Testing for the presence of HTML

2001-11-20 Thread Richard S. Crawford
My database contains a field which may or may not contain HTML code, depending on what a particular user enters when they enter the data. Here's the challenge: If there is HTML code in this field, then print the text with interpreted HTML. No problem at all. If there is no HTML code in the f

Re: [PHP] Re: A tricky one?

2001-11-20 Thread Raymond Lilleodegard
It works after modifying it a little. BUT... :) It lists all the variables even if they aren't given any value. Is it possible to only get the defined ones? Regards Raymond "Matthew Luchak" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... how about... __

RE: [PHP] Re: A tricky one?

2001-11-20 Thread Matthew Luchak
try &&($val!="") instead of &&(isset($var) Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: Raymond Lilleodegard [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 20, 2001 3:52 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] R

[PHP] Re: File download results question

2001-11-20 Thread Henrik Hansen
[EMAIL PROTECTED] (Joe Van Meer) wrote: > Is there another way to do this...I'd like to be able to display html code > on my php pages (code examples) cant you use str_replace() or something? -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

Re: [PHP] Re: A tricky one?

2001-11-20 Thread Joshua Hoover
If you only want to show the ones variables that have values input by the user, you could do this with the while loop: while (list($var, $val) = each($HTTP_POST_VARS)) { if ((strlen($val) > 0) && ($var !="email") && ($var !="SUBMIT") && (isset($var)) { $message .= "$val

[PHP] Cookies and Variables

2001-11-20 Thread Richard S. Crawford
Consider this code, in page1.php: ...and this code, in page2.php: Click here< /a >"); ?> (In the actual code, the value of $someWord is passed via POST through a form, but the principle is the same.) The first time I load page2.php, the output should be: someWord says: I am a cook

[PHP] PHP & Oracle9i

2001-11-20 Thread Steve Haemelinck
Is it possible to use Oci-functions with Oracle 9i database ? -- 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: Cookies and Variables

2001-11-20 Thread Fred
If you want certain variables to over ride cookie variables you need to change the setting of the variables_order directive in php.ini: variables_order string Set the order of the EGPCS (Environment, GET, POST, Cookie, Server) variable parsing. The default setting of this directive is "EGPCS". Se

[PHP] How to detect if cookies are enable?

2001-11-20 Thread pekesan
Does anyone know how to detect if the client browser allows cookies or not? Thanks in advance. -- 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: [EM

[PHP] Re: Testing for the presence of HTML

2001-11-20 Thread Fred
This may not actually be a problem. If you are expecting that users may enter links as html you can still use nl2br and get a decent result. The only time this would be a problem, would be if the users actually entered as they filled in the form. In my experience, it is highly unlikely that a

Re: [PHP] Re: Testing for the presence of HTML

2001-11-20 Thread Richard S. Crawford
Unfortunately, I also have users entering complex HTML code such as tables; which, if each tag of a table is on a separate line, renders badly with nl2br(). I mean, really badly. You have no idea. My users range from professional web developers to people who are still frightened by the idea

Re: [PHP] Re: Cookies and Variables

2001-11-20 Thread Richard S. Crawford
Sadly, I don't have access to the php.ini file on this server. I think I can accomplish the task with some complicated switching of variable names. At 01:16 PM 11/20/2001, Fred wrote: >If you want certain variables to over ride cookie variables you need to >change the setting of the variables_

[PHP] Re: How to detect if cookies are enable?

2001-11-20 Thread Dmitri Zakharov
Pekesan wrote: > > Does anyone know how to detect if the client browser allows cookies or not? > > Thanks in advance. Here's one way to do that (This is from 'Professional PHP Programming' published by Wrox Press): Step 1: - send a set-cookie request - reload current page Step 2:

[PHP] Check contents of variable

2001-11-20 Thread Daniel Alsén
Hi, which function would i use to check if a certain value is in the contents of a variable? I have a form where the users submits url's. I need the url with http:// in the beginning. Since there is more data after the http:// i can´t just do a simple if-statement. So what do i do? After i dete

RE: [PHP] Re: Testing for the presence of HTML

2001-11-20 Thread Matthew Luchak
If I understand the question correctly - came late to the thread - I think the easiest way to do this would be to check for the presence of "mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 20, 2001 4:29 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: Testing for the presence of HTML Unfortuna

[PHP] How do I convert from perl to php?

2001-11-20 Thread digital1
I am a perl user trying to convert to php how would i turn this perl into php? use CGI; $name = param(name); $address = param(address); $phone = param(phone); @required = qw( name address phone ); foreach $key($required) { if (!$$key) { &out("You left one empty."); } } ??

Re: [PHP] Check contents of variable

2001-11-20 Thread PHP List
How about: if (substr($url,0,7) <> "http://";) $url = "http://"; . $url; > Hi, > > which function would i use to check if a certain value is in the contents of > a variable? > > I have a form where the users submits url's. I need the url with http:// in > the beginning. Since there is more

Re: [PHP] Re: A tricky one?

2001-11-20 Thread Raymond Lilleodegard
Thank you very much guys! You really helped out with this one. I will sleep a lot better to night : ) Regards Raymond "Matthew Luchak" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... try &&($val!="") instead of &&(isset($var) Matthe

Re: [PHP] How do I convert from perl to php?

2001-11-20 Thread Rasmus Lerdorf
if(!(isset($name) && isset($address) && isset($phone)) { echo "You left one empty."; } On Tue, 20 Nov 2001 [EMAIL PROTECTED] wrote: > I am a perl user trying to convert to php > > how would i turn this perl into php? > > use CGI; > > $name = param(name); > $address = param(address); > $ph

RE: [PHP] Check contents of variable

2001-11-20 Thread Daniel Alsén
> How about: > > if (substr($url,0,7) <> "http://";) > $url = "http://"; . $url; Thanks! That´s just the function i am looking for. I looked it up in the manual. Correct me if i am wrong - if i don´t set the second parameter in substr it just continues to read until the variable is finished?

Re: Re: [PHP] How do I convert from perl to php?

2001-11-20 Thread digital1
So I would have to write a seperate if condition for each form input field i wanted to require? that doesn't make for a very dynamic script... > if(!(isset($name) && isset($address) && isset($phone)) { > echo "You left one empty."; > } > > On Tue, 20 Nov 2001 [EMAIL PROTECTED] wrote: > > >

Re: [PHP] How do I convert from perl to php?

2001-11-20 Thread Joshua Hoover
Try something like this: while (list($name, $value) = each($HTTP_POST_VARS)) { if ((strlen($value) < 1) && ($name == "name" || $name == "address" || $name == "phone")) { $error .= "You left $name empty "; } } if ($error) { echo $error; } That's one way

[PHP] Re: Re: How do I convert from perl to php?

2001-11-20 Thread Philip Hallstrom
You could do something like this... there are lots of ways to validate your data... while( list($key, $value) = each($HTTP_POST_VARS) ) { if( empty($value) ) { print("Sorry, you left $key empty."); } } This is assuming the form method is POST. If it's GET, swit

Re: [PHP] How do I convert from perl to php?

2001-11-20 Thread Miles Thompson
Beauty! /mt At 02:08 PM 11/20/2001 -0800, Rasmus Lerdorf wrote: >if(!(isset($name) && isset($address) && isset($phone)) { > echo "You left one empty."; >} > >On Tue, 20 Nov 2001 [EMAIL PROTECTED] wrote: > > > I am a perl user trying to convert to php > > > > how would i turn this perl into

[PHP] Process bar

2001-11-20 Thread Arvydas V.
Hello, I have to solve one problem - my script searches simply text document, so - if this document is big enought - i have to "replace" timeout of my script, besides - i have to make, that then this proceeds some kind of process bar must scroll until script finishes his job... so - any ideas

[PHP] Problems.Sessions id on urls

2001-11-20 Thread pekesan
Some browser (konqueror) show the session id in the url. Does anoyone know how to aviod that. Netscape does not show the session id. Thanks in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: [PHP] Check contents of variable

2001-11-20 Thread PHP List
Correct, the third parameter is for the number of characters to read, nothing means entire string. Function details can be found here: http://download.php.net/manual/en/function.substr.php > > How about: > > > > if (substr($url,0,7) <> "http://";) > > $url = "http://"; . $url; > > Thanks! >

Re: [PHP] Re: Re: How do I convert from perl to php?

2001-11-20 Thread Brandon Lamb
Now this looks like what I would want... brandon - Original Message - From: "Philip Hallstrom" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, November 20, 2001 2:22 PM Subject: [PHP] Re: Re: How do I convert from perl to php? You could do something l

Re: [PHP] Re: Re: How do I convert from perl to php?

2001-11-20 Thread Brandon Lamb
What about this? $required = array('name','address','phone'); while ( list($key, $value) = each ($required) ) { if ( empty($value) ) { print("Sorry, you left $key empty."); } } - Original Message - From: "Philip Hallstrom" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>

Re: Re: [PHP] How do I convert from perl to php?

2001-11-20 Thread PHP List
How about like this: $required = array("field1","field2","field3"); for ($i=0;$i To: <[EMAIL PROTECTED]> Sent: Tuesday, November 20, 2001 2:21 PM Subject: Re: Re: [PHP] How do I convert from perl to php? > So I would have to write a seperate if condition for each form input field i wanted to r

RE: [PHP] Check contents of variable

2001-11-20 Thread Jason G.
You could also try: if(! ereg('^http://', $url)) $url = 'http://' . $url; -JAson Garber At 11:15 PM 11/20/2001 +0100, Daniel Alsén wrote: > > How about: > > > > if (substr($url,0,7) <> "http://";) > > $url = "http://"; . $url; > >Thanks! > >That´s just the function i am looking f

[PHP] Re: Re: Re: How do I convert from perl to php?

2001-11-20 Thread Philip Hallstrom
No, but this: $required = array('name','address','phone'); foreach( $required as $key ) { if( empty($HTTP_POST_VARS[$key]) ) { print("Sorry, you left key empty."); } } should work. On Tue, 20 Nov 2001, Brandon Lamb wrote: > What about this? > > $required =

Re: [PHP] Re: Re: Re: How do I convert from perl to php?

2001-11-20 Thread Ryan Christensen
Or.. $required = array($name,$addr,$phone); foreach($required as $x) { if(!$x) { print "error"; } } ~Ryan - Original Message - From: "Philip Hallstrom" <[EMAIL PROTECTED]> To: "Brandon Lamb" <[EMAIL PROTECTED]> Cc: "PHP List" <[EMAIL PROTECTED]> Sent: Tuesday, November 20, 2001

Re: [PHP] Re: Re: How do I convert from perl to php?

2001-11-20 Thread Joshua Hoover
BUT, that code doesn't take into account that you may have other form parameters that you DON'T want to require. With that code below, you're requiring EVERY form element to be filled out. That's not what the original post requested. He asked for a way to require specific fields according t

Re: [PHP] Process bar

2001-11-20 Thread PHP List
There is a way to do it with javascript, works in IE but have not tried it with Netscape. > Hello, > I have to solve one problem - my script searches simply text document, so - if this document is big enought - i have to "replace" timeout of my script, besides - i have to make, that then this pr

Re: [PHP] Re: Cookies and Variables

2001-11-20 Thread Jason G.
Keep it mind that EGPCS is in that order for a reason. Changing it can open up security problems... -JAson Garbr At 01:16 PM 11/20/2001 -0800, Fred wrote: >If you want certain variables to over ride cookie variables you need to >change the setting of the variables_order directive in ph

Re: [PHP] Problems.Sessions id on urls

2001-11-20 Thread Joshua Hoover
This is actually a feature that PHP offers when compiled with the --enable-trans-sid option. If a browser does not support cookies or has security settings that place restrictions on cookies that won't allow PHP to have access to the cookie, then PHP will append the session id to the URL. I

  1   2   >