[PHP] Hope any body can fix this!!!

2004-01-28 Thread Radwan Aladdin
Hi.. I made the following PHP script.. And every time I try it, it shows an error message... I think there is a wrong with ($LogoutTime - $RightLoginTime'). So please try to fix the error.. What I want to do is to insert a logout time and if (LogoutTime - LoginTime = 20) for example.. then ma

[PHP] Re: Hope any body can fix this!!!

2004-01-28 Thread Pavel Jartsev
Radwan Aladdin wrote: ... I think there is a wrong with ($LogoutTime - $RightLoginTime'). So please try to fix the error.. ... $query4 = "INSERT INTO accounts (Distance) ('$LogoutTime - $RightLoginTime')"; This line should be: $query4 = "INSERT INTO accounts (Distance) VALUES ('$LogoutTime - $R

Re: [PHP] naming a directory after a user-submitted string

2004-01-28 Thread Mike Migurski
>Here's another question, possibly easier. Possibly even bone-headed. > >What kind of checking/filtering/changing do I need to do on a >user-submitted string before I can feel comfortable using it to name a >new directory in the web root on Linux/Apache? Anybody have a quick >Regular Expression t

[PHP] CGI Error -- need some ideas

2004-01-28 Thread Dale
CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. I am getting this error and I can't figure out what is causing the problem. If I hit refresh on the broswer, the page loads just fine. Any ideas??? Thanks, Dale NOTE: RUNNING IIS 6.0 WITH MSSQL 20

[PHP] Cacheing data form PHP script

2004-01-28 Thread Vincent DUPONT
Hi all, I use a HTML menu that is created from multiple database queries. This is powerfull and very extendable. The problem is that the queries have to be executed on every new page or request. Moreover, the menu won't change very often for the users. So I would like to 'cache' the HTML code

[PHP] Re: Cacheing data form PHP script

2004-01-28 Thread rush
"Vincent Dupont" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi all, At the moment, I store the HTML code to display the menu in the $_SESSION['menu_cache']['menu_id'] var. And this works well! The pages are displayed faster when the menu is in the cache, which is the expected resu

[PHP] Re: [PEAR] Re: Cacheing data form PHP script

2004-01-28 Thread Pierre-Alain Joye
On Wed, 28 Jan 2004 10:26:09 +0100 "rush" <[EMAIL PROTECTED]> wrote: > Do you see any other way to 'cache' some content? Take a look at pear::cache or pear::cache_lite and pearweb. pearweb use cache_lite to cache whole pages (when possible). To cache part of a page (or whatever). pear::cache is m

RE: [PHP] [posibleOT] Forcing entering te site thru index.php

2004-01-28 Thread Ralph
The only other way I can think of doing this without sessions is to use $_SERVER['HTTP_REFERER'] to check if page request is coming from an existing page within your site or not. But I don't think this method will work 100% of times. Another approach would probably be to use single entry point con

RE: [PHP] Using unset with $_SESSION

2004-01-28 Thread Ford, Mike [LSS]
On 27 January 2004 15:52, [EMAIL PROTECTED] wrote: > I am trying to find a reliable method to clean out all session > variables and start clean. > > Running PHP 4.3.1 on Win2K developing a web app to run on Linux. > Session cookies are enabled, register globals is off. I access all > session va

RE: [PHP] Using unset with $_SESSION

2004-01-28 Thread Ford, Mike [LSS]
On 27 January 2004 16:20, [EMAIL PROTECTED] wrote: > On 27 Jan 2004 Stuart wrote: > > > In that case, try this... > > > > foreach (array_keys($_SESSION) as $key) > > unset($_SESSION[$key]); > > Yes, I had tried that but forgot to mention it. It does work. > > However, I'm still mystified

[PHP] Re: [PEAR] Re: Cacheing data form PHP script

2004-01-28 Thread rush
"Pierre-Alain Joye" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > ps: Rush can you use quotes in reply? until this morning I was pretty certain that I can, however this last reply and OE proved me wrong :) rush -- http://www.templatetamer.com/ -- PHP General Mailing List (http:/

Re: [PHP] naming a directory after a user-submitted string

2004-01-28 Thread David T-G
Mike & Joey, et al -- ...and then Mike Migurski said... % % >What kind of checking/filtering/changing do I need to do on a % >user-submitted string before I can feel comfortable using it to name a ... % >appreciative. Or is this just a Terrible Idea That Should Never Be % >Contemplated? In gene

RE: [PHP] Tip For The Day

2004-01-28 Thread Jay Blanchard
[snip] >>Its all good, it's like inline braces versus dropped braces and every >>other coding style debate :) There's no winner. > > pfft. Inline braces wins hands down ;p It's on now. Somebody set up the ring for the cage match. Last brace standing at the end wins. ;) [/snip] I think that yo

Re: [PHP] naming a directory after a user-submitted string

2004-01-28 Thread Don Read
On 28-Jan-2004 Joey Manley wrote: > Here's another question, possibly easier. Possibly even bone-headed. > > What kind of checking/filtering/changing do I need to do on a > user-submitted > string before I can feel comfortable using it to name a new directory > in the > web root on Linux/Apache?

[PHP] addslashes & stripslashes

2004-01-28 Thread Will
I’m a little confused with these functions. How I here you ask. Well I thought I understood what they were for: Escaping characters that might cause a problem when you enter your data into a database query. i.e. \ ‘ “   Anyway what is confusing me is, say I have a string which contains

Re: [PHP] addslashes & stripslashes

2004-01-28 Thread Marek Kilimajer
Will wrote: I'm a little confused with these functions. How I here you ask. Well I thought I understood what they were for: Escaping characters that might cause a problem when you enter your data into a database query. i.e. \ ' " Anyway what is confusing me is, say I have a string which contai

[PHP] Re: PHP EDITORS

2004-01-28 Thread Al
Great and it's free. http://phpedit.net John Jensen wrote: Hello everyone. I am new to PhP and MySQL. I was wondering what a good (Or Free) Php Editor is? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] addslashes & stripslashes

2004-01-28 Thread memoimyself
Hello Will, On 28 Jan 2004 at 12:31, Will wrote: > However recently I encrypted some data which I stored in the database. > The string contained a \ which I added slashes to when entered in to > the database. But as the database appears to strips the first slash > off the double slash automatical

Re: [PHP] Googlebot

2004-01-28 Thread Jon Bennett
from google http://www.google.com/webmasters/facts.html Fiction: Sites are not included in Google's index if they use ASP (or some other non-html file-type.) Fact: At Google, we are able to index most types of pages and files with very few exceptions. File types we are able to index include:

RE: [PHP] Using unset with $_SESSION

2004-01-28 Thread trlists
> > Shouldn't unset($_SESSION) work? > > No. The following Caution appears in the manual (at > http://www.php.net/manual/en/ref.session.php#session.examples): > > Caution Do NOT unset the whole $_SESSION with unset($_SESSION) as > this will disable the registering of session variables through t

Re: [PHP] Googlebot

2004-01-28 Thread Jon Bennett
is that it tends to avoid or downgrade URI's with parameters tacked onto the end. Does that go for internal links in your site then ??? news.php?start=10 etc ??? Could be tricky writing dyamic pages then. Thanks, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _

Re: [PHP] PHP EDITORS

2004-01-28 Thread memoimyself
Hello John, On 28 Jan 2004 at 0:10, John Jensen wrote: > Hello everyone. I am new to PhP and MySQL. I was wondering what a good > (Or Free) Php Editor is? If you want something nice and simple to start with, try WinSyntax (http://www.winsyntax.com). If you want a very nice and configurable edi

Re: [PHP] Googlebot

2004-01-28 Thread Stuart
Jon Bennett wrote: is that it tends to avoid or downgrade URI's with parameters tacked onto the end. Does that go for internal links in your site then ??? news.php?start=10 etc ??? Could be tricky writing dyamic pages then. Some spiders will not visit URLs with query strings, some will. Those tha

Re: [PHP] Unix-Apache: running apache as different user

2004-01-28 Thread Lorderon
"Mike Migurski" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > >I have PHP installed on Apache and Unix with several vhosts so each vhost > >has its own user account on Unix. Now when accessing a webpage, Apache > >runs with user httpd.. but I want it to run as the user of the vhost

php-general@lists.php.net

2004-01-28 Thread Diana Castillo
is there any function that will always replace a "&" with a "&" in a string? -- -- Diana Castillo Global Reservas, S.L. C/Granvia 22 dcdo 4-dcha 28013 Madrid-Spain Tel : 00-34-913604039 Fax : 00-34-915228673 email: [EMAIL PROTECTED] Web : http://www.hotelkey.com http://www.destinia.com --

[PHP] Problem with mcrypt_encrypt and mcrypt_decrypt.

2004-01-28 Thread francesco
Hi all, i'm trying to crypt and decrypt password with the code below but i get many warnings Warning: mcrypt_get_iv_size(): Module initialization failed in /web/htdocs/www.automationsoft.biz/home/invio_mail.php on line 36 Warning: mcrypt_create_iv(): Can not create an IV with size 0 or smaller i

php-general@lists.php.net

2004-01-28 Thread David T-G
Diana -- ...and then Diana Castillo said... % % is there any function that will always replace a "&" with a "&" in a % string? You are looking for a function ... A function that will replace an HTML special character ... A PHP function to do this. I shall consult the Great Programmer. Somethin

php-general@lists.php.net

2004-01-28 Thread Aaron Wolski
str_replace("&", "&", $text); > -Original Message- > From: Diana Castillo [mailto:[EMAIL PROTECTED] > Sent: January 28, 2004 9:27 AM > To: [EMAIL PROTECTED] > Subject: [PHP] & > > is there any function that will always replace a "&" with a "&" in a > string? > > -- > -- > Diana Castillo

php-general@lists.php.net

2004-01-28 Thread Stuart
Diana Castillo wrote: is there any function that will always replace a "&" with a "&" in a string? $string = str_replace('&', ' ', $string); -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

php-general@lists.php.net

2004-01-28 Thread Anders Gjermshus
Htmlspecialchars() should do it :) http://www.php.net/manual/en/function.htmlspecialchars.php - anders -Opprinnelig melding- Fra: Diana Castillo [mailto:[EMAIL PROTECTED] Sendt: 28. januar 2004 15:27 Til: [EMAIL PROTECTED] Emne: [PHP] & is there any function that will always replace a

php-general@lists.php.net

2004-01-28 Thread Stuart
Stuart wrote: Diana Castillo wrote: is there any function that will always replace a "&" with a "&" in a string? $string = str_replace('&', ' ', $string); Forgot to mention the htmlentities and htmlspecialchars functions, but they do more than you asked for. -- Stuart -- PHP General Mailing List

php-general@lists.php.net

2004-01-28 Thread David T-G
Stuart, et al -- ...and then Stuart said... % % Diana Castillo wrote: % >is there any function that will always replace a "&" with a "&" in a % >string? % % $string = str_replace('&', ' ', $string); Clearly I must need more coffee, because I completely fail to see how this will satisfy her requ

php-general@lists.php.net

2004-01-28 Thread Jay Blanchard
[snip] > is there any function that will always replace a "&" with a "&" in a > string? $string = str_replace('&', ' ', $string); [/snip] Shouldn't this be $string = str_replace('&', '&', $string); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/u

php-general@lists.php.net

2004-01-28 Thread Stuart
David T-G wrote: Stuart, et al -- ...and then Stuart said... % % Diana Castillo wrote: % >is there any function that will always replace a "&" with a "&" in a % >string? % % $string = str_replace('&', ' ', $string); Clearly I must need more coffee, because I completely fail to see how this will

php-general@lists.php.net

2004-01-28 Thread John Nichel
David T-G wrote: Stuart, et al -- ...and then Stuart said... % % Diana Castillo wrote: % >is there any function that will always replace a "&" with a "&" in a % >string? % % $string = str_replace('&', ' ', $string); Clearly I must need more coffee, because I completely fail to see how this wil

RE: [PHP] addslashes & stripslashes

2004-01-28 Thread Ford, Mike [LSS]
On 28 January 2004 12:31, Will wrote: > I'm a little confused with these functions. How I here you > ask. Well I thought I understood what they were for: > Escaping characters that might cause a problem when you enter > your data into a database query. i.e. \ ' " > > Anyway what is confusing me i

[PHP] __autoload() in PHP4

2004-01-28 Thread Pietuka Krustiņš
Good morning fella, Is there something like __autoload() of PHP5 in PHP4? After using PHP5 for a month, I just can't stand writing those never-ending includes and requires. Any ideas how to simulate an __autoload()? I am not afraid of a little overhead. For those who don't know - if PHP does not

[PHP] Help with a string replacement

2004-01-28 Thread "Miguel J. Jiménez"
Hi, I want to replace a string "" with . [whatever] may be what ever substring possible... ie. I want to replace all occurences that exists being [whatever] a variable expression... Thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

php-general@lists.php.net

2004-01-28 Thread Gerard Samuel
On Wednesday 28 January 2004 09:32 am, Stuart wrote: > Diana Castillo wrote: > > is there any function that will always replace a "&" with a "&" in a > > string? > > $string = str_replace('&', ' ', $string); > Just a heads up on using the above method. If there are more than one & in the string it

[PHP] Fopen and streams

2004-01-28 Thread stryder
Hi, first time poster here. Having some trouble with a line that used to work, but doesn't now. $pg = fopen("http://$ip/mypage";, "r"); Gets me: Warning: fopen(http://10.1.1.233/mypage): failed to open stream: HTTP request failed! And then it spits out the data from that page anyways. What

php-general@lists.php.net

2004-01-28 Thread Jeremy
[snip] >[snip] >> is there any function that will always replace a "&" with a "&" in >a >> string? > >$string = str_replace('&', ' ', $string); >[/snip] > >Shouldn't this be > >$string = str_replace('&', '&', $string); > >? [/snip] I tried this and amazingly it worked! The robustness of php defie

php-general@lists.php.net

2004-01-28 Thread Tom
Gerard Samuel wrote: > On Wednesday 28 January 2004 09:32 am, Stuart wrote: > >> Diana Castillo wrote: >> >>> is there any function that will always replace a "&" with a "&" in a >>> string? >> >> >> $string = str_replace('&', ' ', $string); >> > > > Just a heads up on using the above method. > If

php-general@lists.php.net

2004-01-28 Thread Stuart
Gerard Samuel wrote: On Wednesday 28 January 2004 09:32 am, Stuart wrote: Diana Castillo wrote: is there any function that will always replace a "&" with a "&" in a string? $string = str_replace('&', ' ', $string); Just a heads up on using the above method. If there are more than one & in the stri

Re: [PHP] Googlebot

2004-01-28 Thread Brian V Bonini
On Wed, 2004-01-28 at 08:34, Jon Bennett wrote: > > is that it tends to avoid or downgrade URI's with parameters tacked > > onto > > the end. > > Does that go for internal links in your site then ??? > > news.php?start=10 etc ??? Could be tricky writing dyamic pages then. > mod_rewrite is your

Re: [PHP] __autoload() in PHP4

2004-01-28 Thread John W. Holmes
From: "Pietuka Krustins" <[EMAIL PROTECTED]> > Is there something like __autoload() of PHP5 in PHP4? > After using PHP5 for a month, I just can't stand writing those never-ending > includes and requires. Any ideas how to simulate an __autoload()? I am not > afraid of a little overhead. > > For tho

Re: [PHP] Unix-Apache: running apache as different user

2004-01-28 Thread Martin Luethi
Wed, 28 Jan 2004 16:11:59 +0200 Lorderon <[EMAIL PROTECTED]>: > "Mike Migurski" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> >I have PHP installed on Apache and Unix with several vhosts so each vhost >> >has its own user account on Unix. Now when accessing a webpage, Apache >>

Re: [PHP] Tip For The Day

2004-01-28 Thread Cesar Cordovez
Jay Blanchard wrote: I think that you meant to "its already been broughten!", didn't you? Did you know that you will find that bracing style has been debated since the days of FORTRAN? Oh! Fortran 77! I remember those times! =) And I still think inline braces wins hands down!!! Cesar -- PHP

[PHP] Help: arrays in a class

2004-01-28 Thread jazzman
Hi all, I'm having some trouble here and I hope you can help. I'm writing a class for PHP to help track includes in a c++ source file. My class has 3 member variables: a filename file contents array of files that file includes The class definition looks like this class

[PHP] index page not running and other woes (0t?)

2004-01-28 Thread Ryan A
Hi, I think this is a bit off topic, but i'm sure some of you guys must be running ensim so might be able to help me. We reciently took a dedicated server to work with, it came with ensim installed, its a Linux machine P4 2.6 running Apache. Problem: 1)As I go to the IP address assigned to our bo

Re: [PHP] Help: arrays in a class

2004-01-28 Thread John Nichel
[EMAIL PROTECTED] wrote: Here's the problem. In ParseFile I call the function: array_push($this->$includedFiles, $ifName); Here you have it ending in an 's' where $ifName is the name of an include file I found in the code. However, I get an error stating the first argument must be an arra

Re: [PHP] Help: arrays in a class

2004-01-28 Thread John W. Holmes
From: <[EMAIL PROTECTED]> > class clsfTreeNode > { > > //member variables > var $fName; > var $fData; > var $includedFiles; > > //constructor > function clsfTreeNode( $fileName ) > { > $this->$fName = $fileName; > $this->$fData = file_get_contents($this->$fName); > > $this->ParseFile(); You ha

[PHP] chunk_split();

2004-01-28 Thread Benjamin Trépanier
Title: chunk_split(); Hi, I am using the chunk_split(); function to separe a long long text on differents pages. At this time, I can split the string into x sections of 2000 characters. Now I need to show only the first 2000 . when user click on page #2, it’s reloading and show the next 200

Re: [PHP] Help: arrays in a class

2004-01-28 Thread John Nichel
John W. Holmes wrote: You have an extra $ sign in your variables names. $this->fName instead of $this->$fName Not sure if that'll solve all your problems, but it's a start. ---John Holmes... Oh, sure. Point out what I missed in my eval. ;) -- By-Tor.com It's all about the Rush http://www.b

[PHP] Zend Studio ESC key issue?

2004-01-28 Thread Gryffyn, Trevor
First, let me apologize for this not being a specific PHP question, but I can't find the answer and I'm hoping someone else here has run into this. Maybe I'm just blind, blond or stupid today. :) In Zend Studio (Zend Development Environment) for Windows (on Windows 2000 fyi), when I hit the ESC k

Re: [PHP] chunk_split();

2004-01-28 Thread Martin Luethi
maybe its better to use fread() and fseek() 2000 bytes should be 2000 characters in a textfile g. tinu Wed, 28 Jan 2004 11:20:32 -0500 Benjamin TrÃpanier <[EMAIL PROTECTED]>: Hi, I am using the chunk_split(); function to separe a long long text on differents pages. At this time, I can split th

Re: [PHP] Googlebot

2004-01-28 Thread Michael Mulligan
Googlebot visits my site occasionally and follows a lot of my PHP links with long query strings... -Mike __ Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread! __ On Jan 28, 2004, at 8:34 AM, Jon Bennett wrote: Does that go

RE: [PHP] Tip For The Day

2004-01-28 Thread Ford, Mike [LSS]
On 28 January 2004 15:52, Cesar Cordovez wrote: > Jay Blanchard wrote: > > I think that you meant to "its already been broughten!", didn't > > you? Did you know that you will find that bracing style has been > > debated since the days of FORTRAN? > > > Oh! Fortran 77! I remember those times! =)

Re: [PHP] chunk_split();

2004-01-28 Thread Martin Luethi
Wed, 28 Jan 2004 11:41:56 -0500 Benjamin Trépanier <[EMAIL PROTECTED]>: On 28/01/04 11:29, "Martin Luethi" <[EMAIL PROTECTED]> wrote: maybe its better to use fread() and fseek() 2000 bytes should be 2000 characters in a textfile g. tinu Wed, 28 Jan 2004 11:20:32 -0500 Benjamin Trépanier <[EMA

Re: [PHP] Googlebot

2004-01-28 Thread Mat Harris
On Wed, Jan 28, 2004 at 11:51:06 -0500, Michael Mulligan wrote: > Googlebot visits my site occasionally and follows a lot of my PHP links > with long query strings... same here, google has been indexing my php site for over 3 years now :) -- A Pope has a Water Cannon.

[PHP] Still error messages!!

2004-01-28 Thread Radwan Aladdin
Hello all.. This is the PHP code : And this is the mySQL structure : # phpMyAdmin MySQL-Dump # version 2.2.3 # http://phpwizard.net/phpMyAdmin/ # http://phpmyadmin.sourceforge.net/ (download page) # # Host: localhost # Generation Time: Jan 28, 2004 at 08:27 PM # Server version: 3.23.47 # PHP V

RE: [PHP] Still error messages!!

2004-01-28 Thread Jay Blanchard
[snip] So where are the errors? [/snip] Good question. You have not shown us the error message. Please show us and we can help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Problem with mcrypt_encrypt and mcrypt_decrypt.

2004-01-28 Thread Jas
[EMAIL PROTECTED] wrote: Hi all, i'm trying to crypt and decrypt password with the code below but i get many warnings Warning: mcrypt_get_iv_size(): Module initialization failed in /web/htdocs/www.automationsoft.biz/home/invio_mail.php on line 36 Warning: mcrypt_create_iv(): Can not create an IV w

Re: [PHP] chunk_split();

2004-01-28 Thread John W. Holmes
chunk_split();From: Benjamin Trépanier > I am using the chunk_split(); function to separe a > long long text on differents pages. > At this time, I can split the string into x sections of > 2000 characters. > > Now I need to show only the first 2000 . > when user click on page #2, it's reloading

Re: [PHP] Still error messages!!

2004-01-28 Thread John W. Holmes
From: "Radwan Aladdin" <[EMAIL PROTECTED]> > So where are the errors? In your code or database, I'm sure of it. In other words, why don't you tell us what error message your getting, the line number, etc. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visi

Re: [PHP] Still error messages!!

2004-01-28 Thread Radwan Aladdin
Hehehehehe :) sorry I forgot that :) "Query error: You have an error in your SQL syntax near '0') WHERE UserName= AND Password=)' at line 1" Also when I put the right UserName and Password.. the same error!! So also there are sme other errors.. please see the whole script.. What I'm trying to d

