Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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.

share|improve this answer

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

share|improve this answer
    
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. –  user1735120 Aug 5 '13 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) –  StenW Aug 5 '13 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. –  user1735120 Aug 5 '13 at 6:00
    
Look at contact form 7 it is a contact form that have functions that you might need. –  StenW Aug 5 '13 at 12:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.