Value from other input into democracy_a database
-
Hi again..
I have added an Email input field and would like to store the users input in a variable so I can see the input user email together with the answer they gave in the database.
I have added a new column in the database called author and added ‘author’ at the end of this:$exists = $wpdb->query( $wpdb->prepare("SELECT aid FROM $wpdb->democracy_a WHERE answer = '%s' AND qid = $this->id", $new_answer ) ); if( ! $exists ) if( $wpdb->insert( $wpdb->democracy_a, array( 'qid'=>$this->id, 'answer'=>$new_answer, 'votes'=>0, 'added_by'=>1, 'author'=>$author) ) )– with this, if
$author = "[email protected]"
‘[email protected]’ appears in the new column in the database next to the users answer.So I’m wonder how to get the value from my email input box and store it in a php variable that I can use here?
My best guess so far has been $_POST[“name”] but no luck 🙁
Thanks in advance!
W
The topic ‘Value from other input into democracy_a database’ is closed to new replies.