Re: [PHP] Nested IF's (Is there a LIMIT ?)

2002-06-13 Thread Daniel Negron/KBE
I am too lazy to count your braces for you, but no, there's not really a limit to how many ifs you can nest. It helps to use an editor that flashes the bracket's companion when you type or edit one. That way you can easily see whether they're balanced in the right place. »»» Do you happen to h

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Miguel Cruz
On Fri, 14 Jun 2002, Manuel Lemos wrote: > I would say that the long standing users are even more aware that they > should not turn off Javascript because they are experienced enough to > know that some sites of their preference do not work right without > Javascript. > > I believe that users

RE: [PHP] Nested IF's (Is there a LIMIT ?)

2002-06-13 Thread Martin Towell
Bracketing looks good try pulling chunks of code out and gradually add it in to see where the problem lies eg (sorry for reformatting your code) html code in here, then html code in here, etc.. -Original Message- From: Miguel Cruz [mailto:[EMAIL PROTECTED]] Sent: Fri

Re: [PHP] Nested IF's (Is there a LIMIT ?)

2002-06-13 Thread Miguel Cruz
I am too lazy to count your braces for you, but no, there's not really a limit to how many ifs you can nest. It helps to use an editor that flashes the bracket's companion when you type or edit one. That way you can easily see whether they're balanced in the right place. miguel On Fri, 14 Ju

Re: Re[2]: [PHP] sessions help

2002-06-13 Thread Miguel Cruz
On Thu, 13 Jun 2002, Kevin Stone wrote: > Your problem is here.. > > return ($_SESSION['node'] = $node_id); > > I do not believe that you can both set and return a varaible on the same > line. FYI, the variable which you're returning in this function is global.. > so there's no

[PHP] Nested IF's (Is there a LIMIT ?)

2002-06-13 Thread Daniel Negron/KBE
This is my code, it seems that either I have the curly brackets in the wrong place OR there is a limit to how many times you can set IF's. So before I pull out the shotgun, and take out this machine, I figure I would ask the "Cousel Of the PHP OverLords". So you know, I happen to also be using "

Re: [PHP] Different colors on lines

2002-06-13 Thread Miguel Cruz
On Fri, 14 Jun 2002, Bård Tommy Nilsen wrote: > Can anyone help out with this ?? > > Since i do the search after the query, there is an problem if line 1 in the > Sql table matches, line 2 does not, but line 3 does. > > Then the result will display the same color on the two lines > That would be

RE: [PHP] Advanced User Authentication <--- solved

2002-06-13 Thread César Aracena
Done it!!! Followed the examples both of you gave me and voala! Hey... it turned out to be quite a effective user authentication system. Thanks a lot. Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 > -Mensaje original- > De: Justi

Re: [PHP] Re: Email validation

2002-06-13 Thread Miguel Cruz
On Fri, 14 Jun 2002, Manuel Lemos wrote: > On 06/14/2002 03:06 AM, Miguel Cruz wrote: >> On Fri, 14 Jun 2002, Manuel Lemos wrote: >>> The following classes use this validation regular expression string. >>> It does not exclude some invalid addresses but includes all valid >>> addresses. >>> >>>

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Miguel Cruz
On Fri, 14 Jun 2002, Analysis & Solutions wrote: > On Thu, Jun 13, 2002 at 10:36:56PM -0500, Miguel Cruz wrote: >> If you're doing the site for the US government, you're (thank goodness) >> required by law to make sure it works without JavaScript. > > REALLY?! That's good news. Could you pleas

Re: [PHP] Reg-Maximum allowed size for uploaded files

2002-06-13 Thread Jason Wong
On Friday 14 June 2002 14:10, Chris Bunting wrote: > A quick search on google shows that yes, Php has a maximum upload filesize > of 10MB. I don't where you got this information from, it's simply not true. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Manuel Lemos
Hello, On 06/14/2002 01:25 AM, Analysis & Solutions wrote: Javascript-less represent less then 0.5% of the users in the World. >>> >>>I'd be interested in seeing this data proven. I'm not being sarcastic -- >>>I'm genuinely interested. >> >>http://www.phpclasses.org/browse.html/statistics/st

RE: [PHP] Advanced User Authentication

