Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

PHP Form Generator Problem

Posted on 2004-09-29
8
Medium Priority
?
218 Views
Last Modified: 2008-03-06
Hello all,

I am stuck in the middle of a jam here.  I've been using PHP Form Generator for all inquiries from my site.  For some reason, the page after you hit submit (which goes to process.php and e-mail's you the info) a blank page shows instead of the thank you page.  We get the inquiry, but the blank page confuses people and they just keep on hitting submit and then give up.  I've been able to change that to just say Thank you, but it still looks very unprofessional.

Any ideas on correcting this issue?

Thanks,

Adam

0
Comment
Question by:Auctionboss
  • 4
8 Comments
 
LVL 27

Expert Comment

by:Diablo84
ID: 12181185
Prehaps redirecting the user back to the form page would be suitable?

At the top of the page (or after the processing but before any output) add

<?php
header("location: page_to_display.php");
exit;
?>
0
 

Author Comment

by:Auctionboss
ID: 12181302
I have the following at the bottom of the page:
header("Refresh: 0;url=/thankyouAD.html");
?><?php
?>

Doesn't seem to want to work..  I also check to see if the PHP engine was working, and I've been told that it is.

This is why it's so mind boggling.  How can something work fine for weeks, but then, all of a sudden stop working?

Just strange.

0
 
LVL 27

Accepted Solution

by:
Diablo84 earned 500 total points
ID: 12181729
If its at the bottom of the page and there is any output before it then it will not work.

Have you recently made any changes to the page?

Check for ANY output before that line, php echo/print, html, new lines outside of the <?php tags

Also if the refresh is instant (ie. no delay) it would make more sense to use header("location: thankyouAD.html");
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 27

Expert Comment

by:Diablo84
ID: 12181740
You can also add the following to the top of the file

error_reporting(E_ALL ^ E_NOTICE);

to get an idea of any errors that are occuring in case you have your level of error checking reduced.
0
 
LVL 1

Expert Comment

by:Codeit1978
ID: 12199956
Can you post the code?
0
 
LVL 27

Expert Comment

by:Diablo84
ID: 12242414
hi Auctionboss,

I'm just going back over some older questions that are still open to check that everyone has their problem solved. Did you resolve the issue or is any more suggestions needed?

Best Wishes

|)iablo
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question