Re: [PHP] Still error messages!!

2004-01-28 Thread David OBrien
At 12:08 PM 1/28/2004, Radwan Aladdin wrote: Hello all.. This is the PHP code : include("Config.php"); $link = mysql_connect("$user_hostname", "$user_username", "$user_password"); mysql_select_db("$user_database", $link); $UserName = $_GET['UserName']; $Password = $_GET['Password']; $LogoutTim

Re: [PHP] Still error messages!!

2004-01-28 Thread Radwan Aladdin
Thank for your reply.. But I'm not trying to echo these queries.. What I'm trying to do is : To UPDATE a value in the database (Login_Time and Logout_Time) and then caculate the distance between them and put it in (Distance) field.. then after that program the PHP file and put in it a LessonLimi

php-general@lists.php.net

2004-01-28 Thread Gerard Samuel
On Wednesday 28 January 2004 10:23 am, Stuart wrote: > Not from where I'm sitting [PHP 4.3.3RC1 (cli) (built: Jun 21 2003 > 23:40:27) on FreeBSD built from ports]. Code... > Hey, as least we can agree with something. FreeBSD :) > print str_replace('&', '&', 'Here is one & and here is another

RE: [PHP] Still error messages!!

2004-01-28 Thread Damon Hill
Correct Radwan, you are NOT trying to echo the queries to the screen. However, what David is trying to teach you is simply debugging techniques. By echoing the actual query that the PHP pareser is using, you can see if it is indeed what you want it to be. This way, you can debug the code yourself,

