[PHP] how to redirect to other page?

2001-03-05 Thread JW
i have used header to redirect to other page. however, it has said that i have written something out the screen before header. would anyone please to help me? the following is all my code. ?php include "config.php3"; include "functions.php3"; $result = checkUser($nUserNo,

RE: [PHP] Running php code inside of a string within a php script..

2001-03-05 Thread Tim Ward
Writing the string to a file and then include()ing it would work. It does seem a bit heavy handed, but unless there's a string equivelant of include() this may actually be the best way. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this

Re: [PHP] NETSCAPE screws up query string : more problems!

2001-03-05 Thread Christian Reiniger
On Sunday 04 March 2001 20:38, you wrote: Julian, i tried : a href=\"pro_page1.php3?title=".urlencode($myrow[title])."\" instead a href=\"pro_page1.php3?title='".urlencode($myrow[title])."'\" notice the single quote ' missing. And that WORKED!!! It displayed the right value in the

[PHP] Get remote IP ot Host

2001-03-05 Thread Rosen
Hi, I have problem with "REMOTE_ADDR" or "REMOTE_DOST". "REMOTE_ADDR" always return me 127.0.0.1 (localhost) !!! The php program is on remote server ( not locally ) - www.f2s.com. How can I get IP or HOST of the visitor ? Thanks, Rosen Marinov -- PHP General Mailing List

php-general Digest 5 Mar 2001 09:43:25 -0000 Issue 548

2001-03-05 Thread php-general-digest-help
php-general Digest 5 Mar 2001 09:43:25 - Issue 548 Topics (messages 42526 through 42592): question about php sessions 42526 by: Ed Lazor User login using session algorithm 42527 by: Arcady Genkin NEWEST CRAZE 42528 by: newmarketing5644.juno.com anchor "#" not

[PHP] RE: function questions

2001-03-05 Thread Tim Ward
why are you using this construct instead of echo()? e.g. echo("Hey there " . foo::bar($baz) . " how are you doing?"); Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html

[PHP] Is it possible to get call stack information?

2001-03-05 Thread Neil Kimber
Is there anyway within PHP to get a complete dump of the call-stack? I can't use the Zend debugger for technical reasons (awaiting bug fix before it will work in our environment). I'd love to have a call that would return an array of call stack info. to the current line. Thanks, Neil

Re: [PHP] Get remote IP ot Host

2001-03-05 Thread Michael Meinl
I have problem with "REMOTE_ADDR" or "REMOTE_DOST". "REMOTE_ADDR" always return me 127.0.0.1 (localhost) !!! The php program is on remote server ( not locally ) - www.f2s.com. How can I get IP or HOST of the visitor ? The problem might be, there is a proxy / redirection on the same

Re: [PHP] help gurus: multi-dimensional array problem.

2001-03-05 Thread Robert Vetter
andrew wrote: Because I want to display it like this: category1 (href anchor to category1 below) category2 category3 category1 link1 link2 link3 category2 link1 etc... Hello, Ever heard of mysql_data_seek()? Have a look in the PHP Docs. Robert --

[PHP] PHP Apache 2.0

2001-03-05 Thread Benoit
Do someone know when PHP will work as apixs under Apache 2.0 ? -- 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]

Re: [PHP] dealing with no record

2001-03-05 Thread Robert Vetter
"Jacky@lilst" wrote: People If I run a sniplet like this: ** $query="select name from foo"; $result= mysql_query($query); while($row = mysql_fetch_row($result)) stuff...to display record found ... *** what am I suppose to do if

[PHP] RE: Function to compare an array with another array

2001-03-05 Thread Tim Ward
function ArrayCompare($array1, $array2) { $answer = new Array() foreach ($array1 as $element) { if (($key = array_search($element, $array2)) === false) { $answer[$key] = $array2[$key]; } } return $answer; } this

[PHP] subscribe my mail-id for PHP mailing lists

2001-03-05 Thread B Satish , Gurgaon
dear sir can you please subscribe my mail-id for PHP mailing group lists Thanks in advance satish -- 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:

Re: [PHP] how to redirect to other page?

