|
Posted by Jerry Stuckle on 08/11/06 02:49
mantrid wrote:
>>I think your problem is not the if statement - I suspect $updatestats
>>isn't being set. What code do you have that sets it?
>>
>
>
>
> That occured to me so I tried
>
> <form action="<?php if(isset($_POST['updatestats'])){
>
> instead of
>
> <form action="<?php if(isset($updatestats)){
>
> but still no luck, but I got round it by getting rid of the 'if' in the form
> action and placing them at the top of the page, as below
>
> ****************************************************
> if(isset($download)){
> header("Location: http://www.mysite.co.uk/excelsave.php");
> }
>
> if(isset($updatestats)){
> script for creating confirmation version of original page
> }
>
> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"
> enctype="multipart/form-data"> name="savestatments">
>
> ***************************************************
> However I would still like to know why the first method didnt work.
> Thanks all for the support
>
>
> Ian
>
>
Ian,
Were you trying to change the action based on a click on the same page?
If so, it won't work.
PHP is server side. By the time the page gets to your browser, PHP has
done its job and ended processing for this page.
Your if statement should work if $_POST['updatestats'] was set when this
page was called. But only then.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|