Re: [PHP] Variables not working!

2004-01-28 Thread Alvaro Zuniga
Try this for a generic fix if it is the globals issue: Place this somewhere to set to TRUE or FALSE when needed $GLOBAL_FIX = TRUE; use an include on every script: if($GLOBAL_VARS_FIX) { if( phpversion() >= '4.2.0' ) { extract($_POST); extract($_GET); extract($_SERVER);

Re: [PHP] Still error messages!!

2004-01-28 Thread Radwan Aladdin
I made that.. but there is something strange!! I SELECTED field from the database.. but it is not showing what it contains!! This is what is shown on the screen : UPDATE accounts SET LogoutTime=1075313199SELECT LoginTime,Distance,LessonNumber FROM accounts WHERE UserName='' AND Password=''UPDA

[PHP] (WEIRD problem) Not following directories!!! (0t)

2004-01-28 Thread Ryan A
Hi, Heres a totally weird problem, I created some folders on our server (which we are accessing only via ip as the domain has not been resolved) but I get an error when i try to access the folder(s)! eg: (I created this folder) ryan and i try to access it like this: http://208.234.29.220/ryan/ a

Re: [PHP] Session time-out value

2004-01-28 Thread Pushpinder Singh
Yes, I have used a .htaccess file in a Web Directory to prevent http access to its contents. Thanks again !! -Pushpinder Singh On Saturday, January 24, 2004, at 12:59 AM, Jason Wong wrote: On Saturday 24 January 2004 05:46, Pushpinder Singh wrote: I tried to keep a .htaccess file in the D

Re: [PHP] (WEIRD problem) Not following directories!!! (0t)

2004-01-28 Thread Ryan A
Hey Andrew, > First, note that that is an apache problem, not PHP. Yep, thats why I put the "Ot" in the subject line but since you cant have PHP without a webserver and apache is the most popular on the list or the net...I was hopeing someone else had this problem and could guide me > In htt

Re: [PHP] Still error messages!!

2004-01-28 Thread David OBrien
I assume you are using another page with a form to enter the username and password? If so: add as the first line of your script right after the phpinfo(); Run your application, scroll to the bottom and look at the "php variables" and make sure that your are asking for $_GET["Username"] and $

php-general@lists.php.net

2004-01-28 Thread John W. Holmes
From: "Gerard Samuel" <[EMAIL PROTECTED]> > You're absolutely correct. I jumped the gun way too early. > My experience with replacing & with & is that if the content already > contains entity content, for example   > Running str_replace will mess them up. Depends how you define "mess them up"...

Re: [PHP] Still error messages!!

2004-01-28 Thread Radwan Aladdin
I'm using the GET method.. And it is right.. it shows the correct GET method.. the problem in is in the Destance value.. it is not updating this value to the database.. or it is wrong.. every time = 0 So what is the error? Regards.. - Original Message - From: "David OBrien" <[EMAIL PRO

Re: [PHP] Still error messages!!

2004-01-28 Thread John W. Holmes
From: "Radwan Aladdin" <[EMAIL PROTECTED]> > I made that.. but there is something strange!! It's strange you can't follow instructions... > I SELECTED field from the database.. but it is not showing what it contains!! > > This is what is shown on the screen : > > UPDATE accounts SET LogoutTime=

Re: [PHP] Still error messages!!

2004-01-28 Thread David OBrien
In your script you have $RightLoginTime = 'LoginTime'; $Distance = 'Distance'; $LessonNumber = 'LessonNumber'; $LessonsTimeLimit = "30"; So $Distance is a string equaling "Distance" and $LessonNumber = "LessonNumber" How are you performing math on a string? -Dave At 01:42 PM 1/28/2004, Radwan Alad

Re: [PHP] Help: arrays in a class

2004-01-28 Thread jazzman
On Wed, 28 Jan 2004 [EMAIL PROTECTED] wrote: > in php you have to access a member variable (or methods) with: > $this->varname (without the "$") > > e.g.: $this->includedFile = array(); > > hope this helps AHA! I think that's it. The comment someone sent to me (Sorry, i'm awful with names) abo

Re: [PHP] Still error messages!!

2004-01-28 Thread Radwan Aladdin
But I mean by $RightLoginTime = 'LoginTime'; the selected field from the database (LoginTime).. First I selected the LoginTime from the database and now I'm trying to name a variable for it to use it.. So what is the correct code? Regards.. -- SASSI

Re: [PHP] Still error messages!!

2004-01-28 Thread David OBrien
I believe I'd start here http://www.php.net/manual/en/function.mssql-fetch-row.php You get the db result from your script but you do nothing with it in your script A whole lot more reading and coding you need to accomplish. Good Luck -Dave At 01:54 PM 1/28/2004, Radwan Aladdin wrote: But I mea

[PHP] sending a hex string as it is?

2004-01-28 Thread Khoa Nguyen
$var = 0x8180; How do I send $var to the browser as it is? In other words, if sniffing on the wire, I should see 8180, not 38 31 38 30. Thanks for your help. Khoa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] sending a hex string as it is?

