Thanks Toxe, DaveTheCoder., Tomcat.
It will be a web export on a WP site URL- running in a browser.
I will stick to MySQL to be fully compatible with existing WP default. (Avoiding porting too much over to MariaDB replacement- the Github demo video is hours of work for an expert- days for me), and because lots of other plugins I'm using are optimised for Mysql wp tables.
..
Yes HTTP is one way, mentioned on the WP API, however I would prefer direct PHP instruction, avoiding HTTP bottlenecks/ delays- it is like talking to yourself through a telephone- or using a car to return to where you are standing already, after navigating an entire city. The API states PHP as an option- (i'm still learning the wp API).
Toxe- what is your fear about using the same table, or connecting directly? (Which MariaDB extension does!)
Other options I'm Looking at are: Advanced Custom Fields plugin
My preference is to link game scores to Gamipress, because not all games will be Godot. Some will be quizzes and puzzle plugins.
However there is no Godot addon for Gamipress.
One script eg I've come across is: (althogh I would have to add security- sanitze it)"
- eg user notes input
`function save_user_data_7231(){
global $current_user;
if is_user_logged_in{ //check if user is logged in.
if (isset($POST['Notes'])){
// get current user info
get_currentuserinfo();
$old_notes = get_user_meta($current_user->ID, 'user_notes', true);
if (isset($old_notes)&& is_array($old_notes)){
//if we saved already more the one notes
$old_notes[] = $POST['Notes'];
update_user_meta( $current_user->ID, 'user_notes', $old_notes);
}
if (isset($old_notes)&& !is_array($old_notes)){
//if we saved only one note before
$new_notes = array($old_notes,$POST['Notes']);
update_user_meta( $current_user->ID, 'user_notes', $new_notes)
}
if (!isset($old_notes)){
//first note we are saving fr this user
update_user_meta( $current_user->ID, 'user_notes', $POST['Notes'])
}
}
}
}
they to display there notes you can use get_user_meta
function get_user_notes_654(){
global $current_user;
if is_user_logged_in{ //check if user is logged in.
// get current user info
get_currentuserinfo();
$old_notes = get_user_meta($current_user->ID, 'user_notes', true);
if (!isset($old_notes)){
$re = 'No Notes YET!';
}
if (isset($old_notes)){//we have notes. Removed the extra ! here.
if (is_array($old_notes)){//more then one
foreach($old_notes as $note){
$re .= '<strong>note:</strong>' . $note . '<br />';
}
}else{//just one
$re = '<strong>note:</strong>' . $old_notes . '<br />';
}
}
re .='//add note form would come here';
return $re;
}
}
`
Another is inside wp syntax: