|
Posted by Curtis on 02/05/07 07:49
On Sun, 04 Feb 2007 20:29:59 -0800, ansc1 <wdurupan@gmail.com> wrote:
> Hello, I'm new to using php coding. I need help with the following:
> 1. There is a submit button on the form and is saves information to
> my database. After clicking on "Save Measurement" it redirects me to
> another page in my site.
>
> What I would like to do is change what page directs it to. Currently
> the submit button redirects me to page /measure/men_measure. I would
> like to be able to change this.
> Please see below my page below:
> <snip>
You've posted quite a lot of unnecessary code (no need to see your
JavaScript, for example) there, and it's hard to want to look through it
all. You can change where the form submits by simply pointing to whatever
script you want in the action attribute in the form tag. If you want to
redirect in your PHP script, you need to use the header() function (see
<http://php.net/header>). You should also only use the header function
before any output is sent, which includes any whitespace before "<?php"
and after "?>". If you need to, you could use output buffering to mitigate
said requirement.
--
Curtis, http://dyersweb.com
[Back to original message]
|