Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




How Do You Disable The Close (x) On A Window


I'm running a PHP script on page1.php that takes a few seconds, once it has run the page then redirects to page2.php automatically sending variables . However, if the user shuts page1.php by pressing the X on the top right of the screen, the redirect doesn't happen!! Does anyone know how to disable the X and stop the page being closed down please?? or another solution??




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
On Window Close
Is there a way to run PHP code when a window is closed?

How To Close Browser Window In PHP?
Is there a way to close the present (active) window using PHP code?

Close A Window Automaticaly
Is there a way to close a window automaticaly with PHP. The case is: I have a form, and when someone clicks on the first option, en then submits, a form is printed, if one chooses the other option, the window should close .. is that possible ?

PHP / JAVA Close Window Problem
I have looked at other posts and still can't figure this out. This works but IE 4.0 on NT / Win give me a error as "Object Expected".

It is code to close a window - can someone tell me if something is wrong with this? PHP Code:

Session Still Exists If I Close The Window
I am using sessions in PHP for users to log in to their own accounts. All works perfectly well if the user enters their username and password that if correct creates a session and takes them to the main page of their account.

If they click on the logout.php link that destroys the session they can login again without any problem, but if they close the window then try and login again it seems the session has not been destroyed. I include a check in every page to make sure the session_id has been created so the page can be viewed.

If the user has closed the window without logging out correctly the session_id is not created once they login and are taken back to the login page. Has anybody else had problems with creating and destroying php sessions due to the closing of the window?
Here is the code to login: Code:

Preventing Window-close After Download
I use a php class to create pdf files ... but
when I download the created pdf, the browser window closes, and Acrobat
opens.

How do I prevent the closing of the original browser window? Maybe it has
something to do with cache, because most off the people using the website
don't have this problem.

Also , I need to use the session_cache_limiter('no-cache'); before I can use
the "open"-option after clicking on the download link.

ps: even if I use target="_blank" , both browser windows closes.

Passing Variables After Window Close
I've got a wee problem I'm having difficulty with. What I have is a form whereby when you click on this button a pop-up calendar appears.

What I'm trying to achieve is that when you do click on a date it closes the window and then refreshes the parent window and displays the date selected. The code below is what I have, but this doesn't work.

Close Window After Script Runs
When a user clicks on a link in their email, I have a browser window that opens in the background and runs a script confirming their desire to be added to our email directory. I basically want this window to open, run and then close without the user having to deal with it.

Is there a way in PHP to close the window after the script finishes running in it? Or should I revert to JavaScript? I want the script to be mobile so I've sort of ruled out processing it server side. TIA.

Executing Script Upon Window Close
Is it possible to perform a script when a user closes his broweser window ??/
i want to change a column value in the database to show that a user is logged out ..
by the way i use dreamweaver as an editor ..

Script To Logout And Close The Parent Window
I have a LOGOUT button in a frame on a php page. I want a script such that after i click the LOGOUT button, the user is directed to the logout.php page after successfully closing the parent window.

