Title: user input to databae
Last modified: January 31, 2022

---

# user input to databae

 *  [hanzter](https://wordpress.org/support/users/hanzter/)
 * (@hanzter)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/user-input-to-databae/)
 * L.S.
    Question, i have several textboxes on a page, the visitor puts text in 
   this boxes like name etc… I got a button and when clicked i kick of a short code
   and then kick of a function in functions.php to insert the data into the dtabase,
   Short code in a script is not supported. Is there an other way
 * many thanks,
 * hanz
    -  This topic was modified 4 years, 4 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
      Reason: Moved to Fixing WordPress, this is not an Developing with WordPress
      topic

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [4 years, 4 months ago](https://wordpress.org/support/topic/user-input-to-databae/#post-15308368)
 * What plugin are you using for this?
 *  Thread Starter [hanzter](https://wordpress.org/support/users/hanzter/)
 * (@hanzter)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/user-input-to-databae/#post-15308423)
 * Hello Steve,
 * I’m not using a plug in.
    i’m using DOM, html and php in functions.php.
 * hanz
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [4 years, 4 months ago](https://wordpress.org/support/topic/user-input-to-databae/#post-15311266)
 * what is the source of this shortcode and how are you using it?
 *  Thread Starter [hanzter](https://wordpress.org/support/users/hanzter/)
 * (@hanzter)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/user-input-to-databae/#post-15313779)
 * wp does not allow to use a shortcode in a script it takes the parameter as literal
   not the value of the parameter. This value should then be used in functions.php
   to insert it in a database.
    I think i better make a form to get the dta the 
   user fills in and then insert it into the database. I do not see an other way
   to get data from the page to the database.
 * —this is in my page—–
 *     ```
       <script>
       function saverecordtodtabase() 
       {
       $qsorecord=document.getElementById("callsign").value;
        [qsologlogqsorecord $qsorecord]
       }
       </script>
       ```
   
 * —this is in functions.php–just an echo for debugging willleter be an dtabase 
   insert sql statement.-
 *     ```
       function qsolog_log_qso_record($atts) {
       global $wpdb;
       global $qsorecord;
       	$qsorecord=$atts[0];
              echo($qsorecord);
       }
   
       add_shortcode( 'qsologlogqsorecord', 'qsolog_log_qso_record' );
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘user input to databae’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [script](https://wordpress.org/support/topic-tag/script/)
 * [Short Code](https://wordpress.org/support/topic-tag/short-code/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [hanzter](https://wordpress.org/support/users/hanzter/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/user-input-to-databae/#post-15313779)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
