How to store data in backend in wordpress? - php

I have applied a contact form 7 in a page and want to store the values in backend also. Right now values are going to email id. Please help me. Thank you

Looking on the home page it seems you can install flamingo plugin to do exactly that wordpress.org/extend/plugins/contact-form-7. Link to flamingo wordpress.org/extend/plugins/flamingo

Hook the plugin before the mail is sent.
function save_email (&$WPCF7_ContactForm) {
# write the code to get the email address
# and save it to your database
# you might want to use print_r($WPCF7_ContactForm)
# to get the values used by the form
}
add_action("wpcf7_before_send_mail", "save_email");
This plugin might help you if you are not into coding your own stuff.

Related

Woocommerce Login Form

I just know you guys are a knowledgeable lot, and can possibly help me. Iv’e looked everywhere on the net, and cannot seem to find anything, the things I do find simply don’t work.
It’s in regards to Woo Commerce.
What I want to achieve is basically, separating the registration page from the login. Currently we have to use the my account short code, which places both Login and Register forms on the same page, and the register form, is just Email Address.
What I want to do, is to have the same page, but instead of the register form. A button that says “new users register here” and this sends them to a register page. On that page, I would use the Ninja Forms plugin to have a register form.
Can anyone help?
I would try display none the register elements. You could use javascript or html to add a button with a link to the page with the ninja form.

Wordpress send the url the registration form was filled out at as part of the email

I have a wordpress site with two registration forms on it, they are located on two different pages via "theme my login" short code. I would like to be able to track which of the form's the user submitted the registration form on, I'm thinking via the admin email that notify me there is a new user or even as a field as Im using Cimy user extra fields, my question is
1) are either of these options possible
2) which is quicker / easier to achieve as It has to be done asap
3) can you point me in the right direction for guides or even the codex if its that simple.
im guessing the I would need to find the hook in wordpress that is responsible for the admin email and add the wordpress either $_SERVER['REQUEST_URI'] or a wordpress equivilant?
You can include the url of the page which you embed the form, in the email. You can use hidden input field if you have used a custom form. If you have used contact form 7 plugin, you can get needed information from this url http://contactform7.com/special-mail-tags/

How to log in website (like linkshare) using php curl?

the login page is here
https://login.linkshare.com/sso/login
can anyone tell me how to log in this website using php curl.
something special about this website is that the form on the above page has a action url which is a relative path.
Thank you very much!
It is quite simple, almost everything you'll need you can find in here.
Just pay attention to the 2 hidden fields that you need to retrieve first and then append to your request: lt and execution. There are more hidden fields but their values don't change.

Wordpress contact form 7 post variables

I need to build upon a contact form 7 plugin to pass the inputs as $_POST into a second page upon submit. Google has proved rather fruitless with this. Does anyone have an idea of how to do this/where I can find a solution?
Thanks in advance
Dan
Use this plugin: http://wordpress.org/extend/plugins/contact-form-7-3rd-party-integration/
But if you prefer to do it manually - basically this is the hook you should use: wpcf7_before_send_mail

How can I pass variables from a form within the Wordpress platform?

I'm building a website using Wordpress. The WP-Events plugin is being used to display a list of upcoming events. What I need is for people to be able to confirm their attendance at any particular event.
WP-Events is a bit awkward in that it's customised using a template that is only able to be edited with the Wordpress admin. I used this template in combination with the Wordpress 'Loop' to generate a form for each event that could be filled in and submitted. I then was going to use jquery to toggle the display of each form as to not make the page massive. This plan collapsed when I wasn't able to implement any form validation.
What I have now is a list of events on one page, and a confirmation form on another. What I now need is to pull the event name, date and location from the selected event, and pass them across for use in the form. The problem is that wordpress' permalink structure doesn't seem to allow me to add a variable (ie. example.php?variable=1 ).
It it possible to do this?
thanks in advance,
Greg.
Unless you modified something, out of the box Wordpress will allow you to use GET variables, because it uses them too (for previewing posts).
If you installed something that removed all of the GET parameters, you might want to uninstall that. But out of the box Wordpress will let you use GET parameters.
I have tried both GET and POST with no effect. If you have PHP processing a GET variable on a WP Page, the URL is:
/page/?variable=something
And PHP is not recognizing this at all.
Use add_query_arg function. Codex.

Categories