Destroy Session On Close Of Main Window
When the user logging in my system i am registering new session session variable (eg. $user_authenticated = 'yes'. When the user exit from my page i want to unregister that variable $user_authenticated.

Executing A Mysql Query On Window Close?
im making my own forums, and i want to make it so that if there is no cookie set it will add a guest value to the online table, can do all this, i just need to know if theres a way to remove the guest value from the table when the window closes, is this possible?

Populating Form In Parent Window With Value From Popup Window
I have a text box in the parent window.. now i want to populate this text box with a user_id that i will get from query within a popup window.. How do i get the value from the popup window to be passed to the main window form field in php. I know how it can be done in javascript but when i tried combining javascript and php i dont get the desired result.

Can A Popup Window Return Data To Parent Window?
Is it possible to do the following in php:
I want to have a main form open. In the form I want a button that will
open a popup window so the user can search for something. The user can
then select what they want, and the popup window closes and the main
form (which is still open) shows the search results.

Popup Window That Darkens The Window That Opened It
I just visited a website and saw how they darkened the background page
when a popup was opened. How can I do this using JS and HTML? Is it a
normal popup window?

Way I Can Stop The 'message Sent' Window Opening In Another Window?
everytime somebody sends a message from my contact form on my flash website, an additional window opens saying 'message sent', its not a big problem, its just annoying. Is there any code i could add to the contact.php form to prevent this from happening?

Reload Existing Window From Another Window
I have logg in page, after clicking loggin the pop up window apiears and
if user loggins it closes,
I want to reload if loggin succes ( I have handling sistem for it) ,page
were user have clicked to logg in, how do I do it?
is it possible to do it with php?

Disable Cookie
I am using cookie to hide a variabe in send.php3 as following:send.php3: PHP Code:

Disable Checkbox
I have a checkbox that I set by php code to be either "checked" or "".
I want to disable the ability of the user to check or uncheck it. I
tried "readonly", but that didn't work.

Can I Disable $PHP_AUTH_PW?
Is there any way I can disable the setting of the environment variable $PHP_AUTH_PW? I'm authenticating via LDAP, and don't need (or want) the password available to PHP. I also don't need $PHP_AUTH_USER; the current authenicated user is available in $LDAP_USER.

Disable (grey Out) A Button.
Experienced programmer but new to PHP. Moreover I'm to use PHP with Xoops on
top (this adds object orientation?).

I don't seem to find a xoops Usenet group?

Whatever the case (and presumably a Xoops property): how does one disable
(grey-out) a button?

Disable Right Click In Opera
In my website there is requirement to disable rightclick.
I am providing the code and it is working in I.E ,Netscape and
Mozilla.But not working in Opera browser.
My code is
<body oncontextmenu='return false;'>
The above single line code is working very fine in the above browsers
not in Opera.

Disable Phpinfo In Php3
In PHP4 there is the posibility to disable the use of phpinfo() by putting "disable_functions = phpinfo" in the php.ini-file. Is this also possible with PHP3 (in php3.ini) or is there another way of disabling this function?

How To Disable PHPSESSID From Posting In URL
I don't want the URL to display this info. I never notcied this being displayed before but all of a sudden it seemed to pop-up. I don't host my own server so any access to the php.ini file is not possible. Any ideas out there?

How To Completely Disable Openbase_dir?
I'm using php 4.3.4 and have an intermitent problem with gallery
(gallery.sourceforge.net) regarding the open_basedir restriction in
php. The error I am getting is:
------
PHP Warning: (null)(): Failed opening
'/home/httpd/vhosts/mydom.com/httpdocs/gallery2/main.php' for inclusion
(include_path='.:/usr/share/pear') in Unknown on line 0, referer:
http://mydom.com/gallery2/main.php
------
I have disabled safemode and open_basedir in php.ini and have verified
through a phpinfo() call that they are disabled. Actually,
open_basedir is reported as being set to "no value" and safemode is
reported as disabled.

The strange thing is that this does not happen every time i access this
page. It is only 1 out of 10 times and usually it is the first time i
access the page for the day(but not always). I have restarted httpd
and the server just in case. I also checked .htaccess but it shouldnt
matter since phpinfo() says it is not set. This is baffling to me! If
I could rip this feature out I would. It was installed by default on
my dedicated server.

How To Disable Controle Keys
In my application I want to disable my controle keys to
save copying and taking screen shots of the my page.

How Do I Unclock The URL/disable Frameset?
I have a few websites out there and set up alittle script for my friends to auto register subdomains for their affiliate sites. Problem is, some affiliate programs don't allow URL MASKING and I can not figure out HOW to disable it within the script. Could someone take a look at this and help me?

I'm trying to disable the frames in forward.php, along with whatever it gets linked to (i'm very new to this, so i included a link to whole script incase there is more then just forward.php I need to edit). Code:

Disable The Values In Address Bar??
Am trying with a social network site... i want to disable the values in address bar which are passing as string variables, My pages are included in the index page.. and my values are passing like that... by changing the values in address bar my page is changing..

How can i solve this issue... i think anyone can change my site using this address bar.. how could i prevent this???

Disable Right-click On Mouse
Is there a php script that wil disable the right-click on mouse or maybe disable the copy and paste feature of the browser?

because i have a client, wherein he wants to prevent public viewing his website from copying his website content?

How To Close Mysql_pconnect()
I take a look php.ini but I don't know how to close mysql_pconnect from php.ini.

Close After Date.
i have a page that after the 25th of the month i dont want people to access. using Date is this possible? i had one for certain days but it didnt work out:

<?php
$d=date("D");
if ($d=="Thu" || $d=="Sat" || $d=="Sun" || $d=="Mon" || $d=="Wed") {
exit;
}else{?>

<?php } ?>

Disable Download Image To Disk
Could someone please direct me to a way to preventing people from downloading images from my website.

Disable Command Line Arguments For Php-cli
i have been trying to disable the -n and -c arguments that you can use with php from the command prompt. this is because these features can effectively disable my php.ini which has a whole mess of disabled_functions (that i want to ensure remain disabled).

my best idea for going about doing this so far has been to download the source for the newest php, with hopes to compile my own which will ignore arguments other than a filename. so far the closest i have got is to the the zend_API.c which has the follow function: Code:

Disable .php Handler For A Specific Browser,
I would like to know if there is a way to remove/disable .php handler
when the request come from a specific Browser.

I ask this because I use dreamweaver / webdav to edit my .php files.
But when I try to open the .php file in dreamweaver, what I see if the
result of the .php executions, not the .php source files.

I know that you can create an Alias location "/dav", and disable the
..php handler for this location. It's a solution, but not the best I
think. It would be better if we can disable .php runtime where
dreamweaver Get the files.

Disable Magic_quotes_gpc In A .htaccess File
How do I disable magic quotes via .htaccess?

