you didn't set the $message
for example here that you mentioned:
You have successfuly been logged in. You can now access
the advanced area.
change it to $message="You have successfuly been logged in. You can now
access the advanced area";
hope it will help.
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
One more thought, why not separating the things? I mean separate HTML with a
template engine ( like Smarty ) and separate PHP code ( also separated to
files ).
Like:
index.php:
if ( ! $_session['username'] ) {
$_SESSION['message'] = "Please log in";
header('Location: login.php')
Hi,
thank you for answering! I do have a session_start() in config.php.
For now there is no redirection as you mentioned, but it should display a link
to
the corresponding next homepage based on user level, which it does not do at
this time!
I thought was only a class? I already have a $messa
Hi,
yes, class="message" just sets the HTML class for that div element.
BTW, I've found the error:
//We get the password of the user
$req = mysql_query('select password,id,usr_level from users
where username="'.$username.'"');
$dn = mysql_f
I don't think, that separating the code messes up anything, cos it's just
separating processing/displaying and you can always debug processing by
adding some "echo $var", print_r($var) or var_dump($var). Moreover, by
separating the PHP and HTML you get clearer code for both, giving easier
debugging
Hi All,
While watching one of Jeffrey Way's CodeIgniter tutorials, I was
gobsmacked when he noted that it was best practice not to have closing
PHP tags as closing tags might introduce whitespace issues. So I tried
syntax checking a few simple pages and, to my surprise, the syntax
checkers accepte
What I know its a best practice to leave the closing tag in a script
with one php opening tag.Mostly this applies in a script that present a
class, I think its not correct to leave closing tags in template kind
of script where you have several php tags.
Gr
Muhsin
On 07/24/2011 02:33 PM, Geoff L
Thanks a lot :)
This solved the user level issue, I can now login with different user levels
and get displayed with a link to the corresponding index-pages.
But I am now facing a new issue regarding this; when I am entering the URL's of
the corresponding index-pages I do get access to the
corres
You're welcome J
Yes, you can hide the urls, just google for "url rewriting" or "seo urls".
Unfortunatelly, this is not basic level stuff and you cannot hide completly
the urls.
About your issue: that's why I've added to my example's index.php this line:
if ( ! $_session['username'] ) {
On Sun, 2011-07-24 at 14:55 +0200, mrfroasty wrote:
> What I know its a best practice to leave the closing tag in a script
> with one php opening tag.Mostly this applies in a script that present a
> class, I think its not correct to leave closing tags in template kind
> of script where you have s
Those versions are important ones. For the first time, you can
configure Apache (httpd.conf) and PHP (php.ini) directly from the
administration page. Thus, you can adapt easily the environment to
your needs.
Screenshots : www.easyphp.org/screenshots.php
EasyPHP is 11 years old now. It exists sinc
On Jul 23, 2011, at 9:14 PM, Nilesh Govindarajan wrote:
> On 07/23/2011 09:38 PM, Floyd Resler wrote:
>> I moved to our new server which is using 5.3.2. I'm getting a segmentation
>> fault error on certain ODBC queries I run. For some reason when I ask for
>> particular columns from the datab
I need to be able to convert a line of the form:
>>>From
to have either one more or one less > at the front. A web site tells me that
the regexps to use are:
1,$s/^>*From />&/
and
1,$s/^>(>*From )/\1/
respectively (there is a single space after "From"). So, if my text string is
in $line, I
Hi,
I lost trail, what do you want to do?
You want to convert
>>>From
to this:
>>From
Or what's the goal?
Cheers,
Tamas
-Original Message-
From: Tim Streater [mailto:t...@clothears.org.uk]
Sent: Sunday, July 24, 2011 8:07 PM
To: PHP General List
Subject: [PHP] Use of preg_
On 24 Jul 2011 at 19:35, Dajka Tamás wrote:
> I lost trail, what do you want to do?
>
> You want to convert
>
From
>
> to this:
>
>>> From
The number of > in front of "From " is not known. I want to be able to add or
remove one.
--
Cheers -- Tim
--
PHP General Mailing List (http://ww
You want to do it in a greater text, I think.
1,$s/^>(>*From )/\1/
$line = preg_replace ($pattern, $replacement, $line);
Adding one '>':
preg_replace('/(^[>]+From )/','>$1', $line)
Removing one '>':
preg_replace('/(^>([>]+From )/','$1', $line)
Cheers,
Tamas
-Original Message
On 24 Jul 2011 at 19:57, Dajka Tamás wrote:
> You want to do it in a greater text, I think.
>
> 1,$s/^>(>*From )/\1/
>
> $line = preg_replace ($pattern, $replacement, $line);
>
> Adding one '>':
>
> preg_replace('/(^[>]+From )/','>$1', $line)
>
> Removing one '>':
>
> preg_replace('/(^>([>]+From
On 24 Jul 2011 at 19:57, Dajka Tamás wrote:
> You want to do it in a greater text, I think.
See below.
> 1,$s/^>(>*From )/\1/
>
> $line = preg_replace ($pattern, $replacement, $line);
>
> Adding one '>':
>
> preg_replace('/(^[>]+From )/','>$1', $line)
>
> Removing one '>':
>
> preg_replace('/(
One again, Thank you!! Your excellent advice saved my day ;)
Den 24. juli 2011 kl. 16.07 skrev Dajka Tamas:
> You’re welcome J
>
> Yes, you can hide the urls, just google for „url rewriting” or „seo urls”.
> Unfortunatelly, this is not basic level stuff and you cannot hide completly
> the u
On 2011年07月24日 23:42, EasyPHP wrote:
Those versions are important ones. For the first time, you can
configure Apache (httpd.conf) and PHP (php.ini) directly from the
administration page. Thus, you can adapt easily the environment to
your needs.
Screenshots : www.easyphp.org/screenshots.php
Easy
Hi:
if you have high performance need, you can considering Yaf( a PHP
framework which is build in PHP extension)
http://pecl.php.net/package/Yaf
thanks
Best regards
惠新宸 Xinchen Hui
http://www.laruence.com/
On 2011/7/22 20:38, Floyd Resler wrote:
On Jul 22, 2011, at 8:33 AM, Richard Q
22 matches
Mail list logo