I'm trying to fetch user data from our database, then pass these users to my gotowebinar automatically. The automated code will be done in php. Here's the code. I am wondering why it won't pass the data to the gotowebinar page. I was able to retrieve the data successfully. But when I added my code for the form "post" to gotowebinar, it won't pass the data. I hope you could help me with this. Thank you so much.
<?php
$conn = new mysqli("mywebsite.com", "myusername", "mypassword", "mydatabase");
// check connection
if ($conn->connect_error) {
trigger_error('Database connection failed: ' . $conn->connect_error, E_USER_ERROR);
}
$sql = "SELECT name, email FROM users WHERE username = 'Manny'";
$rs=$conn->query($sql);
$rs->data_seek(0);
while($row = $rs->fetch_assoc()){
?>
<form action="https://attendee.gotowebinar.com/register/11111111111" id="formGTW" method="post">
<input type="hidden" name="registrant.givenName" value="<?php echo $row['name'] ?>" />
<input type="hidden" name="registrant.surname" value="GTN" />
<input type="hidden" name="registrant.email" value="<?php echo $row['email'] ?>" />
<script type="text/javascript">
$(document).ready(function(){
$("#formGTW").submit();
});
</script>
<?php } ?>
</form>