2002-06-13 Thread César Aracena
I like very much the idea of using a "short" way. Actually, I did and here's how: // After I queried the DB for a username & password match: if (mysql_num_rows($result) > 0) { $row = mysql_fetch_array($result); if ($row[authlevel] == '1')

Re: [PHP] Different colors on lines

2002-06-13 Thread Chris Bunting
Hello, Check out the following link. http://www.zend.com/codex.php?CID=322 There are various code examples for alternating table backgrounds. Hope this helps, Chris Bunting _ Send and receive Hotmail on your mobile device: http:/

RE: [PHP] Different colors on lines

2002-06-13 Thread Martin Towell
have a seperate counter $query = mysql_query("select * from $tabell_4"); $number = mysql_numrows($query) ; $i = 0; $bgcolor[0] = "#FFE38E"; $bgcolor[1] = "#FF"; $Search = "Test"; $j = 0 while ($i < $number) { $Name = mysql_result($query_1,$i,"Name"); if (eregi ($Search, $Name)) { Echo '

Re: [PHP] Re: Email validation

2002-06-13 Thread Manuel Lemos
Hello, On 06/14/2002 03:06 AM, Miguel Cruz wrote: > On Fri, 14 Jun 2002, Manuel Lemos wrote: > >>The following classes use this validation regular expression string. It >>does not exclude some invalid addresses but includes all valid addresses. >> >>"^([-!#\$%&'*+./0-9=?A-Z^_`a-z{|}~?])+@([-!#\

[PHP] Different colors on lines

2002-06-13 Thread Bård Tommy Nilsen
Can anyone help out with this ?? Since i do the search after the query, there is an problem if line 1 in the Sql table matches, line 2 does not, but line 3 does. Then the result will display the same color on the two lines That would be printet in this example. How can i make sure that it wil

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Manuel Lemos
Hello, On 06/14/2002 01:08 AM, Justin French wrote: >>http://www.phpclasses.org/browse.html/statistics/statistics.html#user-browsers > > > Interesting, but these stats only indicate what *browser* has been used... > not if JS was enabled/disabled. > > case 1: user gets sick of pop-ups and crap

Re: [PHP] Gathering user info with php or php and mysql.

2002-06-13 Thread Chris Bunting
>Run this little program: > > > >and see if you don't learn something useful. > >migue Thank you.. This is just what I was trying to find.. Well, The info at least. Never would of thought about a tag to show the info.. Again, Thank you.. Chris Bunting ___

Re: [PHP] Advanced User Authentication

2002-06-13 Thread Miguel Cruz
I think you're making it needlessly complicated. Why don't you just select * from * FROM auth WHERE authname = '$username' AND authpass = password('$password') and not worry about "WHERE authlevel = 1"? Then, if that query is successful, you can just fetch the result row and see what 'auth

Re: [PHP] Reg-Maximum allowed size for uploaded files

2002-06-13 Thread Chris Bunting
A quick search on google shows that yes, Php has a maximum upload filesize of 10MB. Maybe your upload timed out or the session expired if you are using them before you got to 10MB or something else happened. Chris Bunting _ Chat

[PHP] Double execution trouble with procmail script invoke

2002-06-13 Thread php
I have a fairly obscure setup where I have procmail directly executing a PHP script specially made for this purpose. This php script uses the same code (classes) used for the web applications, and the classes works just fine. The symptom: I am getting double INSERT's into database. Conclusion:

Re: [PHP] Gathering user info with php or php and mysql.

2002-06-13 Thread Miguel Cruz
On Fri, 14 Jun 2002, Chris Bunting wrote: > My htaccess file: > > ErrorDocument 401 /error/error401.php > ErrorDocument 403 /error/error403.php > ErrorDocument 404 /error/error404.php > ErrorDocument 500 /error/error405.php > > My question is this, Is it possible to use php to get the referring

Re: [PHP] Re: Email validation

2002-06-13 Thread Miguel Cruz
On Fri, 14 Jun 2002, Manuel Lemos wrote: > The following classes use this validation regular expression string. It > does not exclude some invalid addresses but includes all valid addresses. > > >"^([-!#\$%&'*+./0-9=?A-Z^_`a-z{|}~?])+@([-!#\$%&'*+/0-9=?A-Z^_`a-z{|}~?]+\\.)+[a-zA-Z]{2,4}\$" It

Re: [PHP] Reg-Maximum allowed size for uploaded files

2002-06-13 Thread Chris Bunting
Hello, I'm not sure about this either but did you write the upload script yourself? I know that most upload file scripts include a hidden tag to include the maxfilesize of image uploads on the posting form itself. Wasn't sure if you were using someone elses script and didn't notice that. Chr

[PHP] Gathering user info with php or php and mysql.

2002-06-13 Thread Chris Bunting
Hi All, I've been messing around and trying to figure out how to log info for error messages. I'm using a htaccess file to redirect requests to php error pages like below, My htaccess file: ErrorDocument 401 /error/error401.php ErrorDocument 403 /error/error403.php ErrorDocument 404 /error/e

[PHP] Reg-Maximum allowed size for uploaded files

2002-06-13 Thread SenthilVelavan
Hello techies, What is the Maximum allowed size for uploaded files in php.ini file? I have tested it for the following amount upload_max_filesize = 10M But here i can achieve only upto 7.5MB .Is that the limit of php.? Any help is appreciated. Thanks in advance, Senthilvel

[PHP] Re: Email validation

2002-06-13 Thread Manuel Lemos
Hello, On 06/13/2002 11:49 PM, Timothy J. Luoma wrote: > On Wed, 12 Jun 2002, Pedro Pontes wrote: > > >>function checkEmail($strEMailAddress) >>{ >> return eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$", >>$strEMailAddress); >>} >> >>You have it now :). > > > I'm still learni

Re: [PHP] Re: forcing file downloads

2002-06-13 Thread Jason Wong
On Friday 14 June 2002 10:47, Timothy J. Luoma wrote: > On Wed, 12 Jun 2002, Justin French wrote: > > I know this has been discussed many times, but I've been hunting through > > the archives with very little resolution on the issue. > > The user can define certain things given the way they want m

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Analysis & Solutions
Sire: On Fri, Jun 14, 2002 at 02:56:27PM +1000, Martin Towell wrote: > > I agree that any checks should be done on the server anyway, just in case > someone has js turned off. But to reduce the load on the server, you can use > js to at least filter _some_ of the traffic. You have a point. Tho

[PHP] Advanced User Authentication

2002-06-13 Thread César Aracena
Hi all, I’m trying to make a somehow “advanced” user authentication system fro my own web site. What I’m using as a model example, is the authentication system explained by Luke Welling & Laura Thomson in their book “PHP and MySQL Web Development”. In the book, they explain how to make apparently

[PHP] Advanced User Authentication

2002-06-13 Thread César Aracena
Hi all, I’m trying to make a somehow “advanced” user authentication system fro my own web site. What I’m using as a model example, is the authentication system explained by Luke Welling & Laura Thomson in their book “PHP and MySQL Web Development”. In the book, they explain how to make apparently

RE: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Martin Towell
It all depends on the traffic to the server. I agree that any checks should be done on the server anyway, just in case someone has js turned off. But to reduce the load on the server, you can use js to at least filter _some_ of the traffic. Also, using js to alert a user of an error is much quic

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Analysis & Solutions
On Thu, Jun 13, 2002 at 10:36:56PM -0500, Miguel Cruz wrote: > > If you're doing the site for the US government, you're (thank goodness) > required by law to make sure it works without JavaScript. REALLY?! That's good news. Could you please provide a source for that? Thanks, --Dan --

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Analysis & Solutions
On Fri, Jun 14, 2002 at 12:32:05AM -0300, Manuel Lemos wrote: > On 06/14/2002 12:03 AM, Justin French wrote: > >On 14/06/02 12:45 PM, Manuel Lemos ([EMAIL PROTECTED]) wrote: > > > >>Javascript-less represent less then 0.5% of the users in the World. > > > >I'd be interested in seeing this data pro

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Justin French
on 14/06/02 1:32 PM, Manuel Lemos ([EMAIL PROTECTED]) wrote: > http://www.phpclasses.org/browse.html/statistics/statistics.html#user-browsers Interesting, but these stats only indicate what *browser* has been used... not if JS was enabled/disabled. case 1: user gets sick of pop-ups and crap, t

RE: [PHP] MySQL Query Help!!!!

2002-06-13 Thread John Holmes
> On Fri, 14 Jun 2002, Chris Kay wrote: > >> The query does not error out it just does not give any records, and I > >> Know > > > > What part of "The query does not error out" do you not understand. > > > > Why are there so many people willing to say what is wrong with a code > > but when it come

RE: [PHP] Editor

2002-06-13 Thread Jantan
Try this one: Webmaster can be downloaded from this site : http://www.html-helper.com/ *** REPLY SEPARATOR *** On 6/13/02 at 9:48 PM César Aracena wrote: >I'm pretty happy every since I found Macromedia's Home Site 5.0. It will >do the coloring for all the different kinds o

RE: [PHP] php server on Windows

2002-06-13 Thread Bruce Karstedt
IMHO Apache is the main train. I can install apache on a *nix box in 10 mins. Maybe 20 mins on win box. Apache is much more stable and easier to configure, unless you absolutely need ASP. Bruce Karstedt President Technology Consulting Associates, Ltd. Tel: 847-735-9488 Fax: 847-735-9474 -Or

RE: [PHP] Re: forcing file downloads

2002-06-13 Thread Bruce Karstedt
This is determined by your mime types in apache conf file (assuming you are using apache) if the file type is not defined apache will try and download the file instead of parsing it for the browser. Bruce Karstedt President Technology Consulting Associates, Ltd. Tel: 847-735-9488 Fax: 847-735-947

RE: [PHP] MySQL Query Help!!!!

2002-06-13 Thread Chris Kay
> The query does not error out it just does not give any records, and I Know What part of "The query does not error out" do you not understand. Why are there so many people willing to say what is wrong with a code but when it comes to A solution that go silent. I find that the ones most often

Re: [PHP] php server on Windows

2002-06-13 Thread Miguel Cruz
On Thu, 13 Jun 2002, Phil Schwarzmann wrote: > Can I use IIS instead of Apache ? If you hate yourself. IIS is not very configurable, so you'll find yourself unable to do an awful lot of things. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Miguel Cruz
On Fri, 14 Jun 2002, Justin French wrote: > on 14/06/02 12:45 PM, Manuel Lemos ([EMAIL PROTECTED]) wrote: >> I prefer to leave the less-than-0-dot-5-percent-non-Javascript-browser >> users fixing the address that had @ replaced. > > I agree. And in the case of a user site like yours, and email f

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Manuel Lemos
Hello, On 06/14/2002 12:03 AM, Justin French wrote: > on 14/06/02 12:45 PM, Manuel Lemos ([EMAIL PROTECTED]) wrote: > > >>Javascript-less represent less then 0.5% of the users in the World. > > > I'd be interested in seeing this data proven. I'm not being sarcastic -- > I'm genuinely interes

RE: [PHP] Extracting from an Array

2002-06-13 Thread John Holmes
Step through your code. What value does $rexpiry have? What do you see when you do print_r($Date) ?? Troubleshoot... ---John Holmes... > -Original Message- > From: Andre Dubuc [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, June 12, 2002 10:36 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTEC

RE: [PHP] MySQL Query Help!!!!

2002-06-13 Thread John Holmes
Man, where do I start. There could be so many things wrong. First of all, this is a PHP list, not MySQL. Second, use MySQL_error() after you issue a query to see if an error was returned http://www.php.net/mysql_error. Third, in this line: 'detail_start_date_y,detail_start_date_m,detail_start_dat

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Justin French
on 14/06/02 12:45 PM, Manuel Lemos ([EMAIL PROTECTED]) wrote: > Javascript-less represent less then 0.5% of the users in the World. I'd be interested in seeing this data proven. I'm not being sarcastic -- I'm genuinely interested. > You are guessing. I am sure your address leaked from some ot

[PHP] Re: Email validation

2002-06-13 Thread Timothy J. Luoma
On Wed, 12 Jun 2002, Pedro Pontes wrote: > function checkEmail($strEMailAddress) > { > return eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$", > $strEMailAddress); > } > > You have it now :). I'm still learning my PHP regex... does the above allow someone to have a literal "+" i

[PHP] Re: forcing file downloads

2002-06-13 Thread Timothy J. Luoma
On Wed, 12 Jun 2002, Justin French wrote: > I know this has been discussed many times, but I've been hunting through > the archives with very little resolution on the issue. The user can define certain things given the way they want mime types to be handled. PDF used to be a good solution until

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Manuel Lemos
Hello, On 06/13/2002 11:02 PM, Justin French wrote: >>>I don't think relying on JavaScript for something so integral as an email >>>address it THAT good an idea... >> >>Why not? I use this on mirror sites that only serve static pages so I do >>not need to depend on PHP. > > > Simply, if the use

RE: [PHP] Can I set the value of variable depending on when the page is loaded?

2002-06-13 Thread Martin Towell
it works for me - to only problem is if you're transferring data from one page to the other via the form. You'll need some other why of doing it (sessions, cookies, use GET, other) -Original Message- From: Don [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 12:43 PM To: Martin Tow

Re: [PHP] Can I set the value of variable depending on when the page is loaded?

2002-06-13 Thread Don
Would that solve my probem with the BACK button? - Original Message - From: "Martin Towell" <[EMAIL PROTECTED]> To: "'Don'" <[EMAIL PROTECTED]>; "php" <[EMAIL PROTECTED]> Sent: Thursday, June 13, 2002 10:38 PM Subject: RE: [PHP] Can I set the value of variable depending on when the page i

RE: [PHP] Can I set the value of variable depending on when the page is loaded?

2002-06-13 Thread Martin Towell
instead of using js to redirect, could you use header("location:"); ? -Original Message- From: Don [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 12:36 PM To: php Subject: [PHP] Can I set the value of variable depending on when the page is loaded? Hi, I have a an HTML page cont

[PHP] Can I set the value of variable depending on when the page is loaded?

2002-06-13 Thread Don
Hi, I have a an HTML page containing a form used to search my website. The form has a drop-down menu with two choices. When the submit button is clicked, I call a PHP page which look at the value of the drop down menu selection and redirects to the appropriate form handler. Basically, my PH

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Justin French
Hi, on 14/06/02 11:53 AM, Manuel Lemos ([EMAIL PROTECTED]) wrote: > Hello, > > On 06/13/2002 10:18 PM, Justin French wrote: >> I don't think relying on JavaScript for something so integral as an email >> address it THAT good an idea... > > Why not? I use this on mirror sites that only serve s

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Manuel Lemos
Hello, On 06/13/2002 10:18 PM, Justin French wrote: > I don't think relying on JavaScript for something so integral as an email > address it THAT good an idea... Why not? I use this on mirror sites that only serve static pages so I do not need to depend on PHP. > Use php to send a mailto: he

Re: [PHP] Printer friendly version script

2002-06-13 Thread Tom Rogers
Hi Should have made that a bit clearer :) One method for later browsers is to use a header tag that causes a new page to be loaded for printing. This is done transperantly so the users don't need to click anything other than the normal print button. It goes like this : Then if(print=yes)

Re: [PHP] security advice...

2002-06-13 Thread Justin French
That's a big can of worms :) I think perhaps start with one problem, like "sessions", then move onto another problem. Not really sure what you mean by cross site scripting... maybe you mean writing decent code once, and having it portable to many new projects with little fuss? Justin French

Re: [PHP] Printer friendly version script

2002-06-13 Thread Tom Rogers
Hi One method for later browsers is to use a header tag that causes a new page to be loaded for printing. This is done transperantly so the users don't need to click anything other than the normal print button. It goes like this : Then if(print=yes) just regenerate the page without any fancy

Re: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Justin French
I don't think relying on JavaScript for something so integral as an email address it THAT good an idea... Use php to send a mailto: header! I have a mail.php file, which I call with a link like: Justin and mail.php is a simple file: mailto:$email_address";); ?> It's got a default domain and

[PHP] sessions in multiple browser windows

2002-06-13 Thread Justin French
Hi all, I've got a session which is being maintained by cookies. One of the links on the page, when logged in, is a link the admin section of the site... at this stage, I have the link opening in a new window (target="_blank"). I've noticed that the session sometimes gets destroyed, with both w

RE: [PHP] Editor

2002-06-13 Thread César Aracena
I'm pretty happy every since I found Macromedia's Home Site 5.0. It will do the coloring for all the different kinds of programming languages you use and also, what's best, it will let you add your own customized toolbars and tool buttons so you don't have to type large strings of code every time

RE: [PHP] Shut down server

2002-06-13 Thread Bruce Karstedt
This is a bad idea from a security standpoint. If your server is local, login as root and type shutdown. If the system is remote telnet to the box, login, su to root and type reboot. If you use shutdown remotely, there is no way to restart the server. Bruce Karstedt President Technology Consultin

Re: [PHP] question about ? :

2002-06-13 Thread Lee Doolan
> "Miguel" == Miguel Cruz <[EMAIL PROTECTED]> writes: Miguel> On 13 Jun 2002, Lee Doolan wrote: >> the arrays below have dates like dateA= array( 0=> "03", 1=> >> "22", 2=> "02") >> >> for 22march2002. >> >> why does this work: >> >> $retval= ($dateA[2]

RE: [PHP] question about ? :

2002-06-13 Thread Martin Towell
Lee - I would bracket anyway, just to make sure, and to make it clear to the coder what's happening Miguel - that's fine when using two operators that have different precedence, but all three operators are ?: -Original Message- From: Miguel Cruz [mailto:[EMAIL PROTECTED]] Sent: Friday, J

Re: [PHP] Editor

2002-06-13 Thread Miguel Cruz
On Thu, 13 Jun 2002, Daniele Baroncelli wrote: > Although any editor should be fine when coding PHP, I find that the standard > Notepad it's a real pain in the ass. Especially when the script gives you an > error at line 222 ! Each time I have to scroll and count each single line! The best is BBE

Re: [PHP] question about ? :

2002-06-13 Thread Miguel Cruz
On 13 Jun 2002, Lee Doolan wrote: > the arrays below have dates like > dateA= array( 0=> "03", 1=> "22", 2=> "02") > > for 22march2002. > > why does this work: > > $retval= ($dateA[2] != $dateB[2]) > ? strcmp($dateA[2], $dateB[2]) > : (($dateA[0] != $dateB[0]) >

Re: [PHP] Code Improvement

2002-06-13 Thread Miguel Cruz
On Thu, 13 Jun 2002, Pong-TC wrote: > I run the simple code to display data from the database. There are around > 5000 records and 50 fields. It takes around 1 1/2 min to retrieve the > data to the browser. I'd like to know if we can improve my code. So, I > can retrieve the data in a shorter

[PHP] question about ? :

2002-06-13 Thread Lee Doolan
the arrays below have dates like dateA= array( 0=> "03", 1=> "22", 2=> "02") for 22march2002. why does this work: $retval= ($dateA[2] != $dateB[2]) ? strcmp($dateA[2], $dateB[2]) : (($dateA[0] != $dateB[0]) ? strcmp($dateA[0], $dateB[0]) : (

RE: [PHP] MySQL Query Help!!!!

2002-06-13 Thread Lazor, Ed
ps... from a PHP perspective, you may find troubleshooting things like this easier by using formatting like this: $sql = " select detail.*, type.type_name, status.status_name, staff.staff_name, source.source_

RE: [PHP] MySQL Query Help!!!!

2002-06-13 Thread Lazor, Ed
This is a MySQL question and best directed to the MySQL mailing lists available at: http://www.mysql.com/documentation/lists.html > -Original Message- > From: Chris Kay [mailto:[EMAIL PROTECTED]] > Sent: Thursday, June 13, 2002 4:33 PM > To: PHP General List > Subject: [PHP] MySQL Query

[PHP] MySQL Query Help!!!!

2002-06-13 Thread Chris Kay
I have a rather longer query which I would like to get all records past todays date. Here is my query $ttwo = date("YmdGi"); $dbq = select("select detail.*, type.type_name, status.status_name, staff.staff_name, source.source_long, source.source_short from detail, type, status, staff, source wh

RE: [PHP] Shut down server

2002-06-13 Thread Lazor, Ed
This has serious security implications. Research how to create a script on your system. Set it's sticky bit to run as a standard user that has authorization to run the shutdown command using SUDO. Make sure the script works from within UNIX and then call the script from PHP using exec. I am no

Re: [PHP] PCRE Problem

2002-06-13 Thread James Clifford
On Thu, Jun 13, 2002 at 03:49:00PM +0100, Brian McGarvie wrote: > $string = '[b]Test[/b]'; > $bbcode_string = str_replace("<", "[", str_replace(">", "]", $string)); > > or look into regular expressions... It's probably better to do as Brian suggests: use regular expressions so that you can avoid

Re: [PHP] Shut down server

2002-06-13 Thread Rosen
The server is Linux Red Hat 7.2 Ed Lazor <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > That all depends on what kind of server you're referring to. > > > -Original Message- > > Hi, > > I tried to shut down my server with exex("/sbin/poweroff") but no

[PHP] Re: Shut down server

2002-06-13 Thread Rosen
Hi, I tried to shut down my server with exex("/sbin/poweroff") but nothing happened! Can someone tell me how I could make shut down the server ? Is it possible ? The server is Linux Red Hat 7.2. Thanks, Rosen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Shut down server

2002-06-13 Thread Lazor, Ed
That all depends on what kind of server you're referring to. > -Original Message- > Hi, > I tried to shut down my server with exex("/sbin/poweroff") but nothing > happened! > Can someone tell me how I could make shut down the server ? > Is it possible ? > > Thanks, > Rosen

[PHP] Shut down server

2002-06-13 Thread Rosen
Hi, I tried to shut down my server with exex("/sbin/poweroff") but nothing happened! Can someone tell me how I could make shut down the server ? Is it possible ? Thanks, Rosen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: Re[4]: [PHP] sessions help

2002-06-13 Thread Lazor, Ed
> Hey, it worked on another server! > I've been working on my local machine's server (localhost), > but when I run it from a different web server, it worked fine. > > Any ideas about which setting(s) may be causing the problem? Nope, but I'm including a copy of my local php.ini for ya to compar

RE: Re[4]: [PHP] sessions help

2002-06-13 Thread Leston Drake
Hey, it worked on another server! I've been working on my local machine's server (localhost), but when I run it from a different web server, it worked fine. Any ideas about which setting(s) may be causing the problem? From my php.ini file: session.save_handler=files session.save_path= C:\PHP\

RE: [PHP] Extracting Variables

2002-06-13 Thread David Freeman
> echo "i = $i"; > for($c=1;$c<=$i;$c++){ > echo "team_number $team_number_$c"; > echo "sub1_$c = $sub1_$c"; > echo "sub2_$c = $sub2_$c"; > echo "sub3_$c = $sub3_$c"; > echo "sub4_$c = $sub4_$c"; > echo "sub5_$c = $sub5_$c"; > } > } Perhaps this: Ech

RE: [PHP] string to array?

2002-06-13 Thread David Freeman
> I have a string something like "10.2.3" > I want to be able to use the "." as a delimiter to reference > the elements (10, 2, and 3). > My thought was to create an array, using "." as the > delimiter. Is there a function that will create an array out > of a string, using a delimiter y

RE: [PHP] confused newbie on PHP and Javascript.

2002-06-13 Thread David Freeman
> I have a JavaScript function that onChange of a list box, > takes the value of an option and grabs data from a MySQL > table. My problem is how do I use the JavaScript var in my > sql statement? Javascript is client-side, php is server-side. The only way to get something that happens i

RE: [PHP] truncating dilema

2002-06-13 Thread David Freeman
> It has just occured to me though that if I'm to list maybe > 100 news items with descriptions it means alot of memory > right because i have 100 items containing: > date > title > text (could be any length) > > I will use su

RE: Re[4]: [PHP] sessions help

2002-06-13 Thread Leston Drake
At 04:35 PM 6/13/2002, you wrote: >Have you tried this on a separate web page to make sure it's not something >server specific? No, but that's a good idea. I will try it. >Here's a script that worked from my computer with register_globals set to on >and off (restarted server between tests for c

RE: Re[4]: [PHP] sessions help

2002-06-13 Thread Lazor, Ed
Have you tried this on a separate web page to make sure it's not something server specific? Here's a script that worked from my computer with register_globals set to on and off (restarted server between tests for confirmation). If this works from your computer, could you resend the code on your

Re[4]: [PHP] sessions help

2002-06-13 Thread Stuart Dallas
On Thursday, June 13, 2002 at 11:07:16 PM, you wrote: > I've stripped the code down to barest bones to try to figure this out: > [getglobal.php] > ... > echo "Node is {$_SESSION['node']}."; > ... > [session.php] > ... > $_SESSION['node'] = "10.2"; > ... > Other than the standard html, head, tit

Re: Re[3]: [PHP] sessions help

2002-06-13 Thread Leston Drake
Yeah, I thought of that too. Same result, though. At 04:16 PM 6/13/2002, you wrote: >Hmm. Okay. Replace $_SESSION with $HTTP_SESSION_VARS and see if that >works. >-Kevin > >- Original Message - >From: "Leston Drake" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Thursday, June 13,

Re: Re[3]: [PHP] sessions help

2002-06-13 Thread Kevin Stone
Hmm. Okay. Replace $_SESSION with $HTTP_SESSION_VARS and see if that works. -Kevin - Original Message - From: "Leston Drake" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 13, 2002 4:07 PM Subject: Re[3]: [PHP] sessions help > I've stripped the code down to barest bo

RE: [PHP] Editor

2002-06-13 Thread Bruce Karstedt
I've been using Homesite - I really like it. Bruce Karstedt President Technology Consulting Associates, Ltd. Tel: 847-735-9488 Fax: 847-735-9474 -Original Message- From: Daniele Baroncelli [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 2:19 PM To: [EMAIL PROTECTED] Subject: [P

Re[3]: [PHP] sessions help

2002-06-13 Thread Leston Drake
I've stripped the code down to barest bones to try to figure this out: [getglobal.php] ... echo "Node is {$_SESSION['node']}."; ... [session.php] ... $_SESSION['node'] = "10.2"; ... Other than the standard html, head, title, body tags and the session_start(), there is no other code. I'm still g

[PHP] Change Password

2002-06-13 Thread Brian V Bonini
Anyone know of a script that will allow a user to change their system/email password form the web on a UNIX system. wither PHP or Perl based? -B -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Code Improvement

2002-06-13 Thread Kevin Stone
Though your code isn't the cleanest I've seen I don't think there is anything inherently wrong with your proceedure. You're just displaying a LOT of information. And more importantly you're displaying this in a browser with HTML tables. I'd put a timer on your code to see how much time the actu

Re: [PHP] RE: GD Questions: Please help.

2002-06-13 Thread Philip Hallstrom
most definitely... I was assuming $id would be a number which would be looked up in a DB somewhere... in any event the realpath() function is your friend here :) On Thu, 13 Jun 2002, Stuart Dallas wrote: > On Thursday, June 13, 2002 at 10:39:51 PM, you wrote: > > if /path/to/image/cache/$id exis

RE: [PHP] Code Improvement

2002-06-13 Thread Lazor, Ed
Why display all 5000 records and 50 fields at once? Typically, you display a sub-set of the row data and page through it to improve performance. Also, you typically display a sub-set of fields and then view individual records for full detail. > -Original Message- > From: Pong-TC [mailto

Re: [PHP] RE: GD Questions: Please help.

2002-06-13 Thread Stuart Dallas
On Thursday, June 13, 2002 at 10:39:51 PM, you wrote: > if /path/to/image/cache/$id exists then >just spit that file back to the browser and exit If you're gonna do this, be sure to check that $id doesn't contain something dangerous such as '../../../../../../../../../../../../../../../etc/pa

Re[3]: [PHP] sessions help

2002-06-13 Thread Stuart Dallas
On Thursday, June 13, 2002 at 10:32:25 PM, you wrote: > Thanks to Julie and Stuart for helping me. > With your direction, I got rid of the warning about the headers by putting > the session_start() at the beginning of the file. > Now I get a different sort of error when I try to retrive the se

Re: Re[2]: [PHP] sessions help

2002-06-13 Thread Kevin Stone
Your problem is here.. > return ($_SESSION['node'] = $node_id); I do not believe that you can both set and return a varaible on the same line. FYI, the variable which you're returning in this function is global.. so there's no reason to return it anyway. Just fill the index and

RE: [PHP] possible to add a "record number" to a query?

2002-06-13 Thread David Freeman
> I would like to have a column returned in a query that tells > you which record I'm looking at? Sort of like an > auto_increment? IOW, the query results would look like: > > record first last > > 1 johndoe > 2 joe blow > 3 carol fisher > > Th

Re[2]: [PHP] sessions help

2002-06-13 Thread Leston Drake
At 03:32 PM 6/13/2002, you wrote: >Thanks to Julie and Stuart for helping me. > >With your direction, I got rid of the warning about the headers by putting >the session_start() at the beginning of the file. > >Now I get a different sort of error when I try to retrive the session >variable: >

  1   2   3   >