[PHP] random numbers

2002-11-11 Thread Tamas
Hi! I'm using the following method to generate 5 random lottery numbers: /* srand is not important since php v>=4.2.0 */ $numbers = range (1,90); $x = array_rand ($numbers, 5); foreach ($x as $v) echo "{$numbers[$v]} "; It works fine, except the first query: php may restart the random numbers, if

Re: [PHP] random numbers

2002-11-12 Thread Tamas
eless php functions, that use random numbers adjusted to the simple srand() such as shuffle()) Tamas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to detect a PHP script time-out?

2003-01-08 Thread Tamas Arpad
On Wednesday 08 January 2003 06:42, Jean-Christian Imbeault wrote: > Timothy Hitchens ) wrote: > > Issue... as I said before the register shutdown won't work because: > > > > - output from the shutdown is not visible nor do you have access to some > > variables > > You are right. From the manual: >

Re: [PHP] How to detect a PHP script time-out?

2003-01-09 Thread Tamas Arpad
> Cool! I just tested it out and it works. At lest under PHP 4.3.0 and > Apache 1.3.26. > > But according to the bug report this functionality may change in the > future and a new function apache_register_shutdown() might replace the > current one ... > > The current functionality is *not* what is

Re: [PHP] session_destroy problem

2003-01-10 Thread Tamas Arpad
On Friday 10 January 2003 17:39, Scott Fletcher wrote: > > Javascript has a function for performing actions on window close > That would work only if the webserver IP address is '127.0.0.1' (local > machine), but not any other IP address. Because of the ACK synchrious > communication that get

Re: [PHP] session_destroy problem

2003-01-13 Thread Tamas Arpad
On Monday 13 January 2003 15:14, Scott Fletcher wrote: > Let us know how it goes... The unload event had been tried also. The > javascript have been running for a while but the network communication is a > bit tricky, it haven't worked well. Sorry, maybe I missed or forgot the original problem. I

Re: [PHP] session_destroy problem

2003-01-14 Thread Tamas Arpad
On Monday 13 January 2003 18:09, Scott Fletcher wrote: > It's no problem. We're all very interesting in finding out what can work. > > Maybe I can help with one of this problem. The Gecko browser does have the > option of blocking the opening of hte unrequest window which is maybe why > yours doe

Re: [PHP] Re: Persistent global data ?

2003-01-14 Thread Tamas Arpad
> So this is the only way I guess ... > > Do you propose to serialize() the objects in the tree and write that data > into a shared memory block, and then deserialize them at the beginning of > each script that needs the data back into objects ? I would think that that > would impose the same perfo

[PHP] Vulvan Logic SRM - does anyone use it?

2003-02-10 Thread Tamas Arpad
Hi, I'm thinking about using SRM application server for storing cached data. But I have to convince my customers that it's stable enough and is ready to use in production environment. Is it considered stable enough to use in such applications? As I see it hasn't been maintained for at least half

Re: [PHP] Vulvan Logic SRM - does anyone use it?

2003-02-10 Thread Tamas Arpad
On Monday 10 February 2003 16:03, Derick Rethans wrote: > On 10 Feb 2003, Tamas Arpad wrote: > > I'm thinking about using SRM application server for storing cached data. > > But I have to convince my customers that it's stable enough and is ready > > to use in pr

[PHP] how fast is Vulcan Logic SRM and unix sockets

2003-02-22 Thread Tamas Arpad
Hi, The question is mainly for the developers of SRM, but I'm sure there are others who use it. I'm implementing a caching method where cached data is stored in hashes. Now it works with file storage, files' names are the keys and the values are stored in within the files. I'm considering making

[PHP] http benchmark tools

2003-03-04 Thread Tamas Arpad
Hi, I'm searching for a good http benchmark tool. Of course I found some, but don't know them and don't know which one to choose. I found JMeter slow, in other aspects it would be perfect. Used httperf before, but I need more complicated test cases. I'd like to simulate visitors who first go to

Re: [PHP] http benchmark tools

2003-03-04 Thread Tamas Arpad
On Tuesday 04 March 2003 17:43, Jason k Larson wrote: > How about Apache Bench? > > http://httpd.apache.org/docs/programs/ab.html It's really a cool program, but too simple. I need to simlute requests that are normally made by visitors, not just stress one url. For example: main page->click on a c

