[PHP] Problem regarding select boxes

2001-09-10 Thread Balaji Ankem
Hi! friend, I had one html form . In that i had 5 inputs. First option is a select box. If the selected item is Mobile then only i want to display second and third input boxes. Otherwise i want to hide those two options. How can i endure that? Please give the solution to this proble

Re: [PHP] PHP Redirect in the middle of code?

2001-09-10 Thread nayco
be careful, i guess some Web-browsers will not accept it ( all the syntax-checkers like Opera ) (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr - Original Message - From: Ken <[EMAIL PROTECTED]> To: Steve Edberg <[EMAIL PROTECTED]> Cc

Re: [PHP] Call to undefined function problem

2001-09-10 Thread Doug Farmer
Thanks. I ran some further tests and came to the same conclusion. My test showed that the constant was defined even though in theory it should be a new request. Since this is a production system, I don't want to go with a release candidate. I'm going to do a switchover to "include_once". "

[PHP] Getting a script to download files from an ftp server?

2001-09-10 Thread Smileyq
I'm attempting to write a script to download files from a ftp server. Basically what will need to be done is this. The website will have a searchable database and once the selected items are found will have a download link. From this I would like to click on the download link and sent that to

Re: [PHP] NT?

2001-09-10 Thread George Pitcher
I've got PHP running under 3 environments (sort of). LinuxPPC(Mac) with Apache and MySQL NT with IIS4 and Lasso/Filemaker (not quite working yet) NT with Apache and MySQL. Installation was very easy. George P in Edinburgh - Original Message - From: "nayco" <[EMAIL PROTECTED]> To: <[EMAI

RE: [PHP] Code Red Catcher

2001-09-10 Thread Mattias Segerdahl
Hey, Don't bitch about my grammar, I was in a hurry when writing this script... Bad2da / efnet #php -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: den 10 september 2001 17:50 To: [EMAIL PROTECTED] Subject: [PHP] Code Red Catcher Hi again, Everyone: I didn

[PHP] Re: global $HTTP_SESSION_VARS not global ???

2001-09-10 Thread Herouth Maoz
On 2001 September? 10 ,Monday 18:56, Thomas Watson wrote: > > session_start(); > session_register("test"); > $test = "something"; > > function foo() { > print($HTTP_SESSION_VARS["test"] . "\n"); > } > > foo(); > print($HTTP_SESSION_VARS["test"] . "\n"); > > ?> > > Click here >

[PHP] Rasmus HELP ! Fwd: [PHP] mail() ERROR - WHY, WHY, WHY

2001-09-10 Thread Badger
This is a forwarded message From: Badger <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Date: Monday, September 10, 2001, 11:34:45 AM Subject: [PHP] Ramesus HELP ! Fwd: [PHP] mail() ERROR - WHY, WHY, WHY ===8<==Original message text=== This is a forwarded message From: Badger <

Re: [PHP] Call to undefined function problem

2001-09-10 Thread Rasmus Lerdorf
Try the current 4.0.7 release candidates. There were some define() related issues in prior versions. Also, in PHP 4 you don't need those defines to protect from multiple inclusion. You can simply use include_once -Rasmus On Mon, 10 Sep 2001, Doug Farmer wrote: > > I'm doing the following: >

[PHP] More thoughts about PHP: Taglibs

2001-09-10 Thread Dr. Evil
It seems to me that one of the problems with PHP is that you have to include code in your HTML pages. Even with the cleanest design, you end up with HTML that looks like this: Hello, . Your last login was . This is ok, but it seems to me that java taglibs provide a more elegant way to do th

Re: [PHP] HTTP POST..

2001-09-10 Thread ReDucTor
i've figured out post works - Original Message - From: "Tom Carter" <[EMAIL PROTECTED]> To: "ReDucTor" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, September 11, 2001 4:01 AM Subject: Re: [PHP] HTTP POST.. > PHP is probably compiled as a module.. if you want to be able to

[PHP] Re: Call to undefined function problem

2001-09-10 Thread Doug Farmer
Further information: The page is navigated to via a previous page using a "Location: /test.php" header. The problem occurs when I first navigate to the page. If I then do a refresh from the browser, the problem disappears. I also did further testing where I put the following type of code betw

Re: [PHP] php help probably basic (used stripslashes but probably not the right way to do it)

2001-09-10 Thread David Robley
On Tue, 11 Sep 2001 14:20, Lance Rochelle wrote: > I am having the following problem. > I have a database that is setup as follows > > CREATE TABLE test ( > id tinyint(4) NOT NULL auto_increment, > text text NOT NULL , > PRIMARY KEY (id) > ) TYPE=MyISAM; > > I have a page after a form that

[PHP] php help probably basic (used stripslashes but probably not the right way to do it)

2001-09-10 Thread Lance Rochelle
I am having the following problem. I have a database that is setup as follows CREATE TABLE test ( id tinyint(4) NOT NULL auto_increment, text text NOT NULL , PRIMARY KEY (id) ) TYPE=MyISAM; I have a page after a form that confirms all data to be entered the html is as follows text=\"test

Re: [PHP] locking a mysQL row

2001-09-10 Thread tjacobs-php
On Tue, 11 Sep 2001, Justin French wrote: > I'm currrently developing a dynamic, user-added content site. The > thing is, content can be added and edited my TWO people.. the > original writer, and the editor. Just put a timestamp field into the table, which will automatically track the last upd

[PHP] Call to undefined function problem

2001-09-10 Thread Doug Farmer
I'm doing the following: test.php - -- functions.php - "; function setNoCacheHeaders( ) { static $headersNotSet = TRUE; if ( $headersNotSet ) { header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");// Date in the past header("Last-Modified: " . gmdate("

[PHP] locking a mysQL row

2001-09-10 Thread Justin French
Hi all, I'm currrently developing a dynamic, user-added content site. The thing is, content can be added and edited my TWO people.. the original writer, and the editor. So, my problem is, if the editor/user makes an edit to content whilst the other is also attempting to do so, one of them will

Re: [PHP] login access

2001-09-10 Thread Justin French
It depends on what you want to achieve, and you ISP. If you can achieve everything you want with htaccess, then it is pretty simple, and a good option -- no db's, no PHP. BUT it may be complex to add new users at your ISP. On my site (perhaps not the most secure site in the world!!!), I use a s

Re: [PHP] cURL support

2001-09-10 Thread Thomas Deliduka
On 9/10/2001 10:08 PM this was written: > Some people have reported problems with cURL and PHP v4.0.6 > (regarding SSL, although I haven't seen them, and some people don't have > problems). > Upgrade to a recent snapshot (or latest CVS) of cURL and everything > should be fine... I had cU

Re: [PHP] cURL support

2001-09-10 Thread Sterling Hughes
On Tue, 11 Sep 2001, Daniel Baldoni wrote: > G'day Jason > > >> On the hosting provider, HTTPS connections don't work. But, > >> I'm told the command-line version of curl does work. > > > > That'd probably be because they didn't install the HTTPS-able > > version of cURL. Check out curl.haxx.se

Re: [PHP] cURL support

2001-09-10 Thread Daniel Baldoni
G'day Jason >> On the hosting provider, HTTPS connections don't work. But, >> I'm told the command-line version of curl does work. > > That'd probably be because they didn't install the HTTPS-able > version of cURL. Check out curl.haxx.se for more info. No, testing shows that their cURL binary

Re: [PHP] reading arrays within a field from mysql and separating the values

2001-09-10 Thread David Robley
On Tue, 11 Sep 2001 00:02, Robert Trembath wrote: > Hello everyone, > > Ran into a problem trying to get this to work. I have multiple names in > a mysql field (DCD_Access) that contains "name1, name2, name3, name4" > and I want read this information as an array so I can use these values > to popu

Re: [PHP] User Authentication / only 1 login per user at any time

2001-09-10 Thread Michael Kimsal
Hi there: We have this functionality built into our core framework with our custom session handling. The basic premise is that you don't store a 1/0 in a 'logged in' flag, but store the session key with the username. When someone logs in, assign their session key to that username. The previ

Re: [PHP] find out names of keys in an array

2001-09-10 Thread Kevin
Below is a function I found in the manual or somewhere on php.net. I tried to find it to provide a link so the author would get some credit. Sorry but no luck. Anyway, this is a handy little function when you are trying to figure out the contents of an array. -kevin function array_tree($array

Re: [PHP] How to do a Date format conversion

2001-09-10 Thread David Robley
On Tue, 11 Sep 2001 06:07, Don wrote: > Hi, > > I have a variable containing a date in the form of "12/03/01". I wish > to display it as: > > December 03, 2001. > > Is there a built in PHP method for doing this or am I on my own and > have to write by own functions (which I can do). > > Thanks,

Re: [PHP] find out names of keys in an array

2001-09-10 Thread David Robley
On Tue, 11 Sep 2001 10:23, Evan Nemerson wrote: > I'm writing a little script to make a stem plot (to make my AP STAT > class easier). Currently, my stem plot is stored in an array. Here is > what the output of print_r($stem); looks like: > > Array > ( > [39] => 7 > [40] => 1 1 4 8 9 >

Re: [PHP] IE and '404 not found' custom script

2001-09-10 Thread Andrew Brampton
you said you added some headers, how about padding the html out with   but I'm not sure what you are doing here, so that may not apply/work :) Andrew - Original Message - From: "Enrique Vadillo" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, September 11, 2001 1:56 AM Subject

RE: [PHP] Content management

2001-09-10 Thread Kevin
The following might help you in your quest. You may already be aware of them and perhaps they don't fit your bill but anyway, here it goes. I think phpwebsite is worth a look. http://phpwebsite.appstate.edu/ http://www.postnuke.org/ and have a look through here: http://www.hotscripts.com/PHP

[PHP] find out names of keys in an array

2001-09-10 Thread Evan Nemerson
I'm writing a little script to make a stem plot (to make my AP STAT class easier). Currently, my stem plot is stored in an array. Here is what the output of print_r($stem); looks like: Array ( [39] => 7 [40] => 1 1 4 8 9 [41] => 2 3 8 8 9 [42] => 0 2 3 5 7 [43] => 0 0 1

[PHP] IE and '404 not found' custom script

2001-09-10 Thread Enrique Vadillo
Hi, I'd like to execute a php script which does *not always* display HTML everytime a file is not found. IE requires that a custom errmsg be over 512 bytes in order to display it instead of the internal one, my ErrorDocument script will look for any 'not found' file somewhere else (in blob recor

Re: [PHP] PHP Redirect in the middle of code?

2001-09-10 Thread Michael J. Seely
HI You can put the header function anywhere in the php code as long as the logic sends it as the very first output for the page in html. Conditional redirects are no problem. >[EMAIL PROTECTED] (George Pitcher) writes: > >> Andrew, >> >> I am in a similar position witha Lasso site, which

[PHP] User Authentication / only 1 login per user at any time

2001-09-10 Thread Lewi Hirvela
Hi, With most of my scripts, when I am about to write something, I have it in my head on how to do it exactly.. But with only 1 login per user at anytime, I havent found any good ways to do it, All I can think of is to set a mysql field called ³logged_in² to ³1² or ³0² if logged in or not, but

[PHP] PHP Training Course

2001-09-10 Thread Michael Kimsal
Hello all. This is just another reminder for anyone who may have missed it that we have another PHP training course coming up very soon. October 1-5, 2001, in Ann Arbor, Michigan, Tap Internet will be offering a PHP training course. The course will feature material aimed at beginners to interme

Re: [PHP] Content management

2001-09-10 Thread Nelson Goforth
I've seen one very heavy-duty example of a completely web-based site development tool. This was done in ASP, VB and SQL Server (I think) but could be done with open source tools. However, they've put many people-years into the project. Every site resides on the ASP's (using the other meanin

Re: [PHP] calling javascript functions inside PHP

2001-09-10 Thread Nelson Goforth
PHP has some encryption mechanisms in it - but by that time you've sent the data to the server. The other respondents are correct though - you should be using an SSL connection to encrypt the data between the user and your server. On a site that I do I use SSL to keep the data secure between

Re: [PHP] Content management

2001-09-10 Thread Michael Champagne
I am looking for something like this as well. We are not looking at developing our own interface but maybe going with something like eGrail or Vignette? I'm not too familiar with the pros and cons of these. Which heavy duty content management system is best from a PHP-friendly standpoint? Than

Re: [PHP] Stripslashes question.

2001-09-10 Thread Sean C. McCarthy
Hi, Didn't help. I tried it before that is why I tried with addcslashes. What I have done so far is : I have cmp'ed the file before adding slashes and after and it seems that it is eating up the \. Like Pñ\#as renders as Pñ#as after stripingslashes but in the DB is Pñ\\#as. As far as I know it

Re: [PHP] Stripslashes question.

2001-09-10 Thread Alexander Skwar
So sprach »Sean C. McCarthy« am 2001-09-10 um 22:42:51 +0100 : > Hi all, > > What will be the way to convert binary information into a string which > will get into an SQL query for MySQL? I tried stripcslashes but I got > stucked with it. Any help? Wrong direction :) addslashes($binary) will en

Re: [PHP] Stripslashes question.

2001-09-10 Thread Jason Bell
try addslashes instead. You might have better luck. - Original Message - From: "Sean C. McCarthy" <[EMAIL PROTECTED]> To: "PHP General List" <[EMAIL PROTECTED]> Sent: Monday, September 10, 2001 2:42 PM Subject: [PHP] Stripslashes question. > Hi all, > > What will be the way to conver

[PHP] Stripslashes question.

2001-09-10 Thread Sean C. McCarthy
Hi all, What will be the way to convert binary information into a string which will get into an SQL query for MySQL? I tried stripcslashes but I got stucked with it. Any help? Thanks in advance. Sean C. McCarthy SCI, S.L. (www.sci-spain.com) -- PHP General Mailing List (http:/

[PHP] Solaris and Apache 2.0 with Tomcat 4.0 and PHP 4.0

2001-09-10 Thread Nael Mohammad
Is it possible to compile PHP 4 under Apache 2.0 or Tomcat 4.0 as a standalone server? Nael Mohammad Neomar, Inc. [EMAIL PROTECTED] "When Wireless Means Business" CONFIDENTIALITY NOTICE: This e-mail may contain confidential information that is legally privileged. Do not read this e-mail if you

Re: [PHP] updating several lines in a text file while leaving rest of file untouched

2001-09-10 Thread Jason Bell
how much are they paying for their hosting? I mean seriously you can get a PHP enabled host that offers MySQL database for next to nothing these days. But, apart from that you could read the file into an array, making each line an element within the array. Modify what you need to modif

Re: [PHP] new to php

2001-09-10 Thread Kostis Mentzelos
It works http://domain.dot.com/loop.php";> thanks for your time, this solved my problem. Not only I am new to PHP I am also new to HTML where can I find a list with all "meta" tags? kostis. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additio

RE: [PHP] updating several lines in a text file while leaving rest of file untouched

2001-09-10 Thread Kurt Lieber
agreed, except it's for a client who doesn't have database access at their ISP and doesn't wish to pay more to get database access. So, I'm stuck using a text file for now. --kurt > -Original Message- > From: Mark [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 10, 2001 2:17 PM >

Re: [PHP] updating several lines in a text file while leaving rest of file untouched

2001-09-10 Thread Mark
On Mon, 10 Sep 2001 14:15:36 -0700, Kurt Lieber wrote: >I have a configuration file that I use to store several variables and >would like to provide a web-based interface to update this form. I'm >having some trouble replacing part of the file while leaving the >rest of >it intact. > >An example

[PHP] updating several lines in a text file while leaving rest of file untouched

2001-09-10 Thread Kurt Lieber
I have a configuration file that I use to store several variables and would like to provide a web-based interface to update this form. I'm having some trouble replacing part of the file while leaving the rest of it intact. An example of the config file is: $eventInfo[1][1] = "First Event Title"

Re: [PHP] MySQL query help

2001-09-10 Thread Sheridan Saint-Michel
Well, I played with this a little more and it seems to be acting oddly when you first call this select unless you set the variable first. So if the below doesn't work try actually doing this $query="set @count=NULL; select tableName.*,if(@count,@count:=@count+1,@count:=1) as inc, from tableName"

[PHP] Setting session vars in a function - some weirdness!

2001-09-10 Thread Chris
One of the annotations to the docs for session functions notes that if you want to set a session variable inside a function, you have to call session_start() BEFORE to use your global $varname statement. But there's more to it than that. After some very annoying trial and error, I disovered that

[PHP] enumerations // collections

2001-09-10 Thread Mitja Pagon
I'm writting a class in PHP that has the following syntax ID = $fld->ID; $this->name = $fld->name; $this->lastname = $fld->lastname; $this->username = $fld->username; $this->password = $fld->password; return true; } else { return false; } #end if mysql_free_re

[PHP] How to do a Date format conversion

2001-09-10 Thread Don
Hi, I have a variable containing a date in the form of "12/03/01". I wish to display it as: December 03, 2001. Is there a built in PHP method for doing this or am I on my own and have to write by own functions (which I can do). Thanks, Don

[PHP] Re: login access

2001-09-10 Thread Philip Hallstrom
Check out http://www.phpbuilder.com... I'm sure I've seen this covered there... -philip On Tue, 11 Sep 2001 [EMAIL PROTECTED] wrote: > Hi, > > I was wondering how does one create a PHP script that can verify a > database for the login ID and password and then allow that person to > access a par

Re: [PHP] MySQL query help

2001-09-10 Thread Sheridan Saint-Michel
See if this does what you are shooting for: select tableName.*,if(@count>=1,@count:=@count+1,@count:=1) as inc, from tableName; Keep in mind that @count will keep it's value until the thread is closed, so if for some reason you have to do the above twice in one thread throw in a statement like:

[PHP] Hierarchic menus using Javascript and PHP?

2001-09-10 Thread Nelson Goforth
On my site I have a page that takes input into a MySQL database (though this isn't a db question). Each entry has a category and a subcategory entry, which should come from predefined lists and are therefore instituted as pull-down lists. The category list is in a PHP array which feeds a SELE

RE: [PHP] Reprise of dissapearing session variables

2001-09-10 Thread Johnson, Kirk
We use a Big-IP controller from F5: http://www.f5.com/f5products/bigip/index.html Kirk > -Original Message- > From: Jason Bell [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 10, 2001 1:33 PM > To: PHP Users > Subject: Re: [PHP] Reprise of dissapearing session variables > > > Than

Re: [PHP] Reprise of dissapearing session variables

2001-09-10 Thread Jason Bell
Thanks for the input Kirk! Unfortunately, I don't have the ability modify my php.ini (virtual hosting). Also, if I saved the session data in the database, I'd have to perform a database query to get it at the beginning of each page. That's probably not good for performance. :/ option #1 intere

[PHP] Some problem...

2001-09-10 Thread Marius Pertravčius
Sveiki, php-general, I got this message: Warning: SAFE MODE Restriction in effect. The script whose uid is 505 is not allowed to access /tmp/phpwGxNPJ owned by uid 0 in /home/sveikinimai.lt/send/owncard.php on line 46 Where could be that I'm making a mistake... __

RE: [PHP] Reprise of dissapearing session variables

2001-09-10 Thread Johnson, Kirk
> session files get saved in /tmp by default, correct? Is > there a way to have > them saved somewhere that would propogate to all the servers > in the cluster? Warning! The following is from me, a non-gearhead. 1. We use a load balancer which is able to set a cookie on the first page request

[PHP] MySQL query help

2001-09-10 Thread Michael George
I'm trying to make a query that will number it's own output rows. e.g. when listing all the entries in a table that are related to a specific invoice, there will be a column with a monotonically increasing integer value (1-x where x is the number of matching entries). I know I can easily do this

[PHP] GD with GIF support

2001-09-10 Thread Joseph Bannon
Does anyone have GD with GIF support? Can you send it to me? Thanks Joseph -- 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 PRO

[PHP] login access

2001-09-10 Thread php_guy
Hi, I was wondering how does one create a PHP script that can verify a database for the login ID and password and then allow that person to access a particular page. I am not looking for extreme details here , but I just want to get a general idea. I can understand how to make a script to verif

[PHP] Re: Question on the list() function

2001-09-10 Thread D
Hmm.. I dont think I agree with you on that. First the code works perfect, second its just using two list() rather then one, otherwise its exactly the same thing as you say would work, which is what makes me think its a two dimensional array. Ken _lallous wrote in message <[EMAIL PROTECTED]>...

[PHP] Ramesus HELP ! Fwd: [PHP] mail() ERROR - WHY, WHY, WHY

2001-09-10 Thread Badger
This is a forwarded message From: Badger <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Date: Monday, September 10, 2001, 12:23:54 AM Subject: [PHP] mail() ERROR - WHY, WHY, WHY ===8<==Original message text=== Hello , I drowing here and need a life-ring! I have a site relyin

Re: [PHP] Reprise of dissapearing session variables

2001-09-10 Thread Jason Bell
Yeah, we narrowed it down to the cluster as causing the problem friday night. My host is working to figure out a solution. They have a few ideas, but haven't tested them yet. session files get saved in /tmp by default, correct? Is there a way to have them saved somewhere that would propogate to

Re: [PHP] Rounding a number up

2001-09-10 Thread Lance Rochelle
http://www.php.net/manual/en/function.ceil.php - Original Message - From: "Brandon Orther" <[EMAIL PROTECTED]> To: "PHP User Group" <[EMAIL PROTECTED]> Sent: Monday, September 10, 2001 2:19 PM Subject: [PHP] Rounding a number up > Is there a way to round a number to the next whole numb

[PHP] Rounding a number up

2001-09-10 Thread Brandon Orther
Is there a way to round a number to the next whole number? Example: Before: 1.86758 After: 2 Thank you,

Re: [PHP] Expire page...

2001-09-10 Thread Sheridan Saint-Michel
It's in the manual here: http://www.php.net/manual/en/function.header.php It gives this solution header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1

RE: [PHP] test for empty $result??

2001-09-10 Thread Boget, Chris
> Then you can use: > if (mysql_num_rows($result) == 0) { > stuff here > } > This will check the number of rows returned from your query. If zero, > then do somethingmodify as you need. What I generally do is this: if(( !$result ) || ( mysql_errno() > 0 )) { // error code here } OR

Re: [PHP] HTTP POST..

2001-09-10 Thread Tom Carter
PHP is probably compiled as a module.. if you want to be able to compile php to use on command line you need to compile a second version (yes you can have two) without all the apache configure options (ie only things like mysql as and when needed) - Original Message - From: "ReDucTor" <[E

RE: [PHP] test for empty $result??

2001-09-10 Thread Andrew
cool! thanks Sam and Jeff, for your responses! best, a > -Original Message- > From: Sam Masiello [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 10, 2001 1:48 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: [PHP] test for empty $result?? > > > > Then you can use: >

RE: [PHP] test for empty $result??

2001-09-10 Thread Sam Masiello
Then you can use: if (mysql_num_rows($result) == 0) { stuff here } This will check the number of rows returned from your query. If zero, then do somethingmodify as you need. HTH Sam Masiello Software Quality Assurance Engineer Synacor (716) 853-1362 X289 [EMAIL PROTECTED]

RE: [PHP] test for empty $result??

2001-09-10 Thread Andrew
thansk, but $result here is a Resource ID, and will be present even if the result set associated with it is null. best, a > -Original Message- > From: Jeff Lewis [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 10, 2001 1:43 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: R

RE: [PHP] test for empty $result??

2001-09-10 Thread Jeff Lewis
Just use: if (!$result){ code here } Jeff > -Original Message- > From: Andrew [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 10, 2001 1:34 PM > To: [EMAIL PROTECTED] > Subject: [PHP] test for empty $result?? > > > I know that this has been discussed before, but I cannot find the

RE: [PHP] Re: passing args to function?

2001-09-10 Thread Jaxon
ah! thanks Moody. silly jaxon, kicks are for trids. cheers, j > -Original Message- > From: Moody [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 10, 2001 1:01 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Re: passing args to function? > > > > I'm having a bit of a hard time passing

[PHP] test for empty $result??

2001-09-10 Thread Andrew
I know that this has been discussed before, but I cannot find the threads so... I have a function that does a mysql_query and want to break if the SQL query didn't return any rows in $result. empty(), isset() will not work, for obvious reasons. Can anyone suggest an alternative? $sql="select r

[PHP] Expire page...

2001-09-10 Thread Dhaval Desai
Hi! Well I would like to expire a page after you move away from that page and the user should not be able to hit the browser's back button and see the contents. I t should show that the page has expired.. In ASp it is very easy to do that but in Php I am looking all over and still can't find it

Re: [PHP] PHP Redirect in the middle of code?

2001-09-10 Thread Michael Kimsal
Good to hear. How's fusebox working for you? Andrew Penniman wrote: >The Steve Edberg (option #2) and Michael Kimsal suggestions to use >ob_start() output buffering work like a charm. Thanks so much! I would >have been a long time coming before I mad this connection on my own. >Guess I need

RE: [PHP] PHP Redirect in the middle of code?

2001-09-10 Thread Andrew Penniman
The Steve Edberg (option #2) and Michael Kimsal suggestions to use ob_start() output buffering work like a charm. Thanks so much! I would have been a long time coming before I mad this connection on my own. Guess I need to hone my archive querying skills... I think it would be _really_ swell if

Re: [PHP] PHP Redirect in the middle of code?

2001-09-10 Thread Steve Edberg
I learn something every day, here :) According to my McGraw-Hill HTML Programmer's Reference [please, no messages about HTML not being 'programming'!], the META tag _should_ only occur in the container. Of course, we all know how closely browsers adhere to the HTML specs ;P -steve

Re: [PHP] PHP Redirect in the middle of code?

2001-09-10 Thread Philip Olson
On Tue, 11 Sep 2001, Jason Brooke wrote: > > Right off the top of my head, you have three options that I can see: > > > > (1) Rewrite the code to avoid any output before the redirect. > > I'd recommend this one myself Me too, I can't think of a valid reason to use a Location header while hav

Re: [PHP] PHP Redirect in the middle of code?

2001-09-10 Thread Ken
At 08:11 AM 9/10/01 -0700, Steve Edberg wrote: >Right off the top of my head, you have three options that I can see: >(3) Use a META REFRESH tag. For example: > > > >where 1 is the time (in seconds) before you want the redirect, and 'page.php' is >where you want the redirect to. Of cours

[PHP] Re: passing args to function?

2001-09-10 Thread Moody
> I'm having a bit of a hard time passing in a constant to a user-defined > function. > > the calling page - index.php: > > include define_foo.php; > function_foo(bar); ^ should be: foo("bar"); [snip] > function foo($value) > { > global $value, $page_id, $usr, $pass, $database, $host;

Re: [PHP] NT?

2001-09-10 Thread nayco
I don't think that will be a problem : try zend.com 'apache + php4' > go and see http://zend.com Anyone tried under NT ??? I won't say : 'try Linux' (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr - Original Message - From: Jeremy Mora

Re: [PHP] Convert a string so it is valid for a sql query

2001-09-10 Thread nayco
$corrected_string=addslashes($string_to_correct) I think this function does it... or maybe : $corrected_string=ereg_replace("/'/","\'",$string_to_correct) >(i'm not sure of the syntax). (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr -

[PHP] passing args to function?

2001-09-10 Thread Jaxon
Hi, I'm having a bit of a hard time passing in a constant to a user-defined function. the calling page - index.php: define_foo.php: $titleblock"; if (is_null($result)) break; //iterate through array, outputting info based on value type if ($value != "bar") { while (list ($t

[PHP] Re: Convert a string so it is valid for a sql query

2001-09-10 Thread Moody
> Is there a function to convert a string so it is a valid string of text > for a SQL query? AN example would be a string of text that has ' in it > would be converted to \' http://www.php.net/manual/en/function.addslashes.php -- PHP General Mailing List (http://www.php.net/) To unsubscrib

[PHP] Re: Convert a string so it is valid for a sql query

2001-09-10 Thread Alistair Austen
Use AddSlashes; string addslashes (string str) This will add slashes to all characters that require them for SQL queries. Alistair "Brandon Orther" <[EMAIL PROTECTED]> wrote in message 00b401c13a12$fde59b30$0a00a8c0@webintel">news:00b401c13a12$fde59b30$0a00a8c0@webintel... > Hello, > > Is ther

[PHP] Re: NT?

2001-09-10 Thread Alistair Austen
Yep, check here, http://www.php.net/downloads.php and look under Win32. Alistair "Jeremy Morano" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > Sorry to bother everyone. I was just wondering if php runs on NT? -- PHP General Mailing List (http://

[PHP] NT?

2001-09-10 Thread Jeremy Morano
Hello, Sorry to bother everyone. I was just wondering if php runs on NT? -- 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(2): [PHP] PHP and IIS4

2001-09-10 Thread pong-TC
[EMAIL PROTECTED] writes: >Yes, it will. But try not to mix and match. Can you explain more about this? I would like to know more about the impact of having and using ASP and PHP together. Thank you. Pong > > >George >- Original Message - >From: "pong-TC" <[EMAIL PROTECTED]> >To: <[EMA

[PHP] Convert a string so it is valid for a sql query

2001-09-10 Thread Brandon Orther
Hello, Is there a function to convert a string so it is a valid string of text for a SQL query? AN example would be a string of text that has ' in it would be converted to \' Thank you, Brandon Orther WebIntellects Design/Development Manager [EMAI

RE: [PHP] Unique Array

2001-09-10 Thread Mark Roedel
> -Original Message- > From: Deirdre Mc Cann [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 10, 2001 6:30 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Unique Array > > > Can anyone help me? I need to produce a random and uniques > array using numbers between 0 and 9. I tried to cr

[PHP] Code Red Catcher

2001-09-10 Thread billfarr
Hi again, Everyone: I didn't expect such a response so quickly. With your indulgence, I'll quote the code in this message. I just found out that Outlook (which is what I'm forced to use at Volvo) won't attach .ida files and I *think* this list strips attachments in any case. I don't remember o

[PHP] global $HTTP_SESSION_VARS not global ???

2001-09-10 Thread Thomas Watson
Hi all, After a bit of testing, I've noticed, that the $HTTP_SESSION_VARS array isn't as global as the manual makes it. The following piece of code should produce 2 blank lines and a "click here" link the first time it's loaded. When you click on the link, I would expect two lines saying "som

[PHP] Re: Never tried it but....

2001-09-10 Thread lo-tek
No. It may be remotely possible (with a gross hack) for persistent connections, but in general, resources are disposed of after every request, so resource Ids are meaningless across pages. i doubt that the session manager would let you store a resource anyway... _lallous <[EMAIL PROTECTED]> wrot

[PHP] Accessing Variable !!!

2001-09-10 Thread Girish P
Hi, I am trying to use value of the text box for the querying ..The query is defined with in the a javaScript . I am not able to get the Value.. inside the function.. However "document.form.text.value" is getting the value. How do we assign the value of javscript to PHP??? Is there a better

RE: [PHP] << Previous / Next Buttons >>

2001-09-10 Thread Michael O'Neal
on 9/6/01 11:52 PM, [EMAIL PROTECTED] went and wrote: > I'll show you what I did but realize I'm an advanced beginner/intermediate > programmer. This may not be the most efficient way to do it but seems to > be the simplest code compared to other ways of doing it that I've seen. Not > sure if I w

Re: [PHP] PHP Redirect in the middle of code?

2001-09-10 Thread Michael Kimsal
As others have mentioned, output buffering is what you want to look at. I've been doing some minor research on CF the past couple weeks, and it seems that CF, by default, always has output buffering on. While it's great for allowing redirects/header info to be pushed out wherever in a script,

Re: [PHP] PHP Redirect in the middle of code?

2001-09-10 Thread Jason Brooke
> Right off the top of my head, you have three options that I can see: > > (1) Rewrite the code to avoid any output before the redirect. I'd recommend this one myself jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands

Re: [PHP] PHP Redirect in the middle of code?

2001-09-10 Thread Steve Edberg
Right off the top of my head, you have three options that I can see: (1) Rewrite the code to avoid any output before the redirect. (2) Use output buffering (available only in PHP4). I haven't used this, but check out http://www.php.net/manual/en/ref.outcontrol.php (3) Use a META REFRE

[PHP] R: creating ZIP file from mySQL content?

2001-09-10 Thread ---
zip support in php is read-only. but keep in mind that zip is not simply a compressed file, is a compressed archive, like .tar.gz or .tar.bz2 you can use zlib for gzip files or bzip2 for bzip2 files... if you need absolutely a zip file format you need to pipe it to a program like the unix progra

  1   2   >