[PHP] Avoiding several windows with the same session

2003-02-07 Thread Roman Sanchez
I place

session_start();
if (!session_is_registered('somevar'))
{
header('location: login.php');
exit();
}

at the top of all my pages to prevent people to view pages before they log
in. However, once thay have logged in succesfully, they can ctrl-U in IE to
open a new window. This new window 'inherits' the session id and hence it
does not redirects to the login page. Is there any way to avoid this
situation so that people cannot have several windows with the same session
open?

Thanks!



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: php forgetting variables very easily

2003-03-05 Thread Roman Sanchez
> I am still having problems with variables not being
> remembered by included files.  I've tried using the
> global command and it still doesn't work.  I've cut
> down my two pages to contain the main stuff so you can
> see what's happening.  Basically main.php includes the
> file new.php and I want the variable '$name' to be
> remembered in it.  The other included files aren't
> important to the problem I'm having.

I just cut and pasted your code, commenting out the include()s
you say aren't important and the $name variable prints out fine.
Are you sure your not overriding its value in one of the other included
files?

On the other hand, terés no need to use global, this is only when you want
to use
global variables _inside_ a function.

Cheers!



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Number of rows

2003-03-05 Thread Roman Sanchez
> however, i would like to show the user how many rows there are in each
table
> (where i have put numrows), how could i do this?
>
> thanks for your help

Since MySql version 3.23 you can use "show table status" to show a lot of
information for all tables in a database, including the number of rows.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: table cell space under image in IE

2003-03-13 Thread Roman Sanchez
If you write




the CR-LF before  counts as an space wich wraps to the next line. It
might be helpful to write

 (in the same line)

instead.

> I know this is not exactly on topic but I produce all html by php and I
> don't want to go out and add myself to an html list (if there is such a
> thing).

Frankly, it´s not on topic at all and no matter how you produce the final
html output you should know how to deal with it.





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] table cell space under image in IE

2003-03-13 Thread Roman Sanchez
> 
> 
> 1 - 50
> https://website/file.php"; METHOD="post">
> 
> 
> 
> 
>  onClick=document.Second.submit(); onMouseOver="change_it('pic3')"
> onMouseOut="change_back('pic3')">
> 
> 
> 

You don'y say which cell has the problem but, apart from placing the closing
td right after the image try to move the closing form tag out from the
table. At least in IE,  _allways_ produces that extra space no matter
what you do unless you use style sheets to set the form's bottom-margin
yourself.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php