0

i need to create a static page that allows me to code HTML/JS/PHP that connects to a separate MYSQL backend.

how can i achieve such in wordpress page?

2 Answers 2

1

i need to create a static page that allows me to code HTML/JS/PHP...

Create a custom page template and integrate your structure in it.

.. that connects to a separate MYSQL backend.

I don't know why you want a separate MySQL backend. In your comment, you tell that you're making a contact form. I guess you'll want to save messages in your database. You could just create a table manually in PHPMyAdmin (or make a plugin that does it for you).

You can then use the WPDB Class to easily connect to your current database and manipulate data in your added table.

As a side note, I strongly recommend you to prepare your queries before any operation.

0

To connect to a MYSQL database outside use global $wpdb. What do you need it for (I need more info to be able to help you)? Look in to either writing a custom post type or create a custom template.

see codex for more info http://codex.wordpress.org/Class_Reference/wpdb

4
  • im creating a custom HTML form and the values will be stored in the database. and was thinking to create a separate DB for all those fields aside from the existing DB where my WP resides. not sure how i can utilize the WP database so all my form fields will be stored there instead. but im limited to my knowledge thats why i opted to create another DB where my FORM submitted values will be stored. let me know if you have other good ideas how i can address my issue. Commented Aug 5, 2013 at 5:45
  • I would advice you on looking at already existing plugins, since what you are asking for is quite complex and can´t really be answered here or you have to write one your self. There is a third way: Look in to custom templates and write your form straight in to it (this is not recommended) Commented Aug 5, 2013 at 5:53
  • what i really am creating is a contact form with conditional statements. (like, if i click this button, this textbox appears) sort of instructions. the ones available requires me to purchase to have that kind of features and the reason why i decided to code my own. I just need a static page where i can code HTML/JS/PHP to create my own conditional contact form. Commented Aug 5, 2013 at 6:00
  • Look at contact form 7 it is a contact form that have functions that you might need. Commented Aug 5, 2013 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.