Hi all,
I've bumped into an interesting thing with foreach. I really don't know, if
this is normal working, or why it is, so I got curious.
The script:
foreach ( $cats as &$c ) {
echo $c['id'];
if ( $c['id'] < 5 ) {
$c['id']
Hi,
I don't see any redirection in your script! It just displays the link to the
corresponding next homepage based on the user level. To really redirect, you
should user "header ('Location: URL');". Be aware, that if you pass ANY
content out, the additional headers can't be set, so either use outp
---
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
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
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
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
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."location".DS."file");
Cheers,
Tamas
-Original Me
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:" )...
So I'm attempting to r
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 Message-
From: Chris Stinemetz [mailto:chrissti
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: David Green [mailto:simp...@gmail.com]
Sent: Tue
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---
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
12 matches
Mail list logo