[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

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 ? function detect_browser($variable) { if(eregi((msie) ([0-9]{1,2}.[0-9]{1,3}), $variable)) { $content = ie; } else { $content = nn; }

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

Re: [PHP] Bitwise

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

[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: ? session_register(LangID); $HTTP_SESSION_VARS[LangID] = en-US; echo($HTTP_SESSION_VARS[LangID]); echo(**); function CurrentLang(){

[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

[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

[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 ($numRowsbr); 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 return, you

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 -

[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

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.

[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 br tags (and square characters) all

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

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

[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\]~font color=$1$2/font~isg; $message =~ s~\[black\](.*?)\[/black\]~font color=00$1/font~isg; $message =~

[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

Re: [PHP] Regular Expressions.

2001-11-20 Thread Andrey Hristov
$message = preg_match (~\[color=([\w#]+)\](.*?)\[/color\]~, font color=$1$2/font); 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

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

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

[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

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

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

[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 SELECT form object, the name of the form has to end with the brackets

[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

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

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

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 br tags to be? a simple str_replace('br','',$text) will strip the tags... 2. use pre html text /pre 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

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

[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

[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

[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

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

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

2001-11-20 Thread Steve Werby
Paul Schreiber [EMAIL PROTECTED] wrpte snip snip 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

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

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 : ) input type=text name=pizza input

[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

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

[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... ? $message=; $header=From: $email; $to=[EMAIL PROTECTED]; $subject=burger me; while(list($var, $val) = each($HTTP_POST_VARS)) { if(($var !=email)($var !=SUBMIT)(isset($var)){$message .=$val $var were ordered \n;} } MAIL( $to, $subject,

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

[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

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

[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 $var were

[PHP] Cookies and Variables

2001-11-20 Thread Richard S. Crawford
Consider this code, in page1.php: ?php setcookie(someWord,I am a cookie); ? ...and this code, in page2.php: ?php setcookie(someWord,$someWord); print (someWord says: $someWord); $someWord = I am a variable; print ( a

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

[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 BR as they filled in the form. In my experience, it is highly unlikely that

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 / or as a minimum when the user submits the form. You could then pop up a confirmation dialog This text seems to contain HTML code is this correct? - Ah!

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

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) Matthew Luchak

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); $phone =

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? If i set

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 br; } } if ($error) { echo $error; } That's one way to do

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

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? use CGI;

[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

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! That´s just

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 like

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] Sent:

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;$icount($required);$i++) { $temp = $required[$i]; if (trim($$temp) == ) { echo You Missed One; continue; (break?) } } Something like that, I havn't acually tried it. - Original

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 for. I looked it

[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 2:37 PM

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

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

[PHP] Conversion number two?

2001-11-20 Thread Brandon Lamb
Here is the php version $required = array('name','address','phone'); Here is the perl version @required = qw( name address phone ); So is there an easy way in perl for us lazy people so i dont have to use commas and enter every variable name in single quotes? -- PHP General Mailing List

RE: [PHP] Re: A tricky one?

2001-11-20 Thread John Monfort
Try This approach: $msg = I want to order: br; if(!empty($pizza)) { $msg .= $pizza.Pizzabr; } if(!empty($chips)) { $msg .= $chips.Chips br; } if(!empth($hamburgers)) { $msg .= $hamburgers. Hamburgersbr; } //Note: PHP has a one-line if statement, which slips my mind

Re: [PHP] Conversion number two?

2001-11-20 Thread Steve Werby
Brandon Lamb [EMAIL PROTECTED] wrote: Here is the php version $required = array('name','address','phone'); Here is the perl version @required = qw( name address phone ); So is there an easy way in perl for us lazy people so i dont have to use commas and enter every variable name in

Re: [PHP] Conversion number two?

2001-11-20 Thread Philip Olson
perhaps you want to do the following: function foo($str) { return explode(' ',$str); } $required = foo('name address phone'); regards, Philip Olson On Tue, 20 Nov 2001, Brandon Lamb wrote: Here is the php version $required = array('name','address','phone'); Here is the perl

[PHP] A new exchange launches: Yachts boats for sale or charter, holidays afloat and more....

2001-11-20 Thread The team @ yacht-search.net
If you have any interest in yachting, boats, sailing or holidays afloat... Visit www.yacht-search.net the new international boat yacht charter sales system - FREE OF CHARGE FOR ALL USERS... Free advertising or enquires using $1.5 Million USD (£1M) of technology! CREATING NEW MARKETS

[PHP] textarea, carriage returns and formatting

2001-11-20 Thread Chris Aitken
Hi, Something ive been trying to find out but cant seem to get the wording right to find the answers in the archives. What I have is a mysql database, and in that DB I have a field which is just a 'text' field. What I want to be able to do is write whatever text is typed from the webforms

[PHP] Setting title via included file

2001-11-20 Thread Chris Lott
I have a page that includes a file in the middle, but I wish to set the title of the page based on a variable set in the included file-- is this possible? PHP processes the page sequentially, so if I have $foo = Title in the included file, it is too late to use it for the title of the main

[PHP] auto form submit

2001-11-20 Thread wm
hi all, if i pass data through a form (post) to a php script(script must be separate from form) is there a way that this php script can then forward that data to another script without attaching it to the end of the url? thanks. -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Cookies and Variables

2001-11-20 Thread Mike Eheler
$HTTP_COOKIE_VARS['someWord']; $HTTP_GET_VARS['someWord']; :P Mike Richard S. Crawford wrote: Consider this code, in page1.php: ?php setcookie(someWord,I am a cookie); ? ...and this code, in page2.php: ?php setcookie(someWord,$someWord); print (someWord

[PHP] Address Standardization

2001-11-20 Thread Jeff Lacy
Hello, Does anyone have a good function or ideas about address standardization? I need some form of it in a web-app I am trying to write, but I don't know where to begin. Thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

RE: [PHP] auto form submit

2001-11-20 Thread JSheble
When POST data is sent to a page, it's as if somebody typed the text into a textarea and hit a submit button. Even though this is being done programmatically, the POST method will behave the same. SOmebody in their (your)code will have to write something similiar to: $postData = xVar= .

RE: [PHP] odbc with access on win2k

2001-11-20 Thread Andrew Hill
Paul, Use a System DSN. Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- From: Paul Roberts [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 20,

[PHP] mail() function

2001-11-20 Thread Ben Clumeck
I am new to PHP. I am trying to specify the email address in the From field. Right now it gives me my host name. Can anyone help? Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact

Re: [PHP] mail() function

2001-11-20 Thread Avdija A . Ahmedhodziæ
@mail( [EMAIL PROTECTED], $subject, $body, From: $fromemail\nContent-Type: text/plain; charset=\windows-1250\ ); - Original Message - From: Ben Clumeck [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 21. studeni 2001 01:58 Subject: [PHP] mail() function I am new to PHP. I am trying to

Re: [PHP] mail() function

2001-11-20 Thread Avdija A . Ahmedhodziæ
@mail( [EMAIL PROTECTED], $subject, $body, From: $fromemail); - Original Message - From: Avdija A. Ahmedhodziæ [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 21. studeni 2001 02:06 Subject: Re: [PHP] mail() function @mail( [EMAIL PROTECTED], $subject, $body, From:

Re: [PHP] mail() function

2001-11-20 Thread Philip Olson
See: http://www.php.net/manual/en/function.mail.php an example lives there. The key here is that additional headers, such as From: will go in the optional additional_headers parameter. Regards, Philip Olson On Tue, 20 Nov 2001, Ben Clumeck wrote: I am new to PHP. I am trying to specify

[PHP] Authenticating Users with their Windows Login

2001-11-20 Thread Feroze Md. Arif
Hi, First of all, my apologies if this question has been asked earlier. I am in a hurry and I haven't checked the archives (Actually, I am in the process of doing it but am trying to cover all the bases). I know that PHP has functions which will allow Users to be authenticated off a NIS Server

  1   2   >