[PHP] Re: function over loading?
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Kris Vose) wrote: Can you practice function over-loading in php? Kris No you cannot overload in PHP. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Passing Variables with register_globals Off?
I've noticed with the release of PHP 4.2.0 that the register_globals has been turned off by default. While this is a wonderful thing for security it makes passing data between pages difficult link to link. While I am familiar with using sessions I was wondering if there were any tricks to passing data between pages using links like you would in this example. http://blalba.com/test.php?db=camperboy With the release of PHP 4.2.0 and register globals being off this no longer works. My menus are driven by posted variables and I would like to figure out a way to both pass the data but be secure about it too. Any help would be great thanks!. -Smileyq -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Mailing to numerous with mail()
You can do two things.. First you can use $to = [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]; or you could use a loop such as for or while to mail to each address using a function or not whatever way you wanted to. In article 009a01c1eb9c$9b5cf2b0$6501a8c0@gandalf, [EMAIL PROTECTED] (David Orn Johannsson) wrote: Im trying to send an email useing mutible email addresses, could any one tell me why this isnt working, it works when I only use one address ($to = [EMAIL PROTECTED]) but not when I use the following code. $to = [EMAIL PROTECTED], ; $to .= [EMAIL PROTECTED] . , ; $to .= jonmundur@ mail.is; $subject = Subject; $body = Body; mail($to, $subject, $body, From: [EMAIL PROTECTED] ); http://www.atom.is/ Davíð Örn Jóhannssson Vefforritari Atómstöðin hf. Garðastræti 37 101 Reykjavík sími: 595-3643 fax: 595-3649 mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] http://www.atom.is/ http://www.atom.is -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] session_start() times and resets?
I have one question that I've been working about. When you setup a session to last a particular time say 1 week. If the user comes back to that page because the week is over to reset the session does the user then at that time reset the timer to yet another week. I'm trying to figure out a way to set something like this up so that if they choose not to come back for a period of time the session will delete but if they do come back it will just reset for another week . If i'm just blabbing at the mouth and this doesn't make any sense let me know. Thanks for the help. --Smileyq -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Calling pg_connect from a class included..
I have recently been trying to create a class called Database with methods inside it to ease my coding with web applications. I've noticed though when I create an object from the class like $x = new Database(); Then try to call the connectDB() method (function we call it in PHP) like so $x-connectDb(bla bla bla bla); I get the error message that the function cannot be found as if it is for some reason looking in the class itself for a function of pg_connect when it should be using the PHP libriaries instead. Anybody else run into this problem or know a way to fix it. Thanks --- Sloan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: constructor in php4?
Well its going to execute from the class in which you created the object thats how OOP works. In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Bob) wrote: the manual says:the function A will be called. in fact, the function B is called. why? my config : win98/pws2/php411(CGI) ?php class A { function A() { echo I am the constructor of A.br\n; } function B() { echo I am a regular function named B in class A.br\n; echo I am not a constructor in A.br\n; } } class B extends A { function C() { echo I am a regular function.br\n; } } // This will call B() as a constructor. $b = new B; ? thaks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Classes??
yes you can put as many classes as you want inside a file doesn't matter. In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Gerard Samuel) wrote: Maybe a simple question. But can one file contain 2 or more classes?? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Calling pg_connect from a class included..
Okay well I answered my own dumb question on this one the server on which I was running these on did not have postgresql support built in but now I'm running into another problem. When I try to disconnect from the server using pg_close in a method(function) I can't seem to find out which link to use because I called the connection with a method also. Any ideas? Below is the code to the class ? // Database.class /* This class will specifiy options and methods you can use to connect to a databaseserver and use the methods to pull data connect and insert or delete data */ class Database { var $connection; function Database() { print (In Database Constructorbr); } // end Database Constructor function connectDb($host,$user,$dbname,$pw) { print (Starting Database connection...br); $connection = pg_connect(host=$host user=$user dbname=$dbname password=$pw); return $connection; } // end connectDb method function freeResult($result) { pg_freeresult($result); } // end freeResult method function disconnectDb($con) { print (brbrClosing Connection...); pg_close($con); } // end disconnectDb method }// end class Database In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Smileyq) wrote: I have recently been trying to create a class called Database with methods inside it to ease my coding with web applications. I've noticed though when I create an object from the class like $x = new Database(); Then try to call the connectDB() method (function we call it in PHP) like so $x-connectDb(bla bla bla bla); I get the error message that the function cannot be found as if it is for some reason looking in the class itself for a function of pg_connect when it should be using the PHP libriaries instead. Anybody else run into this problem or know a way to fix it. Thanks --- Sloan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Quick File_Upload Example?
After reading about file uploading on the PHP website it doesn't actually give an example to use for testing purposes. Can somebody provide me with a very simple and basic file upload example that I can start from and work with. Thanks for any help ahead of time. -Smileyq -- 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]
[PHP] Getting a script to download files from an ftp server?
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 the php script to download the file. I've been messing around with it but can't seem to get it to work. As an example I've sending the request from the previos page like this. page.php?dir=blablafile=downloadme.tar.gz . This is then sent to the php script and I cant' get it to download correctly. I'm looking for it to pop up the download manager and download it that way instead of opening it up in the browser. I'm at a loss here. Thanks.. -- 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]
[PHP] Assigning PHP Session ID's as cookie with a time set to it?
Hello all, While everything seems to be working fine in my pages I would really like to learn to how set up sessions id's a different way other than at the begining of each session. Right now it assigns a session ID per session with the cookie value of PHPSESSID. Is there a way I can set the value of the cookie to say ID or SID and give it a time for expiration so that I can authenticate against session id's and uses user preferences even when their browsers are closed. Any help would be greatly appreciated. Thanks guys.. -- 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]