duplicate entry

duplicate entry

am 06.04.2007 01:15:36 von sam rumaizan

--0-1355551027-1175814936=:4025
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

How do I disable Refresh and Back button. to Prevent duplicate entry






---------------------------------
Don't be flakey. Get Yahoo! Mail for Mobile and
always stay connected to friends.
--0-1355551027-1175814936=:4025--

Re: duplicate entry

am 06.04.2007 02:10:41 von bob plano

maybe you could just check the data base at the beginning of the
script for whatever you're adding

On 4/5/07, sam rumaizan wrote:
> How do I disable Refresh and Back button. to Prevent duplicate entry
>
>
>
>
>
>
> ---------------------------------
> Don't be flakey. Get Yahoo! Mail for Mobile and
> always stay connected to friends.

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

Re: duplicate entry

am 06.04.2007 03:09:17 von Jarrett Meyer

Create a 'key' in the submission, something like...



Check that "form_start" does not already exist in the database, or, even better that form_generation and form_user carries a unique key. Then check for a SQL collision. That would be superior to a select and an insert.

Using linked relations and keys is your friend, as long as you have a database that supports these utilities.

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
To: php-windows@lists.php.net
Sent: Thursday, April 5, 2007 7:15:36 PM
Subject: [PHP-WIN] duplicate entry

How do I disable Refresh and Back button. to Prevent duplicate entry






---------------------------------
Don't be flakey. Get Yahoo! Mail for Mobile and
always stay connected to friends.

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

Re: duplicate entry

am 06.04.2007 03:12:27 von Jarrett Meyer

Sorry, but to answer the original question, PHP cannot interact with the client in this way. PHP resides with the server. Javascript resides with the client, and even that is, at best, unreliable, since it can be turned off and/or not work the same with all browsers.

You have to look for answers that can be solved from your end without involving the client.

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
To: php-windows@lists.php.net
Sent: Thursday, April 5, 2007 7:15:36 PM
Subject: [PHP-WIN] duplicate entry

How do I disable Refresh and Back button. to Prevent duplicate entry






---------------------------------
Don't be flakey. Get Yahoo! Mail for Mobile and
always stay connected to friends.

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

Re: duplicate entry

am 06.04.2007 08:23:56 von Chandar V R

In javascript you can force the page to redirect to the same one
whenever he goes to someother page using back,this can be done using
javacript.history.back()
functions

Jarrett Meyer wrote:
> Sorry, but to answer the original question, PHP cannot interact with the client in this way. PHP resides with the server. Javascript resides with the client, and even that is, at best, unreliable, since it can be turned off and/or not work the same with all browsers.
>
> You have to look for answers that can be solved from your end without involving the client.
>
> 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
> To: php-windows@lists.php.net
> Sent: Thursday, April 5, 2007 7:15:36 PM
> Subject: [PHP-WIN] duplicate entry
>
> How do I disable Refresh and Back button. to Prevent duplicate entry
>
>
>
>
>
>
> ---------------------------------
> Don't be flakey. Get Yahoo! Mail for Mobile and
> always stay connected to friends.
>
>

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

Re: duplicate entry

am 06.04.2007 12:37:39 von Stut

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

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

How to read the username

am 07.04.2007 12:47:19 von sam rumaizan

--0-126926282-1175942839=:86273
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

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.
--0-126926282-1175942839=:86273--

Re: duplicate entry

am 07.04.2007 13:04:23 von Stut

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.
>
>

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

Re: duplicate entry

am 07.04.2007 13:21:56 von sam rumaizan

--0-1340702574-1175944916=:65626
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Thank you it works fine

Stut 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.
--0-1340702574-1175944916=:65626--

Re: How to read the username

am 07.04.2007 19:24:49 von Jarrett Meyer

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
To: php-windows@lists.php.net
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.

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

Re: How to read the username

am 07.04.2007 19:45:31 von Stut

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

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

Warning: Cannot modify header information

am 08.04.2007 12:49:15 von sam rumaizan

--0-1330640065-1176029355=:47497
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

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.
--0-1330640065-1176029355=:47497--

RE: Warning: Cannot modify header information

am 08.04.2007 13:27:31 von George.Pitcher

Sam,

> 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
>
You should search the archives before posting. This is one of the most
common queries. You probably have an echo statement or a blank line bofeore
your header() command. Remove or comment out and it should work.

George

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

RE: Warning: Cannot modify header information

am 08.04.2007 13:36:05 von sam rumaizan

--0-610885870-1176032165=:75882
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Thank you George,
it works fine. as you said. there was a blank line bofeore George Pitcher wrote:
Sam,

> 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
>
You should search the archives before posting. This is one of the most
common queries. You probably have an echo statement or a blank line bofeore
your header() command. Remove or comment out and it should work.

George

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








---------------------------------
No need to miss a message. Get email on-the-go
with Yahoo! Mail for Mobile. Get started.
--0-610885870-1176032165=:75882--

Re: duplicate entry

am 09.04.2007 03:26:35 von bedul

use session on your page..
----- Original Message -----
From: "Jarrett Meyer"
To:
Sent: Friday, April 06, 2007 8:12 AM
Subject: Re: [PHP-WIN] duplicate entry


> Sorry, but to answer the original question, PHP cannot interact with the
client in this way. PHP resides with the server. Javascript resides with the
client, and even that is, at best, unreliable, since it can be turned off
and/or not work the same with all browsers.
>
> You have to look for answers that can be solved from your end without
involving the client.
>
> 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
> To: php-windows@lists.php.net
> Sent: Thursday, April 5, 2007 7:15:36 PM
> Subject: [PHP-WIN] duplicate entry
>
> How do I disable Refresh and Back button. to Prevent duplicate entry
>
>
>
>
>
>
> ---------------------------------
> Don't be flakey. Get Yahoo! Mail for Mobile and
> always stay connected to friends.
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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

Re: duplicate entry

am 09.04.2007 07:59:13 von Alf C Stockton

>>
>> How do I disable Refresh and Back button. to Prevent duplicate entry
>>
I used :-
ALTER TABLE table-name ADD CONSTRAINT NoDuplicates UNIQUE
(Date,MemberNumber)

--
Regards,
Alf Stockton www.stockton.co.za

Your love life will be... interesting.
My email disclaimer is available at www.stockton.co.za/disclaimer.html

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

Re: duplicate entry

am 09.04.2007 08:04:35 von Alf C Stockton

Alf Stockton wrote:
>
>>>
>>> How do I disable Refresh and Back button. to Prevent duplicate entry
>>>
> I used :-
> ALTER TABLE table-name ADD CONSTRAINT NoDuplicates UNIQUE
> (Date,MemberNumber)
>
Have a read of :-
http://www.thescripts.com/forum/thread156807.html


--
Regards,
Alf Stockton www.stockton.co.za

You should emulate your heros, but don't carry it too far. Especially
if they are dead.
My email disclaimer is available at www.stockton.co.za/disclaimer.html

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