title: Insert client input into MySQL database with C
body: <p>How do I write a C program which gets the client input for MySQL server? I'm using Fedora as my OS.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>#include&lt;my_global.h&gt;
  #include&lt;mysql.h&gt;
  
  main()
  {
      char name[25];
      MYSQL *conn;
      conn=mysql_init(NULL);
      mysql_real_connect(conn,"localhost","root","","testdb",0,NULL,0);
      printf("Enter your name:");
      scanf("%s",name);
      mysql_query(conn,"CREATE TABLE Users(name VARCHAR(25))");
  
      mysql_query(conn,"INSERT INTO Users VALUES(name)");
      //mysql_query(conn,"INSERT INTO Users VALUES('Farhan')");
      //mysql_query(conn,"INSERT INTO Users VALUES('Dileep')");
      //mysql_query(conn,"INSERT INTO Users VALUES('RAJIV')");
  
      mysql_close(conn);
  }
  </code></pre>
  
  <p>I want the client input to be stored in MySQL database and not the constant values.</p>