How to manage MySQL database in Azure?

How do I get a web form to write to a MySQL database using PHP myAdmin?

  • I am trying to use a webform to post data to my MySQL database. I have all of this set up on my website that is hosted on yahoo. I have php MyAdmin installed on the server to manage the database. For some reason, I can't get my webform to post the info to my database. Can anyone help?

  • Answer:

    <?php // assuming you are posting a field called 'first_name' $first_name =$_POST['first_name']; //use proper values for mysql_user and mysql_password //use proper value for localhost, if you are not using local host. $link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); if (!$link) { die('Could not connect: ' . mysql_error()); } //assuming you are entering this field in a table called 'myfriends' $query = "INSERT INTO myfriends(first_name) VALUES('$first_name')"; mysql_query($query); mysql_close($link); ?>

eric j at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.