[PHP] Classes

2003-03-28 Thread Donahue Ben
I have a ClassA file and a ClassB file stored in separate directories. I am trying to get ClassB to initiate a ClassA object. But since they are stored in seperate directories I get an error. So I tried including the ClassA file in ClassB constructor: function ClassB() { include("../A/ClassA.

[PHP] $_SESSION

2002-11-12 Thread Donahue Ben
I have some code that looks like this: if(!session_is_registered('errors')) session_register('errors'); but i want to do this using the $_SESSION, i tried doing it this way if(!isset($_SESSION['errors'])) session_register('errors'); but when i echo(isset($_SESSION['errors'])) it prints fals

[PHP] mysql DECODE question

2002-11-10 Thread Donahue Ben
SELECT DECODE(ENCODE('password', 'sec'), 'sec') -> password When I try: SELECT DECODE(ENCODE('password', 'sec'), 'SUBSTRING("secret",1,3)'); or without quotes around SUBSTRING function This does not produce the same output, i am not sure what the problem is. Ben

[PHP] header function

2002-11-09 Thread Donahue Ben
I am using the header function what i have is this: header("Location: http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/".$relative_url $relative_url is a php file when i run this script with this header function in it, i get an error saying:"Redirection limit for this URL has excee

[PHP] Image problem

2002-10-09 Thread Donahue Ben
I upload an image. Once I upload this image using the is_uploaded_file function, then writing this image file using the copy function. Everything seems to work fine. When i try to update (that is uploading a new file and saving it with the same name as the first file created) it shows the first

[PHP] uploading files

2002-10-07 Thread Donahue Ben
I am uploading a gif file using is_upload_file($filename) function. I save the file with a file name img1.gif. It seems to work fine. But when I delete the file img1.gif then upload a different gif file and save it as img1.gif, it displays the first image i uploaded not the most recent one, why

[PHP] dynamic website

2002-09-25 Thread Donahue Ben
I have a general question of a dynamic website using PHP4 and mysql database. If there are many, many users visiting a dynamic website at once, will it cause the database to be bogged down with so many users visiting the website? If so, how do you around this problem. Thanks, Ben

[PHP] fopen()

2002-09-19 Thread Donahue Ben
I have a php script that tries to write files in a particular directory. When the script writes files the ownership is "apache". The problem I have is the particular directory that the script is trying to create files in, it cannot, because it does not own that directory and it is not part of th