Accessing MySql database from page function
-
Hi. I am new to wordpress. I have made an installation on Bluehost, and have set up a MySql database with a user and with a table. I have edited the wp-config.php file, under the “public_html” directory, to point to it. I have created a page and put a form on it with some <script> functions. What I have not been able to do is to put code in one of the <script> functions to interact with the MySql database. I have looked at the $wpdb article but have not been able to come up with any working syntax to do any connecting, row insertion, selection, or any querying at all. No matter what I try, the page just stops doing the other input and output stuff which it was doing before I tried to put in some database code. I think that what i need is something that describes some exact syntax and complete example about how to put that code into a <script> function. On the other hand, maybe there is somewhere else the database code needs to go which I don’t know about. I sure could use a good example and some further direction. My domain is https://www.mysimplesurvey.com, but i don’t think the page i am working on is visible yet. Thanks in advance — Phil Marks.
- The topic ‘Accessing MySql database from page function’ is closed to new replies.