I put the following file in my webroot, but it does not disable
magic_quotes_gpc (according to phpinfo(), both the local and master value
are still "on")

<IfModule mod_php4.c>
php_value upload_max_filesize 8M
php_value magic_quotes_gpc 0
</IfModule>

The change to upload_max_filesize works (master is 2M, local value is 8M,
according to phpinfo())

Disable Backbutton - When Page Has Expired...
I have this on the page:
<?php
header("Pragma: no-cache");
header("Expires: -1");
?>

but I want it so, that when the user goes back, (s)he might not be
allowed too - say the session has expired.

How can i achive that?


Disable Coding In Textboxes/Textfields
Is there a way to disable PHP, HTML, and the sort in textboxes and input fields? There are things called SQL Injections which are usually used in an url or input field to steal data from the database.

Why Does PHP As Apache Module Disable PHP's Java()?
My site was suddenly running HTTP authentication and was faster.
But if this was a problem from the past, now a entire part of my site does't work because my calls i had to function Java()
now generate this output:

Fatal error: Call to a member function on a non-object
HTTP authentication(PHP as Apache module) versus Java Virtual Machine

what's the relation between them, how can i restore Java() to work properly. Is it on httpd.conf?

why does not PHP call Java extension if it is installed on Apache as a module?

Disable User From Downloading Php3 Web Page.
I would like to allow user only to view php3 page but wants to restrict him from downloading and saving on his hard disk.

Warning: Fsockopen() (how To Disable Debug Messages)
In Win32 PHP you can disable debug messages using the php.ini Can someone tell me how to do that in linux? there is no php.ini in linux Php script running on windows Php script running on linux.

Disable Safe Mode Without Loss Of Security ?
I'm trying to disable safe mode from my php installation. First
because this functionality will be removed in PHP6, and because it's
very restrictive and it's giving me headaches when configuring
frameworks and other applications. Moreover, it's said on the php
website that the safe mode solution is not a good thing... I'm looking
for a tutorial which indicates what to configure on a server in order
to have a secured installation of PHP, but without safe mode. I can't
find it...

Enable/disable Html In Form Processing
I've got a form, where it submits some info and adds it to a txt file. The file is then displayed on the front page of my site; however, there is a security problem i'd like to fix dealing with html. How would you go about disabling the use of html in a form?

PHP Script To Disable/enable Internet Access
We are finally getting DSL again...
but our PC is in the living room... and the youngest has figured out
that if he hits the right keys... he can bring up Internet Explorer.
All is fine and dandy right now, but come next week... that things
wont be so dandy.

I am setting our LInux router/server back up soon, and would like a
quick, easy way to enable and disable our internet access. What I
would like to do is have a simple PHP page that says

(iff network status = inactive)

Your Internet Access is DISABLED
Enter passcode to enable internet access

[TEXTBOX]

Then [OK]

so on clicking "OK" if password = suchandsuch then run script"
"/sbin/network start" or whatever the script is and refresh the page

then

iff network = active

Your Internet Access is ENABLED

[DISABLE]
upon clicking of "DISABLE" run script /sbin/network stop and refresh
the page

Something to that effect.

Disable Passing Arrays In Query String?
Is there any way to stop PHP from turning a query string like this: ?var[] into an array when it is read by $_GET['var']? I have quite a few input validations that are easily screwed up by this strange (and apparently undocumented???) feature...

Do I Need To Close The Mysqli Connection?
I opened it, but in the end of the script, is it necessary to close?

Disable Submit Button If Text Field Is Empty
I am unsure if this must be done with Ajax, or if it can be done with PHP. I have a simple search page where I want the submit button to be disabled if there is nothing entered in the text field, and once something IS entered, then the search button is enabled.

I was thinking Ajax, because I am looking for it to be real time and I am not sure if its possible with PHP as I am just a novice when it comes to certain things. So the button is always disabled when there is nothing, and enabled when the user enters something.

And lets say the user enters something and removes it, then the button disables again? Is this possible to do with PHP and if so, could someone please help me tackle this . Code:

Delete Session On Browser Close
Hi, I've write a session log file in my db when a user login. How can I delete the session away when the user close the browser? Any help is grateful.

How To Close Popup After Download Starts?
I am pulling my hair out here. What I'm doing is I have a page with a link that opens a popup window. This window asks a user for a build number, submits to PHP_SELF, does error checking, and if the build is valid, starts the download. My problem is that I want the popup window to close when the download starts. How would I do this?? Another problem I am having with this form is that after I enter data into the text box, I have to click the submit button for it to submit, rather than having the option to just press enter. Here is the code from the popup:

Database Server Auto-close
I just wondered if someone could clarify... I have a a script connecting
with mysql_connect and in an include at end of page mysql_close

If they script terminates before end of page ie. with an exit() or maybe
trigger_error(), does php always disconnect the open'ed connection?

I ask because PHP manual says yes, but I've seen some comments relating
to PHP 4 saying it doesn't.


Copyright © 2005-08 www.BigResource.com, All rights reserved