2004-01-28 Thread David OBrien
At 02:03 PM 1/28/2004, Khoa Nguyen wrote: $var = 0x8180; How do I send $var to the browser as it is? In other words, if sniffing on the wire, I should see 8180, not 38 31 38 30. I think http://www.php.net/manual/en/function.strval.php would work here -Dave Thanks for your help. Khoa -- PHP Gene

Re: [PHP] Still error messages!!

2004-01-28 Thread John W. Holmes
From: "Radwan Aladdin" <[EMAIL PROTECTED]> > But I mean by $RightLoginTime = 'LoginTime'; > the selected field from the database (LoginTime).. First I selected the > LoginTime from the database and now I'm trying to name a variable for it to > use it.. > > So what is the correct code? You end up

RE: [PHP] sending a hex string as it is?

2004-01-28 Thread Khoa Nguyen
Thanks for the info Dave, but I still can't make it work: In both cases, I see 3136 (ASCII encoded of string "16") on the wire :-( Any ideas? Khoa -Original Message- From: David OBrien [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 28, 2004 2:08 PM To: Khoa Nguyen; [EMAIL PROTEC

php-general@lists.php.net

2004-01-28 Thread Gerard Samuel
On Wednesday 28 January 2004 01:35 pm, John W. Holmes wrote: > Depends how you define "mess them up"... If you want to display   > literally on a web page, then you need to write   in the source. > So this may not be messing things up but rather preparing them to be shown > on a web page, lite

