You are here: Refresh Problem « PHP « IT news, forums, messages
Refresh Problem

Posted by Jose Angel Sanchez on 02/09/05 15:49

Hi

First of all: I'm sorry for writing errors - I don't speak English too
much (spanish)

I'm building an application which works that way:

I use url parameters to set zone (document location), actions and
params.

I've badly make security part so only registered people
($_session['USER'] <- which is set after check Login/pass form) can
access different zones but my problem is on refreshing page that
contains action

i.e.
http://www.mypage.com?index.php&zone=contact&action=newcontact&name=geor
ge

only registered/valid users can make this zone code runs

my pseudocode basicly works this way:

function contactzone (no params)

get URL parameters (like $action=$_get['action']

<some code>

switch ($action)

case 'new'
$html.= show form (on submit set action to
'newcontact'
break;
case 'newcontact'
Insert on database
On success -> $html
Default
Show simple $html
}
<some code>

return $html


My problem is on refresh or back events on navigator; the action will
execute again.

How do I prevent that? Session variables? Check a single table storing
used hashes sent by form (generated with md5 or any) on all forms
containing actions event for all tables? What do you think?

Sorry again and thx for reading and helping :D

j0n3

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация