You’ve already got a check for $_POST
== empty.
**if (!empty($_POST)){
$pfs = pfs_submit($_POST,$_FILES);
echo json_encode($pfs);
//echo "<pre style=\"border:1px solid #ccc;margin-top:5px;\">".print_r($pfs, true)."\n";
wp_redirect("http://domda.se/tack/");
exit;
} else {
/* TODO: translate following */
_e('Den här sidan hade du inte behövt se, något är fel.','pfs_domain');
echo "<a href="".get_bloginfo("url')."'>" . __('Go home?','pfs_domain') . "</a>";
}**
Add an error handler there. You will need to pass a parameter through wp_redirect
…
wp_redirect("http://domda.se/tack/?myerror=error-code");
And process it on the receiving page…
if (isset($_GET['myerror'])) {
// do stuff
}
Related Posts:
- Let readers suggest edits from the frontend
- Contributive page where people logged in can write
- Trying to fix form resubmition with PRG (Getting error: Cannot modify header information – headers already sent by)
- AJAX fileupload – TypeError: not a function ajaxSubmit()
- Plugin for visitors to edit content without logging in? [closed]
- Capturing POST data
- submit posts by unregistered users in wordpress
- Calendar Solution: Handling upcoming Dates with Posts?
- qTranslate conflicts with SEO-plugins [closed]
- get_post_type on post.php
- Is there an easy way to flag posts in the admin area?
- CSV file generation failing
- Plugin: Google Analytics for Dashboard error – Timestamp is too far from current time
- finding whether request is for post, and post id
- How to redirect a URL with parameters?
- When using Simple Fields plugin, how do I pull the information out of the database to display on a page?
- Anonymous Postings
- Problem using Press-this book marklet
- Any built-in function to associate a post to category through a plugin?
- Creating an online questionnaire form – by Importing the questions from a spreadsheet?
- Can I use custom CSS and js plugin to put JavaScript in to validate my forms
- How to hide some section in WordPress under Post
- Using a custom plugin to capture input data via Ajax and PHP
- Python with wordpress plugin
- Display post lists in 2nd paragraph
- Can’t delete Draft Post [closed]
- Matching Chapters to a Custom posts [closed]
- Nonce failing on form submission
- WordPress comments not appearing in blog posts, likely because of Redux template. Could I fix this with a plugin that adds a comment form as a block? [closed]
- WordPress display breadcrumbs using Yoast plugin [closed]
- Outbound link autometic converted into linkdirect , and not opening
- Display by Category in Admin
- auto populate list of questions if user select a category xyz
- WordPress WPforms customization
- Preg Match All doesn’t Allow echo first character for WordPress Taxonomy Tags
- How to allow an editor to edit all WordPress blog posts but have the last say as administrator?
- Two problems on my WordPress installation [closed]
- Uncaught TypeError: jQuery(…).flipster is not a function in wordpress
- posts comments goes to trash
- WordPress site periodically goes down
- Contact Form 7 Get Image Function [closed]
- Excerpts on category page
- Submit page limited in time to upload image
- Deactivating all plugins and reactivating one by one, fixes conflicts. Why?
- Adapt PHP form action for WordPress?
- How to pull email and name from Flamingo plugin
- Which widget to use for display category post with view more? [closed]
- Is there any way to use google input tool or any other language keyboard with WordPress [closed]
- Ajax fail and get 504 error
- Why do plugins deactivate by themselves?
- Take input from form and pass it to function using a wp-plugin
- WordPress shows error related to allow_url_fopen
- Checkbox conflict in my custom plugin admin page
- External RSS feed to WordPress Portfolio
- How to insert HTML/JavaScript form into WordPress page? [closed]
- AFNetworking incorrectly interpreted WP_Error
- How do I make a child theme I made POST through a 3rd party plugin?
- Updated 4.3 Getting Error: Warning: call_user_func_array() expects parameter 1 to
- WP Plugins – Use includes to display page content
- Display wordpress post’s in popup?
- Unable to get WP_DEBUG, WP_DEBUG_DISPLAY, WP_DEBUG_LOG to work
- Get errors from WP_Error to different variables
- How to fetch form data and show it to my page?
- Unable to add TAB character to post?
- Plugin to create forms using HTML [closed]
- how to add text to posts from tags
- Submit custom form from post content and execute in plugin
- How to allow user to select User ID in Formidable Pro form? [closed]
- Char limit on custom blog-post form? [closed]
- Getting a “Warning: call_user_func_array()” error whenever I install/update a plugin
- Add category selection to custom post type (plugin)
- Why am I getting a “Call to undefined function curl_init()” when I try to use the Sociable plugin?
- Redirect to another page using contact form 7? [closed]
- Would Gutenberg be considered a PlugIn?
- pagination on data fetched using SQL query
- How to delete all trashed item in one-go
- after wordpress update to 3.5+ i get many errors in plugin wpdb::prepare()
- Is there a way to embed a Google Docs form in a page without using plugins?
- What’s causing this error? “Warning: Invalid argument”
- How to get the first post and second post in a wordpress blog?
- Is it possible to send blog posts via email to subscribers?
- Custom setup of wordpress comments that are displayed
- Is there any plugin which can paste a common content to my every post?
- Detailed form plugin, with ability to export to excel etc. OR edit PDF live? [closed]
- easy steps to make front end form without plugin
- Recent posts per category loop?
- help with my wordpress website
- ‘Organize Series Plugin’ as muti author feature
- Form that generates an ID for the customer
- WordPress error: Options page Setting_ not found in the allowed options list
- Import Instagram post to WordPress blog post
- Problem of encoding characters (apostrophes) in my posts publications
- How to backup single post in wordpress [closed]
- HTTP 500 error after plugin install
- Submit Form data to another page via Ajax (WordPress Way)
- Editing a text file from plugin menu
- How to get all posts belongs to a user between a certain date
- Can’t activate Plugin: unexpected T_STRING, expecting T_FUNCTION [closed]
- How do I publish portfolio items with a future date?
- wordpress content .php file in an iframe’s src in a wordpress post