RE: [PHP] Making Graph / Chart

2004-01-28 Thread unkno me
--- Ralph Guzman <[EMAIL PROTECTED]> wrote: > Take a look at jpgraph: > > http://www.aditus.nu/jpgraph/ > Great! That's exactly what I want. Now, after I read the installation instruction for JPGraph, I notice I must have built PHP with GD support to use the functionality. The problem is that my

Re: [PHP] Still error messages!!

2004-01-28 Thread John Nichel
Radwan Aladdin wrote: So where are the errors? Waiting your help please.. Regards.. What's the error message??? -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Still error messages!!

2004-01-28 Thread John Nichel
David OBrien wrote: I believe I'd start here http://www.php.net/manual/en/function.mssql-fetch-row.php Or here even http://www.php.net/manual/en/function.mysql-fetch-row.php ;) -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To

[PHP] Performance of multidimensional arrays vs many variables

2004-01-28 Thread John Schulz
I'm planning to use a very large multidimensional array to store data for grouping quantities of Products. This information needs to be carried from page to page in a session. Here's a part of the array's hierarchy for an example: grouping (array) - owner => 'name' - message => 'text' - packa

Re: [PHP] Still error messages!!

2004-01-28 Thread Radwan Aladdin
Now I fixed the error message.. but the problem is in "Distance = 0" always.. because the LoginTime is a string.. I fetch it but the same thing!! This is the new script : So why it is making the Distance value = 0 and it doen't update the value in the database. (Because it must update t