2001-03-05 Thread Batonik
On Mon, 5 Mar 2001, JW wrote: i have used header to redirect to other page. [cut] if ($result == false) { header ("HTTP/1.0 404 Not Found"); exit; } else { header ("../Form/first.html"); ^ According to

[PHP] apache does not understand php3

2001-03-05 Thread Marcos
hi, i have installed php4. from my browser i can read php .. but not php3. what should i do? regards, marcos [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the

[PHP] Is PHP ready for XML?

2001-03-05 Thread Erick Papadakis
I am beginning on how to work with xml, but i need some prelim help. let us say i have an XML file as follows: --- Book AuthorJonathan Swift/Author NameGulliver's Travels/Name /Book Book AuthorAgatha Christie/Author NameMurder on 57/Name

[PHP] Inserting DATE in mySQL!!

2001-03-05 Thread Thomas Edison Jr.
I'm using the following code to insert date into my mySQL table named "Booking". I've created variables that store the date with dashes "-" seperating them. But it's not working. It's giving me an error on the $SQl line. following is the code : ?php $db =

Re: [PHP] Inserting DATE in mySQL!!

2001-03-05 Thread Miles Thompson
What field type are you using to store time? Echo your $sql and compare it to MySQL's documentation on the time column and how you have defined the field. Miles At 03:51 AM 3/5/01 -0800, Thomas Edison Jr. wrote: I'm using the following code to insert date into my mySQL table named "Booking".

[PHP] help functions

2001-03-05 Thread Montgomery-Recht, Evan
Has anyone spent any time and thought into including help within the library, ie. so you could do a. mysql.connect().help() or something like that so as a developer addeds a new function we as end users might be able to understand the function. Most likely by creating a help file to return to

RE: [PHP] apache does not understand php3

2001-03-05 Thread Martín Cabrera Diaubalick
Hello Marcos, In your httpd.conf file there's a line that looks similar to: AddType application/x-httpd-php4 .php4 .phtml Just add the php3 extension. It should be something like this: AddType application/x-httpd-php4 .php4 .phtml .php3 HTH Regards -- PHP General Mailing List

RE: [PHP] help gurus: multi-dimensional array problem.

2001-03-05 Thread Tim Ward
Get a list of unique categories then get a list of each one would do it. $link_id = mysql_connect($host, $usr, $pass) or die (mysql_error()); mysql_select_db($database, $link_id); $sql="select distinct category from links"; $result = mysql_query($sql, $link_id) or

Re: [PHP] Inserting DATE in mySQL!!

2001-03-05 Thread CC Zona
In article [EMAIL PROTECTED], [EMAIL PROTECTED] ("Thomas Edison Jr.") wrote: I'm using the following code to insert date into my mySQL table named "Booking". I've created variables that store the date with dashes "-" seperating them. But it's not working. It's giving me an error on the

Re: [PHP] Inserting DATE in mySQL!!

2001-03-05 Thread Hardy Merrill
CC Zona [[EMAIL PROTECTED]] wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] ("Thomas Edison Jr.") wrote: I'm using the following code to insert date into my mySQL table named "Booking". I've created variables that store the date with dashes "-" seperating them. But it's not

Re: [PHP] help functions

2001-03-05 Thread CC Zona
In article [EMAIL PROTECTED], [EMAIL PROTECTED] ("Montgomery-Recht, Evan") wrote: Has anyone spent any time and thought into including help within the library, ie. so you could do a. mysql.connect().help() or something like that so as a developer addeds a new function we as end users

RE: [PHP] HREFs that can't be

2001-03-05 Thread Boget, Chris
How is 3 different from 1? 1: http://www.somedomain.com/program.php?parm1=value1 3: http://www.somedomain.com/program.php/value1 $PATF_INFO now contains '/value1' Ahh. This is pretty much acceptable to search engines. Even better add: Location /program ForceType application/x-httpd-php

Re: [PHP] help gurus: multi-dimensional array problem.

2001-03-05 Thread Robert Vetter
Tim Ward wrote: Get a list of unique categories then get a list of each one would do it. $link_id = mysql_connect($host, $usr, $pass) or die (mysql_error()); mysql_select_db($database, $link_id); $sql="select distinct category from links"; $result =

Re: [PHP] undefined symbol: xmlXPtrNewContext

2001-03-05 Thread Sebastien Roy
I'm having the exact same problem, did someone find a way to correct that problem Evething looks good when compiling, the error occured when I try to start Apache. I am using sablotron 0.51 with libxmlparse and libxmltok that came from the Sablotron RPM version 0.44 (because I could not find

Re: [PHP] Problem getting PostgreSQL to compile

2001-03-05 Thread The Hermit Hacker
On Mon, 5 Mar 2001, K Old wrote: Yes, I've checked phpinfo() and not it is not compiled in. That is the problem. I have recompiled PHP with pgsql support and there is some problem. I'm not sure why it isn't compiling it in. I've tried everything I knowthe installation goes fine...no

Re: [PHP] Help Please: Php configuration

2001-03-05 Thread archana sharma
Thanks a lot!!! Yes it is working now with both cgi as well as php4isapi.dll. I removed php4isapi.dll from filter, which was crashing my web server. From: "Phil Driscoll" [EMAIL PROTECTED] To: "archana sharma" [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: [PHP] Help Please: Php

Re: [PHP] max array size question..

2001-03-05 Thread Paul K Egell-Johnsen
Jeff wrote: I'm trying to read in a text file that has 42620 lines. Each line has zip code information separated by commas. I have no problem reading the file into an array. But when I try and read each element in the array and put it into another array I get a "500 server error". The

[PHP] delete an element from an array

2001-03-05 Thread kaab kaoutar
Hi! how can i decrement the length of an array! In fact i'm trying to delete an element from an array , i'v put the content of i in i-1 (loop) and i tried to decrement the array legnththis way: count($x)=count($x)-1; but it generates an error! Thanks

[PHP-CVS] cvs: php4 /sapi/cgi cgi_main.c

2001-03-05 Thread Jani Taskinen
sniper Mon Mar 5 07:08:36 2001 EDT Modified files: /php4/sapi/cgi cgi_main.c Log: Fix help text for -f Index: php4/sapi/cgi/cgi_main.c diff -u php4/sapi/cgi/cgi_main.c:1.97 php4/sapi/cgi/cgi_main.c:1.98 --- php4/sapi/cgi/cgi_main.c:1.97 Sun Mar 4

Re: [PHP] delete an element from an array

2001-03-05 Thread kaab kaoutar
Hi! FIRST OF ALL THANKS ! well do u mean that the only way to remove an elemnt from an array is to copy it into another array? it does not suit me cause the array is a session variable and i need to update it ! Thanks _

Re: [PHP] delete an element from an array

2001-03-05 Thread kaab kaoutar
Thanks! but i know this function! i can't do that cause my varibale is multidimenssional, and i don't want to update all that ! for one element ! we can't decrement the length of the array ?! no way ? From: Hardy Merrill [EMAIL PROTECTED] To: kaab kaoutar [EMAIL PROTECTED] CC: [EMAIL

[PHP] MySQL - Problem with multiple INSERTs?

2001-03-05 Thread Chris
Howdy, I'm getting weird problems trying to INSERT to two different tables, in consecutive mysql_queries. Before, I had 3 queries going, and only 2 would work at any time. It seemed like it was 'rotating' the bad query - first the 1st query would fail (the other two were fine), then I'd empty

Re: [PHP] stumped on mailing a complete page

2001-03-05 Thread Chris Adams
On 3 Mar 2001 17:17:15 -0800, Brett [EMAIL PROTECTED] wrote: I want to send a confirmation email upon receiving an order, and would like to send the page that I display on the browser to the user. ob_start(); // do something mail('confirm@somewhere', 'confirmation', ob_get_contents());

Re: [PHP] input textfield value cat!

2001-03-05 Thread kaab kaoutar
I'm using a variable! input type="text" name="MyTextInput" value=?=$val ? From: "Brad S. Jackson" [EMAIL PROTECTED] To: "kaab kaoutar" [EMAIL PROTECTED] Subject: Re: [PHP] input textfield value cat! Date: Mon, 5 Mar 2001 10:08:21 -0600 Make sure you have quotes around the value. input

Re: [PHP] NETSCAPE Screws QUERY STRING!!!!!!

2001-03-05 Thread Chris Adams
On 4 Mar 2001 04:17:18 -0800, Thomas Edison Jr. [EMAIL PROTECTED] wrote: The Internet Explorer converts the spaces in a query string into it's hexadecimal value of "%20" automatically, but netscape is not doing so. It's not reading the space and thus not displaying the page at all and giving the

Re: [PHP] delete an element from an array

2001-03-05 Thread Hardy Merrill
kaab kaoutar [[EMAIL PROTECTED]] wrote: Thanks! but i know this function! i can't do that cause my varibale is multidimenssional, and i don't want to update all that ! for one element ! we can't decrement the length of the array ?! no way ? Here's an example of a multidimensional array - I

[PHP-CVS] cvs: php4 /ext/pdf pdf.c

2001-03-05 Thread Rainer Schaaf
rjs Mon Mar 5 08:18:50 2001 EDT Modified files: /php4/ext/pdf pdf.c Log: fixed bug in PDF_getbuffer (happend only on Windows) When using PDFlib V4.0 the pdf_set(grey/rgbcolor) functions are replaced by the PDFlib V4.0 function pdf_setcolor

[PHP] passing variable via url

2001-03-05 Thread Kansas Territory
using PHP 3.x on Linux, I've always been able to pass along a variable like http://www.domain.com/index.php3?foo=bar and then I could print out this with something like echo $foo; would print out "bar" I've recently installed the latest PHP4 onto a Windows2000 server, I'm trying the same thing

Re: [PHP] input textfield value cat!

2001-03-05 Thread Christian Reiniger
On Monday 05 March 2001 17:29, you wrote: I'm using a variable! input type="text" name="MyTextInput" value=?=$val ? Well, you *still* need to have quotes around it: input type="text" name="MyTextInput" value="?=$val ?" Make sure you have quotes around the value. input type="text"

Re: [PHP] passing variable via url

2001-03-05 Thread Christian Reiniger
On Monday 05 March 2001 17:43, you wrote: using PHP 3.x on Linux, I've always been able to pass along a variable like http://www.domain.com/index.php3?foo=bar and then I could print out this with something like echo $foo; would print out "bar" I've recently installed the latest PHP4 onto

Re: [PHP] input textfield value cat!

2001-03-05 Thread Batonik
On Mon, 5 Mar 2001, kaab kaoutar wrote: I'm using a variable! input type="text" name="MyTextInput" value=?=$val ? Quote the value: input type="text" name="MyTextInput" value=\"?=$val ?\" Greets, Batonik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail:

[PHP] imap problems.

2001-03-05 Thread Chris Lee
ok, here we go. imap functions seem tobe funny. I could not get php to compile with the latest imap, I was getting errors about xml, go figure. and could not not like lib/yes go figure. I downloaded php 4.0.5dev all compiled well, but I get strange things happening, like imap

[PHP] Re: [PHP-WIN] Re: IE 5.5,authentication,PHP sessions: IE never stops

2001-03-05 Thread John Henckel
At 09:51 PM 3/4/01 -0500, Ken wrote: Anyway, can someone please test to see if this doesn't happen in IE5.0? I really hate this situation, yessir. I have installed IE 5.00.2614.3500 (that's what came with Win 98 2nd edition CDROM vers 4.10.A) and it does NOT have the problem you have

[PHP] Re: IE 5.5,authentication,PHP sessions: IE never stops

2001-03-05 Thread Ken
At 10:56 AM 3/5/01 -0600, John Henckel wrote: 1. open mytest.php and when the password prompt appears, I enter a userid/password. 2. I see the "Hello" page with my userid and password. 3. close IE and reopen mytest.php, again the prompt appears -- this is good. 4. close IE and Restart Windows.

[PHP] Verify session in function

2001-03-05 Thread Tobias Talltorp
I am building my first basic function to verify a session. If the verification is not in the function it works... What am I missing? (I couldn´t find anything about this in the mailing list archive) -- This works -- session_start(); if (isset($PHPSESSID)){ echo "ok";

[PHP] Start you php script over??

2001-03-05 Thread Brandon Orther
Hello, Is there a way for me to tell my php script to start over? I want to have an if then statement to check if something is done. Then if it isn't I want the php script to start over. Thank you, Brandon Orther WebIntellects Design/Development

[PHP] Supress error message to apache log?

2001-03-05 Thread Michael A. Peters
I have the following php function- function doclink ($documentdir, $rpmname, $doc_file) { $string="rpm -qd $rpmname |head -1 |sed s?\"$documentdir\"?\"\"? |cut -d\"/\" -f2"; $rpm_installed=exec($string); $DOC_ABSOLUTE="$documentdir/$rpm_installed"; if

Re: [PHP] delete an element from an array

2001-03-05 Thread Christian Cresante
Since its the last element, just pop it out: array_pop() --- kaab kaoutar [EMAIL PROTECTED] wrote: Hi! how can i decrement the length of an array! In fact i'm trying to delete an element from an array , i'v put the content of i in i-1 (loop) and i tried to decrement the array legnththis

RE: [PHP] Start you php script over??

2001-03-05 Thread Boget, Chris
Is there a way for me to tell my php script to start over? I want to have an if then statement to check if something is done. Then if it isn't I want the php script to start over. header( "location: $PHP_SELF" ); OR header( "location: $REQUEST_URI" ); if you are using a query string/GET

Re: [PHP] Verify session in function

2001-03-05 Thread kaab kaoutar
U just have to add global $PHPSESSID to make the session variable global; From: "Tobias Talltorp" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP] Verify session in function Date: Mon, 5 Mar 2001 18:30:00 +0100 I am building my first basic function to verify a session. If the

Re: [PHP] Start you php script over??

2001-03-05 Thread Chris Lee
header() ?php if ($done) ... else { header("Location: http://$SERVER_NAME/$PHP_SELF"); exit(); } ? i your using sessions without coookies. header("Location: http://$SERVER_NAME/$PHP_SELF?PHPSESSID=$PHPSESSID"); --

Re: [PHP] Supress error message to apache log?

2001-03-05 Thread Michael A. Peters
I feel dumb... $string="rpm -qd $rpmname 2/dev/null |head -1 |sed s?\"$documentdir\"?\"\"? |cut -d\"/\" -f2"; On Monday, March 5, 2001, at 09:33 AM, Michael A. Peters wrote: I have the following php function- function doclink ($documentdir, $rpmname, $doc_file) { $string="rpm

[PHP] getting info.. help!

2001-03-05 Thread Brandon Orther
Hello, Is there a way to remove all the spaces in the beginning of a string? Example: " 45 fasfda asdfasf" would be "45 fasfda asdfasf" and " 45 fasfda asdfasf" would be "45 fasfda asdfasf" No matter how many spaces in the begging in I just want it to delete the first spaces. I hope you

Re: [PHP] getting info.. help!

2001-03-05 Thread Chris Lee
trim() -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 [EMAIL PROTECTED] ""Brandon Orther"" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, Is there a way to remove all the spaces in

Re: [PHP] getting info.. help!

2001-03-05 Thread Henrik Hansen
Hello, Is there a way to remove all the spaces in the beginning of a string? Example: " 45 fasfda asdfasf" would be "45 fasfda asdfasf" and " 45 fasfda asdfasf" would be "45 fasfda asdfasf" look at http://www.php.net/manual/en/function.ltrim.php or maybe

RE: [PHP] getting info.. help!

2001-03-05 Thread Larry Jeannette
ltrim removes spaces on the left rtrim removes spaces on the right trim removes spaces on both the left and right Larry Jeannette MIS Director, e.Republic -Original Message- From: Brandon Orther [mailto:[EMAIL PROTECTED]] Sent: Monday, March 05, 2001 11:08 AM To: PHP User Group

[PHP] Pam Auth 0.2 released

2001-03-05 Thread Chad Cunningham
Hi, I've released Pam Auth 0.2 after many months :) Pam Auth is a php4 extension that allows simple pam authentication. Possible uses for this include using php to authenticate against local password files (dangerous!), samba/nt domains, ldap, mysql databases, and anything else which pam

[PHP] Regular Expression Help

2001-03-05 Thread Jeff Oien
I want to delete everything after a tab (or space) on each line of a text file and can't figure it out. An example line is ARIA5.19-0.0625 -1.19 5.254.5 48.5100300 I want to the output to be ARIA Thanks. Jeff Oien -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Regular Expression Help

2001-03-05 Thread Henrik Hansen
I want to delete everything after a tab (or space) on each line of a text file and can't figure it out. An example line is ARIA 5.19 -0.0625 -1.19 5.25 4.5 48.5 100300 you can explode on a tab $arrlines = explode("\t", $the_line); then save $arrlines[0] from every line. Don't know if

[PHP] Re: [PHP-WIN] Re: IE 5.5,authentication,PHP sessions: IE never stops

2001-03-05 Thread Chris Poirier
Hi Ken, At 10:56 AM 3/5/01 -0600, John Henckel wrote: 1. open mytest.php and when the password prompt appears, I enter a userid/password. 2. I see the "Hello" page with my userid and password. 3. close IE and reopen mytest.php, again the prompt appears -- this is good. 4. close IE and

[PHP] RPMs for PHP accessing PostgreSQL via ODBC over RedHat

2001-03-05 Thread Paulo Parola
Hi, We are currently running the following configuration on our server: Linux Red Hat 7.0 PostgreSQL 7.1beta4-1 PHP 4.0.1pl2 I need to add some RPM package (or perhaps an apache module) to enable PHP to access PostgreSQL via ODBC. In order to have PostgreSQL native access support we installed

[PHP] get current events from mysql query by date?

2001-03-05 Thread Matthew Delmarter
I have a mysql database of events. It contains the following fields: - EventID - EventName - EventDescription - EventStartDate - EventEndDate I would like to query the database for the next 5 events from the current date (today). Any ideas? Regards, Matthew Delmarter Web Developer -- PHP

[PHP] Document Contains No Data in Netscape?

2001-03-05 Thread Robert Cooper
I have a set of pages I've been working on to do address entry for registered users to a MySQL database. I'm running up against a wall that I've been fighting for two days... process is thus: checks session vars to see if user is logged in. if not, present login screen. if logged in: see if

Re: [PHP] get current events from mysql query by date?

2001-03-05 Thread Henrik Hansen
I have a mysql database of events. It contains the following fields: - EventID - EventName - EventDescription - EventStartDate - EventEndDate I would like to query the database for the next 5 events from the current date (today). Any ideas? works if EventStartDate is a timestamp (i

Re: [PHP] Hide Include-Files from the Web

2001-03-05 Thread Richard Kitamura - Media Net Link, Inc.
How bout an Apache redirect for .inc files to go to denied.htm or something? PHP scripts could get to them, but they wouldn't be accessible via http. At 08:01 PM 3/3/01 +0100, [EMAIL PROTECTED] wrote: Hi! as I wrote in my mail: 1. I won't name them ".inc" but ".inc.php" (so *I* know, it's

RE: [PHP] get current events from mysql query by date?

2001-03-05 Thread Jeff Oien
This is just a guess but wanted to take a shot at it. Something like SELECT EventID, EventName, EventDescription, EventStartDate, EventEndDate WHERE EventStartDate CURRENT_DATE ORDER BY EventStartDate ASC LIMIT 5; How did I do? Jeff Oien I have a mysql database of events. It contains the

[PHP] Is it odd or even???

2001-03-05 Thread Brandon Orther
Hello, Is there an easy way to check and see if a number is odd or even? Thank you, Brandon Orther WebIntellects Design/Development Manager [EMAIL PROTECTED] 800-994-6364 www.webintellects.com -- PHP

RE: [PHP] Is it odd or even???

2001-03-05 Thread Boget, Chris
Is there an easy way to check and see if a number is odd or even? if( $num % 2 ) { echo "Odd"; } else { echo "Even"; } Chris

Re: [PHP] Is it odd or even???

2001-03-05 Thread Jon Rosenberg
You could divide it by 2, odd numbers will always have a remainder even umbers never will. here are math functions, but none for odd/even that i see. Jon - Original Message - From: "Brandon Orther" [EMAIL PROTECTED] To: "PHP User Group" [EMAIL PROTECTED] Sent: Monday, March 05, 2001

RE: [PHP] Is it odd or even???

2001-03-05 Thread Larry Jeannette
use the modulus operator: ($number % 2) returns 0 if the value is even Larry Jeannette MIS Director, e.Republic -Original Message- From: Brandon Orther [mailto:[EMAIL PROTECTED]] Sent: Monday, March 05, 2001 12:18 PM To: PHP User Group Subject: [PHP] Is it odd or even??? Hello, Is

RE: [PHP] Is it odd or even???

2001-03-05 Thread Boget, Chris
That won't work. % returns the remainder from a division of the number divided by the mod number. Yours: if($num %2 == 0){ echo "even"; }else{ echo "odd"; } Mine: if( $num % 2 ) { echo "Odd"; } else { echo "Even"; } Ours are identical, just the other way around.

RE: [PHP] Is it odd or even???

2001-03-05 Thread Brian V Bonini
Use the modulus operator -Original Message- From: Brandon Orther [mailto:[EMAIL PROTECTED]] Sent: Monday, March 05, 2001 3:18 PM To: PHP User Group Subject: [PHP] Is it odd or even??? Hello, Is there an easy way to check and see if a number is odd or even? Thank you,

RE: [PHP] Is it odd or even???

2001-03-05 Thread John Guynn
Color me confused because I though true was any non zero value and false was zero. I know I am using the following code: if (!($num % 4){ do something} and it does something when $num is evenly divisible by 4 (ie. $num % 4 = 0). If I were testing for odd vs even I'd do the following: if

RE: [PHP] Is it odd or even??? Optimize!!!

2001-03-05 Thread Nathan Cassano
You all are a bunch of un-optimizing novices. Just do some bit banging. i.e. if(1 number){ echo "$number is odd"; }else{ echo "$number is even"; } -Original Message- From: Brandon Orther [mailto:[EMAIL PROTECTED]] Sent: Monday, March 05, 2001 12:18 PM To: PHP User

Re: [PHP] Hide Include-Files from the Web

2001-03-05 Thread mailing_list
Hi! As I wrote before, I don't have .htaccess nor access to the apache-conf!!! michi How bout an Apache redirect for .inc files to go to denied.htm or something? PHP scripts could get to them, but they wouldn't be accessible via http. At 08:01 PM 3/3/01 +0100, [EMAIL PROTECTED]

RE: [PHP] Is it odd or even???

2001-03-05 Thread Boget, Chris
Color me confused because I though true was any non zero value and false was zero. Right. And if( $num % 2 ) { echo "it's odd"; } means that the operation returned a remainder - a non zero value. I know I am using the following code: if (!($num % 4){ do something} and it does

[PHP] carriage return in multipart/form-data form post

2001-03-05 Thread Jeff Schwartz
We've just moved to a new server and I'm running into an odd problem. The code is below. On my old server it correctly returns: [test] t 116 e 101 s 115 t 116 But on my new server I get: [ test] 13 10 t 116 e 101 s 115 t 116 Has anyone else run into this? ?php echo "[$action] BR ";

Re: [PHP] carriage return in multipart/form-data form post

2001-03-05 Thread Chris Lee
form method=post action='$PHP_SELF' input type=submit /form even the simplest forms product a 0x013 0x10 imediatly after the form I wish there was a way to control this behaviour. I thought it was normal, and anoying. -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph.

Re: [PHP] Document Contains No Data in Netscape?

2001-03-05 Thread Chris Lee
this is caused by netscape receiving no data. ie. ?php exit(); ? will product no data, because nothing is echo'd. netscape hates this, and will display a warning. the other reason could be there is something wrong with a funky function your using. ie. if pdflib isnt compiled

Re: [PHP] Is it odd or even??? Optimize!!!

2001-03-05 Thread Julian Wood
Clever. For those of us unfamiliar with bitwise ops, here's how this works: The bitwise and op () works on bits like this: dig1 dig2 Result 000 010 100 111 An even number's binary representation always ends with 0 (ie 12 = 1100) while an odd ends with 1 (ie 13

RE: [PHP] get current events from mysql query by date?

2001-03-05 Thread php3
Addressed to: [EMAIL PROTECTED] [EMAIL PROTECTED] ** Reply to note from [EMAIL PROTECTED] Mon, 5 Mar 2001 14:10:28 -0600 This is just a guess but wanted to take a shot at it. Something like SELECT EventID, EventName, EventDescription, EventStartDate, EventEndDate WHERE

php-general Digest 5 Mar 2001 21:48:18 -0000 Issue 549

2001-03-05 Thread php-general-digest-help
php-general Digest 5 Mar 2001 21:48:18 - Issue 549 Topics (messages 42593 through 42676): Re: function questions 42593 by: Tim Ward Is it possible to get call stack information? 42594 by: Neil Kimber Re: Get remote IP ot Host 42595 by: Michael Meinl Re: help

[PHP] Get text between a href= /a

2001-03-05 Thread Keith Mayo
I need some help with a program, I need to get every instance of text between a href =”” GET TEXT HERE /a and save the results in a variable. Does anyone have some example code of how to do it along with how to put the results into just one variable?

[PHP] speeding a site with lots of includes

2001-03-05 Thread Eduardo Dominguez
An app I am currently developing has grown a lot. It currently handles aproximately 12 includes, more or less 13 thousand lines of code. By doing some benchmarks, i realized that the bottleneck is the include() payload. How can I optimize a program like this one ? thanks in advance -- PHP

Re: [PHP] Get text between a href= /a

2001-03-05 Thread Henrik Hansen
I need some help with a program, I need to get every instance of text between a href ="" GET TEXT HERE /a and save the results in a variable. Does anyone have some example code of how to do it along with how to put the results into just one variable? Try with: $string = "a href =\"\"GET

[PHP] Re: IE 5.5,authentication,PHP sessions: IE never stops

2001-03-05 Thread Ken
At 02:39 PM 3/5/01 -0500, Chris Poirier wrote: There is a suggestion in the PHP online documentation that has worked for me (except in Opera 5, which seems to ignore the Realm). Add a timestamp to the Realm that changes with each new session. IE 5.0 will prompt for a different password, because

RE: [PHP] mail problem

2001-03-05 Thread Peter Houchin
Now if i include $headers .= "Cc: [EMAIL PROTECTED] " . " , "; $headers .= "[EMAIL PROTECTED]\n"; My page won't load at all apart from the first include i have on my page.. does any one have any idea's? Hiya, am near

[PHP] PHP and MySQL ....dynamic query?

2001-03-05 Thread Blueriver Networking Services
Hello everyone. :) I am attempting to construct a query with PHP and MySQL based on user input from a referring form page. Here is an example of what I need this to do: This will involve multiple variables, but I will just use 2 here: if ($dig== "1") { $qual1 = "WHERE (track = 0)"; } if

[PHP] function -- global variables

2001-03-05 Thread Augusto Cesar Castoldi
I have a html form and his "action" is a php file. this is the php file: function checasenha($ID) { $as="\""; global $ID, $limite, $cdusuario, $usuario, $senha; . . . } checasenha($ID);

[PHP] Sites Using PHP - For a presentation

2001-03-05 Thread Brad Landis
Hi all, I am looking for some big name sites using PHP. I will be doing a presentation next month and would like to show a list of sites that are using PHP. Thanks for your Help ___ Send a cool gift with your E-Card

[PHP] To the PHP developpers / DOMXML (Update and delete??)

2001-03-05 Thread Dominique Paquin
Greetings PHP Developpers. I am presently making a web based application that will be able to add nodes as well as update and remove them from XML documents. I saw in my researches, up to now, That XMLDOM does not support update and delete of nodes. I just wanted to know if someone is presently

Re: [PHP] function -- global variables

2001-03-05 Thread Hardy Merrill
Augusto Cesar Castoldi [[EMAIL PROTECTED]] wrote: I have a html form and his "action" is a php file. this is the php file: function checasenha($ID) { ^^^ $as="\""; global $ID, $limite, $cdusuario, $usuario, $senha;

[PHP] php, mysql and htaccess

2001-03-05 Thread george
I am trying to protect a folder with an htaccess file which pulls the username and passwords out of a db but I cant get it to work Can someone have a look at the code below from the htaccess file. TIA george AuthName "Admins Only" AuthType Basic require valid-user Auth_MySQL_Host

Re: [PHP] comparing values

2001-03-05 Thread David Robley
On Mon, 5 Mar 2001 18:27, Paul wrote: below is the code I am using, $sourcefile is a url var for example http://url/?sourcefile=/this/path/to/whatever.php $filelist = array("", "db_auth.conf", "config.php", "master.functions.inc" );

[PHP] mail ....any idea's?

2001-03-05 Thread Peter Houchin
Hiya, am near completeion of a site only i can't get any mail to send to multiple recipients at all .. either in the "To:" section or having on email in "To" and one email address in "CC" section.. and i need to be able to do this ... can any one offer any suggestions ...( I'd prefer to have one

RE: [PHP] mail ....any idea's?

2001-03-05 Thread Peter Houchin
That wasn't it : if i use any other headers .. ie $mailheaders .= "X-Priority: 1\n"; they work .. its just with the CC that wont work : -Original Message- From: Jason Murray [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 06, 2001 10:45 AM To: 'Peter Houchin' Subject: RE: [PHP] mail

[PHP] Translation using FastTemplates

2001-03-05 Thread ADnoctum
Hi. I'm using FastTemplates for a little project of mine and I want to include several translations for that. Have any of you made translations with templates? I don't know were to start. HELP! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

  1   2   >