close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

After Form Submits, it goes back to the same page

Thread began 3/11/2010 12:53 pm by dinohorn397192 | Last modified 3/11/2010 7:10 pm by dinohorn397192 | 849 views | 6 replies |

dinohorn397192

After Form Submits, it goes back to the same page

I attached the code, I have looked at it for a long time and can't find anything wrong with it. The data gets submitted the database successfully.

Thanks

Attached Files
new.php.zip
Sign in to reply to this post

dinohorn397192

FYI: I used CSS Form Builder to create the form and DataAssist Insert Single Record.

Thanks again

Sign in to reply to this post

Jason ByrnesWebAssist

the following code is preventing the header() function from redirecting the page:
echo "Starting to output current session data";
print_r($HTTP_SESSION_VARS);



if you where to add this code at line 1 to turn error reporting on:

php:
<?php 

error_reporting
(E_ALL);
ini_set('display_errors','on');
?>




you would see that there is Headers Already Sent error occurring.

the headers already sent error occurs if there is any output to the page before the session-start() or header() functions are called. you code:
the following code is preventing the header() function from redirecting the page:

echo "Starting to output current session data";
print_r($HTTP_SESSION_VARS);



is causing the output to the page, which is preventing the header() function from executing.

Sign in to reply to this post

dinohorn397192

Thanks for the quick reply. I removed ..

<?php

// this starts the session
session_start();

// echo variable from the session, we set this on our other page
echo "Starting to output current session data";
print_r($HTTP_SESSION_VARS);

?>

and put in the error output message you showed me. When they page loads, I still get a header error (image attached). When I submit, I sent the second error (image attached).

Sorry, I'm new to php... I guess I was trying to session_start() twice on one page. It's still doing the same thing.

Thanks

Sign in to reply to this post

dinohorn397192

This is line 89, from the second screenshot.

header("Location: ".$WA_redirectURL);

Sign in to reply to this post

Jason ByrnesWebAssist

see the following page for information on the headers already sent error:
148/

Sign in to reply to this post

dinohorn397192

Thank you! It was 1 whitespace after a "?>" !!!!

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...