Thread: submit form?
View Single Post
  #4 (permalink)  
Old 12-12-03, 12:01 PM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
well , it depends on what are the conditions you want ..
like when do you want it to be submited to itself and when do you want it to be sent to another ?
anyway IF statments are your friends in this case ..
example :
PHP Code:

if ( $condition_1 === true ) {

$dist=$_SERVER['PHP_SELF']; //this will post to the file itself ..
} elseif ( $condition_2 === true ) {
$dist='new_file.php'//the other file you want to post to ..
}

echo
'<form method="POST" action="'.$dist.'">'
that's how you change the direction of the file ..
but give us more details so we can help more ..
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]

Last edited by NeverMind; 12-12-03 at 12:04 PM.
Reply With Quote