wp_remote_post not working on my godaddy wp install
-
On my local MAMP install with wordpress, my site works fine. I am using wp_remote_post to take the values from the webpage form and send them to the php file that will insert the data into the database table in my wp database. This is called in the functions.php file for my theme.
// create an array of the form fields to pass to the php file that will handle inserting // new data into the database table $fields = array( 'off_team_name' => $_POST['off_team_name'], 'def_team_name' => $_POST['def_team_name'], 'user_id' => $_POST['user_id']); // this calls the php file that will insert the data into your database table wp_remote_post( 'https://localhost/my_stuff/select.php', [ 'body' => $fields, ]);
Viewing 15 replies - 1 through 15 (of 15 total)
Viewing 15 replies - 1 through 15 (of 15 total)
- The topic ‘wp_remote_post not working on my godaddy wp install’ is closed to new replies.