We help IT Professionals succeed at work.
Get Started

PHP - BUTTON HTML question

funkkube asked
Last Modified: 2013-12-12
I need to run the following

$query = "insert into wp_posts (post_content,post_title) values ('{$final}','{$_POST["title"]}')";

Open in new window

when a button is pressed on a page in Wordpress..

I have a bunch of if else statments that check for errors from the previous page and after that there are two buttons..
One to go back and correct the mistakes and then I want another button to appear if there are not any mistakes to correct and then run the above query then goto to the original page..

i have this

 <form> <input onclick="history.go(-1)" type="button" value="Go Back And Correct Entries" /> </form> <form> <input onclick="parent.location='http://www.rodbournehistory.org/?page_id=3279'" type="button" value="ADD ANOTHER RECORD" />
$query = "insert into wp_posts (post_content,post_title) values ('{$final}','{$_POST["title"]}')";

Open in new window

but it is not working exactly..
I know im eing dumb on this but can anyone help?

Watch Question
This problem has been solved!
Unlock 1 Answer and 9 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE