Jump to content

ajax, javascript and mysql


php_b34st

Recommended Posts

I have a players database with over 1000 entries in it a user has to pick 11 of these players to form their team this script checks the db and gets all the info out for the playercode they enter once i have done all the calculations and approved the team I will add the playercodes into the teams database.

 

No sorry I do not have the hosting yet and am just working from localhost

Link to post
Share on other sites

oh I think I get it. You could change it so the PHP code does all the queries at once and the fields keep their values. That way if they screw up, they can change it easily.

 

Then maybe have the PHP part generate a confirm button in with its response.

Link to post
Share on other sites

Yea I can do that or I could check the team as they submit it but I was trying to get it all done instantly so if the team is approved the submit button appears if not it doesnt but an error message explaining why it wasnt approved will be displayed.

Link to post
Share on other sites

How were you planning to approve the team?

 

Would a person be doing it or would it be based off player stats?

 

If it was based off player stats I would do it PHP side and make a code to the effect of

if ( APPROVED ) {
echo '<input type="submit">';
}
else {
echo '<input type="button" onclick="notApproved($reason)">';
}

 

and then have a button on the main form that has the effect of sending all the players to the PHP file for checking and display.

 

If they mess up the first button would still be there so they could try again. And if they didn't they could click on the submit button.

 

If it wasn't approved they would have a button to check why. You could store the non-approval reasons on the JavaScript side or have it retrieve them somehow.

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.