php-windows Digest 8 Apr 2007 10:49:19 -0000 Issue 3185

Topics (messages 27640 through 27644):

Re: duplicate entry
        27640 by: Stut
        27641 by: sam rumaizan

Re: How to read the username
        27642 by: Jarrett Meyer
        27643 by: Stut

Warning: Cannot modify header information
        27644 by: sam rumaizan

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
sam rumaizan wrote:
*"If the user hits refresh after submitting the form they will refresh
nextpage.php. If they hit back they will be taken back to form.php"*
Yes, *If the user hits refresh after submitting the form they will refresh ** *nextpage.php. Which is going to resubmit the data to mysql? (duplicate entry)**

No, you didn't read what I wrote.

The form submits to formhandler.php which submits the data to MySQL and then redirects to nextpage.php. Nextpage.php *does not* submit any data to MySQL. Read my post again, carefully this time.

And please include the list when replying.

-Stut

*/Stut <[EMAIL PROTECTED]>/* wrote:

    sam rumaizan wrote:
     > How do I disable Refresh and Back button. to Prevent duplicate entry

    Disabling client-side features like refresh and back is not the right
    way to solve this problem. The most common solution is to redirect the
    user to the next page from the form handler rather than outputting the
    next page from the form handler.

    For example...

    form.php shows the form, which submits to formhandler.php which
    processes the form and then does a header('Location: ...') redirect to
    nextpage.php.

    If the user hits refresh after submitting the form they will refresh
    nextpage.php. If they hit back they will be taken back to form.php.

    -Stut




------------------------------------------------------------------------
Food fight? <http://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&sid=396545367> Enjoy some healthy debate in the Yahoo! Answers Food & Drink Q&A. <http://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&sid=396545367>

--- End Message ---
--- Begin Message ---
Thank you it  works fine

Stut <[EMAIL PROTECTED]> wrote:  sam rumaizan wrote:
> *"If the user hits refresh after submitting the form they will refresh
> nextpage.php. If they hit back they will be taken back to form.php"*
> Yes, *If the user hits refresh after submitting the form they will 
> refresh **
> *nextpage.php. Which is going to resubmit the data to mysql? (duplicate 
> entry)**

No, you didn't read what I wrote.

The form submits to formhandler.php which submits the data to MySQL and 
then redirects to nextpage.php. Nextpage.php *does not* submit any data 
to MySQL. Read my post again, carefully this time.

And please include the list when replying.

-Stut

> */Stut /* wrote:
> 
> sam rumaizan wrote:
> > How do I disable Refresh and Back button. to Prevent duplicate entry
> 
> Disabling client-side features like refresh and back is not the right
> way to solve this problem. The most common solution is to redirect the
> user to the next page from the form handler rather than outputting the
> next page from the form handler.
> 
> For example...
> 
> form.php shows the form, which submits to formhandler.php which
> processes the form and then does a header('Location: ...') redirect to
> nextpage.php.
> 
> If the user hits refresh after submitting the form they will refresh
> nextpage.php. If they hit back they will be taken back to form.php.
> 
> -Stut
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> Food fight? 
> 
> Enjoy some healthy debate
> in the Yahoo! Answers Food & Drink Q&A. 
> 
> 





 

 
---------------------------------
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.

--- End Message ---
--- Begin Message ---
Sam,

Sorry to disappoint you, but this is also a client-side value, not a 
server-side value. You can't get to it.
 
Thank you,
Jarrett Meyer
http://jarrettmeyer.blogspot.com

No trees were harmed during this transmission; however, several electrons were 
terribly inconvenienced.

----- Original Message ----
From: sam rumaizan <[EMAIL PROTECTED]>
To: [email protected]
Sent: Saturday, April 7, 2007 6:47:19 AM
Subject: [PHP-WIN] How to read the username

I need my webpage to read the username of the PC (machine). Is it possible to 
do this with PHP?
   



 

 
---------------------------------
The fish are biting.
 Get more visitors on your site using Yahoo! Search Marketing.

--- End Message ---
--- Begin Message ---
sam rumaizan wrote:
I need my webpage to read the username of the PC (machine). Is it possible to 
do this with PHP?

Yes it is, but you need to set it up right. What you're after is NTLM authentication. If you're using IIS then this is pretty easy, just change the permissions on the website to require authentication. If you're using Apache you'll need to find a module to handle this for you, there are several but it's been a while since I've looked into this.

In short, Google for "NTLM authentication" and add the name of your web server. When I did this a few years ago with Apache running on FreeBSD it took a while to get it set up and working properly, but it was worth it.

-Stut

--- End Message ---
--- Begin Message ---
I have to different pages (forms) one.php and two.php  I created two different 
pages (onemysql.php and twomysql.php) to handle myql data for each of them   I 
add header("Location: one.php"); to onemysql.php
  And header("Location: two.php"); to twomysql.php
  one.php works fine.   two.php give me this Warning:   Warning: Cannot modify 
header information - headers already sent by (output started at C:\Program 
Files\xampp\htdocs\xampp\Activity_Log\html\twomysql.php:1) in C:\Program 
Files\xampp\htdocs\xampp\Activity_Log\html\twomysql.php on line 3



 

  
---------------------------------
Looking for earth-friendly autos? 
 Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.  

--- End Message ---

Reply via email to