Forum Moderators: coopster

Message Too Old, No Replies

Problems with editformAction

I'm trying to redirect my page upon submitting

         

dainstructor

5:29 pm on Feb 28, 2007 (gmt 0)

10+ Year Member



I'm having trouble redirecting my users back to the previous page once they've completed and submitted a form. This is usually not a problem as I edit the form's action to read something like:


<form method="post" name="form" action="EditProjects.php">

This is not working with this form however. If I use the code above the form will redirect but not submit. If I leave it as :


<form method="post" name="form" action="<?php echo $editFormAction;?>">

it will submit but not redirect. I am still somewhat new and I don't completely understand what the $editFormAction does, but it seems as if it should work.

Any ideas?

henry0

6:10 pm on Feb 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



// top of form
<form action ="myProcess.php" method="post">
// bottom of form
<input type="submit"></form>

// when myProcess.php job is done
// you may redirect as follow
// if OB is turned on in your php.ini
header("Location:where_ever_you_want_to_go.php");

However in order to help you better we need to see more code

what is related to: $editFormAction

dreamcatcher

6:17 pm on Feb 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



dainstructor, always set your error reporting to E_ALL, to filter out any problematic variables.

error_reporting(E_ALL);

dc