Re: [PHP] http benchmark tools

2003-03-04 Thread Tamas Arpad
Experimenting with it, thanks! Arpi > This is what I use -> > http://www.joedog.org/siege/index.shtml > > Tamas Arpad wrote: > >Hi, > >I'm searching for a good http benchmark tool. Of course I found some, but > >don't know them and don't

Re: [PHP] Get HTML data from an URL

2002-10-28 Thread Foldenyi Tamas
> I need to know if there is a way to get HTML data from an URL. http://www.php.net/manual/en/function.fopen.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Keeping "Secrets" in PHP Files

2002-07-01 Thread Tamas Arpad
On Sunday 30 June 2002 09:52, Justin French wrote: > on 29/06/02 3:20 AM, Tamas Arpad ([EMAIL PROTECTED]) wrote: > >> I was thinking if you use 90 character long filenames, assuming you > >> only use the letters of the alphabet and the digits then you would > >>

Re: [PHP] Including files & variables ...

2002-01-03 Thread Tamas Arpad
On Wednesday 02 January 2002 20:43, you wrote: > What you need to do is simply set the variables before you include > the script. > > When you include a script with include() or require(), they fall > into the same namespace as the include() or require() function that > called them. I read that in

Re: [PHP] RE: nested includes

2002-01-03 Thread Tamas Arpad
On Thursday 03 January 2002 13:36, Tim Ward wrote: > Include will act relative to the path of the script not the > included file that the include is in. > > If you have an include in a file which is itself included and which > isn't always called from files in the same directory you need to > make

Re: [PHP] PHP Doesn't Crash but show blank page

2002-01-03 Thread Tamas Arpad
> I'm having issues with my php pages. When I have errors, Instead of > crashing or showing errors, the browser shows a blank page. > PHP does not report the error. > My php.ini is configured as > error_reporting = > E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR|E_USER_ERROR|E_USER_WARNING|E_ >USER_NOTICE

Re: [PHP] session data vs cookie data

2002-01-30 Thread Arpad Tamas
> > Do you null the user if the IP changes? IPs can change > > during a user's > > session, so I wouldn't base the validity of the session > > solely based on IP. > When that happens a user has to relogin. No data will be lost. Relogin? Huh, I'd never visit a site where I have to login on every

[PHP] register_shutdown_function vs require

2002-02-19 Thread Arpad Tamas
Hi, I'm trying to make some kind of caching system that first delivers the old page, and then regenerate the new one "in the background". I achieved this with register_shutdown_function(). The registered function starts the real work, the normal php script just delivers the old page (of course

Re: [PHP] register_shutdown_function vs require (with pseudocode example)

2002-02-19 Thread Tamas Arpad
Hi again, I read my email back and found a little hard to understand :)), so I thought a code exmplae might help. It's just pseudo code for explaining how my cache works: //simplified "main" code if page is in cache { deliver the old one register_shutdown_function("regenerate")

Re: [PHP] register_shutdown_function vs require (with pseudocode example)

2002-02-20 Thread Arpad Tamas
Hi, No one has any idea on this topic? Or the question wasn't clear? Thanks, Arpi > Hi again, > I read my email back and found a little hard to understand :)), so > I thought a code exmplae might help. > It's just pseudo code for explaining how my cache works: > > //simplified "main" code

Re: [PHP] changed behavior of shutdown-registered function in 4.0.x->4.1.x (conn. handling)