[PHP] working with files

2004-01-28 Thread tony
hi, i have problem with writing a reading to file i want to write emails in files. like this [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] etc.. this is how I write to the file $handle = fopen($filename, "a"); fwrite($handle,"$email\n",128); fclose($handle); ok it writes everything

Re: [PHP] working with files

2004-01-28 Thread Matt Matijevich
replace "); } while (true); fclose($handle); ?> with this \n"); } while (true); fclose($handle); ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: working with files

2004-01-28 Thread DvDmanDT
Did you try file(); ? -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com "Tony" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] > hi, > > i have problem with writing a reading to file > i want to write emails in files. like this > [EMAIL PROTECTED] > [EMAIL PROTECTED

Re: [PHP] sending a hex string as it is?

2004-01-28 Thread DvDmanDT
Did you consider following? $var="\x10"; ? Or dechex();? -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com "Khoa Nguyen" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] Thanks for the info Dave, but I still can't make it work: In both cases, I see 3136 (ASCII enc

Re: [PHP] Still error messages!!

2004-01-28 Thread David OBrien
At 02:45 PM 1/28/2004, Radwan Aladdin wrote: Now I fixed the error message.. but the problem is in "Distance = 0" always.. because the LoginTime is a string.. I fetch it but the same thing!! This is the new script : phpinfo(); include("Config.php"); $link = mysql_connect("$user_hostname", "$user

[PHP] Re: working with files

2004-01-28 Thread tony
I'm new to php, and i tried file() no luck $lines = file('$filename'); foreach ($lines as $line_num => $line) { print ("$line"); } thanx for the help "Dvdmandt" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Did you try file(); ? > > -- > // DvDmanDT > MSN: dvdmandt¤hotmail.co

RE: [PHP] sending a hex string as it is?

2004-01-28 Thread David OBrien
At 02:17 PM 1/28/2004, Khoa Nguyen wrote: Thanks for the info Dave, but I still can't make it work: $var = "0x" . dechex(strval($var)); is about the only way I could get it to show 0x10 instead of 16 -Dave ?> In both cases, I see 3136 (ASCII encoded of string "16") on the wire :-( Any ideas?

[PHP] Re: Performance of multidimensional arrays vs many variables

2004-01-28 Thread Eric Bolikowski
Hi John If you have a large number of Users using this system, your save map for sessions will grow in space, using some resources If it's very large pieces of information, i would advise you to store this info in a database. That's doomed to be more effective. Eric "John Schulz" <[EMAIL PROTEC

  1   2   >