teijo / jquery-bracket

jQuery Bracket library for organizing single and double elimination tournaments
http://aropupu.fi/bracket/
MIT License
481 stars 255 forks source link

Saving the Tournament and searching the url updated tournament #200

Open ghelge opened 1 year ago

ghelge commented 1 year ago

Hello, I am struggling on creating a save data bracket and searching about the generated bracket can you help me I have created a url and the id of the tournament but I am struggling to save the tournament bracket

if (saveData) { console.log(saveData);

  // Encode the saveData as a URI component
  var encodedSaveData = encodeURIComponent(JSON.stringify(saveData));

  // Redirect to generatebracket.php with the encoded saveData in the URL
  window.location.href = "generatebracket.php?id=" + <?php echo $tournament_id; ?> + "&data=" + encodedSaveData;
} else {
  console.log("saveData is not defined or is null.");
}