2002-06-03 Thread Tamas Arpad
Hi again, Joseph answered this on the dev list (http://lists.php.net/article.php?group=php.dev&article=84800), thanks. Arpi On Monday 03 June 2002 17:57, you wrote: > Hi, > I use register_shutdown_function to regenerate my content-cache's > data after the old page were sent. In 4.0.6 t

[PHP] changed behavior of shutdown-registered function in 4.0.x->4.1.x (conn. handling)

2002-06-03 Thread Tamas Arpad
Hi, I use register_shutdown_function to regenerate my content-cache's data after the old page were sent. In 4.0.6 there was no problem with it, the connection was closed after the normal script is finished, and before the shutdown_registered function is started (which does the real work). So I

[PHP] some kind of "library loader"

2002-04-03 Thread Arpad Tamas
Hi Everyone! I have an idea, but I don't know how to realise it, if it can be at all. We have a relatively big system, with 52k lines of php code without much html, and many classes (1138) that depend on each other. And I think I don't need to say that php parses the code somewhat slow. That's

Re: [PHP] Re: some kind of "library loader" - Thanks

2002-04-04 Thread Arpad Tamas
Ok, Thank you for your help Miguel and Maxim, I'm trying to do it by the help of your suggestions. Arpi > > >Also, you can find out if a class was defined by calling > > >'class_exists()'. In this way you might save something. > > >The best way thought is what Miguel was saying: load t

[PHP] Re: some kind of "library loader"

2002-04-08 Thread Arpad Tamas
Hi Eric (and others who might help), Actually I haven't tried the custom error handler for "function or class definiton not found errors" because I read in the manual that the processing is continued after the "statement" where the error raised. I also thought of a little hacking in php's sour

Re: [PHP] domxml

2001-10-18 Thread Arpad Tamas
On Wednesday 17 October 2001 19:47, php wrote: > Hello, > > Warning: Unknown list entry type in request shutdown (0) in > Unknown on line 0 > appears on the bottom of every script I call that uses domxml. > I have no idea was causes it... Any tips? try to use (and compile php with) another versio

Re: [PHP] Delivering NAMED pdf files

2001-10-19 Thread Arpad Tamas
On Friday 19 October 2001 11:52, George Pitcher wrote: > Hi all, > > I am delivering my PDF files from a non-internet directory. The > file gets delivered but the filename is always changed to the name > of the php script. > > Can anyone tell me how to get the file delivered so that the name > sta

Re: [PHP] XML: Expat or DOM?

2001-10-20 Thread Tamas Arpad
On Saturday 20 October 2001 02:35, you wrote: > Hi guys, > > Also, is it really risky to develop in DOM, considering the module > is experimental, and in theory it could change ? We are working with dom for about a year. Our project depends on it, so I hope it won't change much :)) By the way we

Re: [PHP] Enabling php in only certain hosts and directories

2001-10-24 Thread Tamas Arpad
On Wednesday 24 October 2001 08:19, you wrote: > Well, php runs the same as apache, so whatever apache can access, > php can access. > So any files with the db passwords that need to be accessed by php, > can be seen by all users who can upload php scripts to your server. That's not completely tru

Re: [PHP] PHP with XML

2001-10-24 Thread Tamas Arpad
On Tuesday 23 October 2001 21:17, Vinicius Tavares wrote: > What I have to do to make the PHP4 run the DOM XML??? Download the libxml library (the development packages too, if you download the packaged distrib). And compile php with it (--with-dom switch for configure). http://www.xmlsoft.org

Re: [PHP] libxml

2001-10-24 Thread Tamas Arpad
On Wednesday 24 October 2001 11:38, php wrote: > Firstly, > I use php 4.0.5 and libxml 2.3.9 on several machines without any problem. Older php and libxml combinations however caused many segmentation faults, especially with not well-formatted xmls. Are you sure that you warning message is rel

Re: [PHP] How to protect MySQL password

2001-10-24 Thread Arpad Tamas
On Wednesday 24 October 2001 16:42, Kurt Lieber wrote: > On Wednesday 24 October 2001 00:30, you wrote: > > What we > > really need is an expert here to give us the low-down on the best > > way to accomplish the best security given regular tools. > > There isn't a way to solve it within the constr

Re: [PHP] how do i give optional arguments to functions??

2001-10-24 Thread Arpad Tamas
On Wednesday 24 October 2001 19:14, Richard S. Crawford wrote: The default value for $image parameter was missing: > function top ($image="defaultvalue") { > if ($image=="defaultvalue") echo "blah blah blah"; > else echo "blah blah $image blah"; > } > Arpi -- PHP Gene

Re: [PHP] how do i give optional arguments to functions??

2001-10-24 Thread Tamas Arpad
really necessary, but I like to make code without any warning message (it also makes the code more cleaner as you said), and you'll get a warning message if there's no parameter given at the function call (without the default value). Arpi > > At 10:30 AM 10/24/2001, Arpa

Re: [PHP] disable_functions not working in httpd.conf

2001-10-25 Thread Arpad Tamas
On Thursday 25 October 2001 09:47, Joseph Blythe wrote: Hi, bad news disable_functions doesn't work for me either in apache's config file I tried it with php_value, and php_admin_value, also in .htaccess with php_value without any luck php4.0.5, Apache/1.3.14 bye, Arpi > Hey All, > > W

Re: [PHP] Re: Error: Can't redeclare already declared function (PHP 3.0.15)

2001-10-27 Thread Tamas Arpad
> Unfortunately, you can't include FUNCTION() conditionaly (well, you > can, but then you can't use it out of this if():). Why only such > dumn restriction, PHP developers? I think it's only true for php3 I use many many class definitions in php4 that are inluded conditionally in another classes

Re: [PHP] Re: Weird caching problem with PHP4/Apache

2001-10-31 Thread Tamas Arpad
On Wednesday 31 October 2001 14:48, René Fournier wrote: > Nope, unfortunately, nothing. It's a really weird problem. It's > like the PHP function I wrote for generating the random image will > only work the first time. I think it is not php that caches it. As I undertsand you wrote a script th

Re: [PHP] Re: Weird caching problem with PHP4/Apache -- THE SAGA CONTINUES

2001-10-31 Thread Tamas Arpad
I look > at these EXACT SAME pages on Fatcow (Linux/Apache, I believe, > PHP4...), the randbg() function executes the first time, then > [seemingly] fails to execute again--it never generates a different, > random bakground. (Or maybe I'm looking at one hell of a > coincidenc

Re: [PHP] Re: Login/Security Problem

2001-11-14 Thread Tamas Arpad
On Wednesday 14 November 2001 14:58, you wrote: I think mixing of the web application's and the host's operating system's authantication is not the best thing (if you don't exactly need that) The $isLogged variable that is stored in the session is perfect as long as you check that it is came f

Re: [PHP] Re: how can I get the post content in php

2001-11-15 Thread Tamas Arpad
I think I saw on this list that there's a $HTTP_RAW_POST_DATA (or similar) varibale. Sorry the net is slow like hell at work, I can't search for more info. But I think if you search for "raw" on the general mailing list's archive you will find it. Arpi > XML file is text file. If I op

Re: [PHP] configure problem: --with-mysql=/what exactly?

2001-11-20 Thread Arpad Tamas
Hi, Do you have msyql-dev (or similar) package installed? Arpi > I have tried the following, each time removing config.cache > beforehand: > > --with-mysql=/usr > --with-mysql=/usr/include > --with-mysql=/usr/include/mysql > --with-mysql=/usr/lib > > According to a friend with mysql Debs

Re: [PHP] Objects and sessions

2001-11-26 Thread Tamas Arpad
> later on I get errors about the class functions being undefined. > Can anyone please point me in the right direction on how to > register my objects as session vars. Class definition *must* be before any session_start() or sessgion_register() if there are previously stored objects in the se

Re: [PHP] Objects and sessions

2001-11-27 Thread Tamas Arpad
On Monday 26 November 2001 23:37, Christopher William Wesley wrote: > On Mon, 26 Nov 2001, Greg Sidelinger wrote: > > Can someone tell me how to store a class in a session var. I > > want to > > There are several things you need to do. > > 1) include the class definition before you do anything >

Re: [PHP] redirect

2001-12-13 Thread Tamas Arpad
> I have a small problem i come from a link in html page witch gives > an numbet to php (contact.php?nummer=2) > and in the script i use a redirec to a other php script but i can't > give that number to then next script i do it like this: > $url = sprintf("http://www.test.com/contact1.php?num=%",$

[PHP] Copy function usage ?

2001-08-09 Thread Tamas Bucsu
_exists($userfile)) { copy("$userfile","pics/".$userfile); } else { echo "Nem sikerül a következõ file-t feltölteni:".$userfile; } thx Tamas Bucsu

[PHP] How to get the query string?

2001-08-13 Thread Tamas Bucsu
$a<=sizeof($HTTP_POST_VARS);$a++){ echo "$a. ".$HTTP_POST_VARS[$a].""; } Please help Tamas Bucsu

[PHP] Mail method?

2001-08-15 Thread Tamas Bucsu
Hi guys, Is there anything I should configure or set up on the server to make the "mail" method work? There is nothing about it in the manual (or I just haven't found it?). Thanks Tamas "Bucsesz" Bucsu

[PHP]

2001-08-17 Thread Tamas Bucsu
Hi guys, Is there any restriction on a multiple selectás name in an HTML file? Cos' If I give a name like 'msel' and not 'msel[]' I don't get an array named $msel just a simple string type variable. Thanks in advance

[PHP] How to download a picture thru http://?

2001-08-24 Thread Tamas Bucsu
Hi guys, Is there any special way to get some pics from the web? Cos' what I wrote just does not work. Thanks if (file_exists($kepnev)){ $kepnev="http://www.stg/pics/somethinggy.jpg";]; $fdr = fopen($kepnev,"r"); $fdw = fopen($kepnevshort,"w"); while (!feof($fdr)) { fputs ($f

Re: [PHP] Getting IP address

2001-09-19 Thread Tamas Arpad
On Wednesday 19 September 2001 13:13, Jon Haworth wrote: > A better version would be: > > if (getenv(HTTP_X_FORWARDED_FOR)) { > > $ip=getenv(HTTP_X_FORWARDED_FOR); > } else { > $ip=getenv(REMOTE_ADDR); > } > > This checks for proxy forwarding as well, if you just use > REMOTE_ADDR you

Re: [PHP] Modularity--Optimizing Includes and Libs

2001-09-20 Thread Tamas Arpad
Hi, I have the same problem. We have a fairly complex and huge system with many functions/features in it with 1,6Mb of plain php code (without desing). For page generation usually one half (or third maybe) of the code is needed. I found that php parses and complies the code in 0.6secs (withou

Re: [PHP] codes in php for going back to previous page

2001-09-21 Thread Tamas Arpad
On Thursday 20 September 2001 21:36, Wee Chua wrote: > Hi all, > I know how to forward a page with PHP, but what if the page I want > to forward is the previous page or last page. In javascript, the > code is like javascript:historygo(-1). The reason why I want to go > back to previous page is bec

Re: [PHP] parent::mymethod() call $this->mymethod() bug?

2001-09-21 Thread Tamas Arpad
On Friday 21 September 2001 15:15, Jean-Pierre Arneodo wrote: > Hi! > something looks strange for me. > Why the method Fils::x is called? > class Fils extends Pere { > function Fils(){ > echo "Fils::Fils called"; > $this->Pere(); > } > function x(){ >

Re: [PHP] help: form variables have CR/LF ?

2001-09-21 Thread Tamas Arpad
On Friday 21 September 2001 16:27, you wrote: > Does anyone know what is going wrong, when all of a sudden, the > content of PHP global variables that are generated from a POSTED > form, have a CR/LF prepended? It happens to me when I'm using Konqueror and multipart/form-data enctype in forms (be

Re: [PHP] help: form fields have CR/LF on submit

2001-09-21 Thread Tamas Arpad
On Friday 21 September 2001 17:17, Patrick Sibenaler wrote: > I submit a form with multipart/form-data, where a field 'name' > contains let's say 'john'. On submit, I do get the expected global > $name -variable but the content has a CR/LF or /n character in > front of the actual content, like: Hi

Re: [PHP] Sessions just don't work on my machine. (Trying this again)

2001-09-24 Thread Arpad Tamas
On Monday 24 September 2001 17:56, Thomas Deliduka wrote: Hi, > PHPSESSID: Try to use constant SID, maybe that will work, and it is more likely that it will work on other intallations with other session variable names. > > VAR 3: TYPE=SUBMIT VALUE="go"> > You should add the session id (SI

Re: [PHP] Sessions just don't work on my machine. (Trying this again)

2001-09-24 Thread Tamas Arpad
On Monday 24 September 2001 18:20, Thomas Deliduka wrote: > On 9/24/2001 12:22 PM this was written: > > Try to use constant SID, maybe that will work, and it is more > > likely that it will work on other intallations with other session > > variable names. > > I just tried using SID in my index.php

Re: [PHP] Sessions just don't work on my machine. (Trying this ag ain)

2001-09-24 Thread Tamas Arpad
On Monday 24 September 2001 18:51, Thomas Deliduka wrote: > I'm finding my script on www.fromtheduke.com/session/ still doesn't > work even with the in the link or passing it along in the > form. Please send us your latest code again, then we can help you, not just guessing what you've might don

Re: [PHP] Sessions just don't work on my machine. (Trying this ag ain)

2001-09-24 Thread Arpad Tamas
> > Then I will reload the first page again by erasing index2.php and > hitting enter and it will display a new sess id number and show the > first page, as normal but that sessid number is equal t the new > session created on the server and the value of it is: > > var3; var1; var2 > > This is str

Re: [PHP] Sessions just don't work on my machine. (Trying this ag ain)

2001-09-24 Thread Tamas Arpad
On Monday 24 September 2001 18:39, Thomas Deliduka wrote: > On 9/24/2001 12:32 PM this was written: > >> After reloading IE on the PC now the SID constant doesn't > >> echo anything at > >> all. > > > > SID is always defined on the first page request. It is only > > defined on later page requests

Re: [PHP] Sessions just don't work on my machine. (Trying this ag ain)

2001-09-25 Thread Tamas Arpad
On Monday 24 September 2001 21:23, Thomas Deliduka wrote: > I just tried this here below. Before trying this I changed any > called to $PHPSESSID to session_id(). > > I turned off cookies > Loaded the page... Created session id and file: > sess_44074d3a54862b480c3407c9eb373f77 > Contents: var1|s:8

[PHP] Can I rely on session.gc_maxlifetime?

2001-09-25 Thread Arpad Tamas
Hi, I don't know if I understand right the manual at the session.gc_maxlifetime setting. As I read, php won't use sessions that are older than that time. It means that when a user logs in, and does his/her work for more than (for example) 15 minutes, than he/she will be kicked off immediately,

Re: [PHP] Can I rely on session.gc_maxlifetime?

2001-09-25 Thread Tamas Arpad
On Tuesday 25 September 2001 14:27, Andrey Hristov wrote: > New SESSID will be generated because the old expired and because > all rely on the SESSID which is the "hash key" to the data no > previous data will be available. So, no matter if the user is still working, the session will be destroyed

Re: [PHP] Can I rely on session.gc_maxlifetime?

2001-09-25 Thread Tamas Arpad
On Tuesday 25 September 2001 16:19, Johnson, Kirk wrote: > > So, no matter if the user is still working, the session will be > > destroyed. I mean session.gc_maxlifetime isn't > > session.gc_maxIDLEtime? > > Every time the user requests a page in an application using > sessions, the session file's

Re: [PHP] Getting the file size, wtihout download... is this possible ?

2001-09-26 Thread Tamas Arpad
Hi, HTTP has a method called HEAD, that is for example can be used for exmample to get the requested files' size if the other web server/php script supplies it. So all you have to do is to make a connection to the other web server, give a HEAD request (it is almost the same as GET), and parse the

Re: [PHP] need help with safe mode and Restrict where PHP is Usable?

2001-10-03 Thread Tamas Arpad
Hi, Both problems can be solved with php directives in httpd.conf or in .htaccess. You can just put php_value safe_mode "off" or php_value engine "off" into definitions in httpd.conf to restrict only for some directories or into for virtual servers. (Of course in htaccsess you can only restr

Re: [PHP] Should I convert special characters before writing them to a table?

2001-10-04 Thread Arpad Tamas
> Try addslashes() before executing the query and stripslashes() when > retrieving data from the db. See the online manual for more > details. I think stripslashes() isn't needed when retrieving data from the db, it is needed only in the query string to protect special chars from interpretting

[PHP] Foreach question

2011-07-05 Thread Dajka Tamas
=> 2 ) ); Output 2: 122334455 Why is this? Is this normal behaviour? Thanks, Tamas

RE: [PHP] Members area Login with permissions!

2011-07-24 Thread Dajka Tamas
n't be set, so either use output buffer in php.ini, or ob_start somewhere. And hope you do session_start() in config.php ;) Cheers, Tamas -Original Message- From: alekto [mailto:alekto.antarct...@gmail.com] Sent: Sunday, July 24, 2011 1:28 AM To: php-general@lists.php.net Sub

RE: [PHP] Members area Login with permissions!

2011-07-24 Thread Dajka Tamas
--- On more complex sites, you may want to use classes, so the PHP code gets really separated and clean. If you decide to a template engine, you may also want to create a global $conf var and export that to the engine, so you can set the design, lang code, etc from one variable. Let me know, if I c

RE: [PHP] Members area Login with permissions!

2011-07-24 Thread Dajka Tamas
usr_level); after setting $usr_level ). The fix: just change it to: $usr_level = $dn['usr_level']; Cheers, Tamas From: alekto [mailto:alekto.antarct...@gmail.com] Sent: Sunday, July 24, 2011 1:00 PM To: Dajka Tamas Cc: php-general@l

RE: [PHP] Members area Login with permissions!

2011-07-24 Thread Dajka Tamas
both, giving easier debugging, Tamas From: alekto [mailto:alekto.antarct...@gmail.com] Sent: Sunday, July 24, 2011 1:00 PM To: Dajka Tamas Cc: php-general@lists.php.net Subject: Re: [PHP] Members area Login with permissions! Hi, thank you for answering! I do have a session_s

RE: [PHP] Members area Login with permissions!

2011-07-24 Thread Dajka Tamas
s will redirect an unlogged user to the login form ( if logged in, but has no access rights, your login page will log out the user ). Don't forget to store the users' access level in the session, or this will not work! Cheers, Tamas From: alekto [mailto:alekto.antarct

RE: [PHP] Path question.

2011-07-28 Thread Dajka Tamas
Yes, can be. There is a predefined variable DIRECTORY_SEPARATOR, which you can use: on index.php let's say define('DS',DIRECTORY_SEPARATOR'); define('MY_APP_ROOT',dirname(realpath(__FILE__))); define('LIB_DIR',MY_APP_ROOT.DS."..".DS."locat

RE: [PHP] Problem with header("Location:" )...

2011-07-31 Thread Dajka Tamas
Try lowercase 'http'. Anything in error log? Try turning on display_errors. Cheers, Tamas -Original Message- From: Jason Pruim [mailto:li...@pruimphotography.com] Sent: Sunday, July 31, 2011 8:40 PM To: Subject: [PHP] Problem with header("Location:" )...

RE: [PHP] form hidden value

2011-08-08 Thread Dajka Tamas
First: use firebug, or something like that, and check what's get "written" in the page's source! Second: dump $_POST/$_GET, and check, whether "id" is set at all Is your input field between the and tags? Cheers, Tamas -Original Mess

RE: [PHP] Struggling with MySQL query

2011-08-09 Thread Dajka Tamas
Why not trying this: $q = "SELECT * FROM news_items WHERE upper('headline') LIKE '%".$find."%'"; echo $q; $data = mysql_query($q); ... And try running the echoed query in phpmyadmin, etc. Cheers, Tamas -Original Message- From: Davi

RE: [PHP] PHP redirect

2011-09-24 Thread Dajka Tamas
If $data['feed_link'] is extracted from $_POST, then it's already urldecoded. BTW, what's the problem? It's not redirecting you, or just redirecting you to az unavailable/wrong page? ( most browsers change the & in titlebar to '&', so you don't have to worry about that ) -Original Message---

RE: [PHP] PHP redirect

2011-09-24 Thread Dajka Tamas
Try header("Location: ".html_entity_decode($data['feed_link'])); From: muad shibani [mailto:muad.shib...@gmail.com] Sent: Saturday, September 24, 2011 12:41 PM To: Dajka Tamas Cc: php-general@lists.php.net Subject: Re: [PHP] PHP redirect it redirecting me to unavail

[PHP] Notice:Use of undefined constant

2005-01-21 Thread Tamas Hegedus
not the right treatment. Do you have any idea? Thanks for your help in advance, Tamas -- Tamas Hegedus, Research Fellow | phone: (1) 480-301-6041 Mayo Clinic Scottsdale | fax: (1) 480-301-7017 13000 E. Shea Blvd | mailto:[EMAIL PROTECTED] Scottsdale, AZ, 85259 |

Re: [PHP] Notice:Use of undefined constant

2005-01-21 Thread Tamas Hegedus
. HOST . USER . DB; exit; /*-- Ez az eredeti define( HOST, 'localhost'); define( USER, 'h'); define( PWD, 'h'); define( DB, 'hae'); */ $link = mysql_connect( HOST, USER, PWD); mysql_select_db( DB); ... Thanks, Tamas -- Tamas Hegedus, Research Fellow | phone:

[PHP] Jason

2005-01-23 Thread Tamas Hegedus
Dear Jason, Thanks! Such a stupid misstake (however in the earlier version of php I did not received any notice). But I am not a programmer ;-) Regards, Tamas >> On Saturday 22 January 2005 08:28, Tamas Hegedus wrote: >> > >>>> define( HOST, 'localhost')