开发者

PHP, Server-Side Validation, NFL, XML Parsing, Conditional [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

I have a form that has 17 input fields (all are radio buttons with about 30 options each)... So technically, it seems like an even, much longer form than it really is.

The form is actually the upcoming 2011 NFL schedule... I have gone through and done several jQuery things to make the form user-friendly, easy to look at, and basic validation.

I should also mention, this schedule and all the information it encompasses has been fed through with SimpleXML and PHP. In other words, I have all of the data in an XML document.

Also a noteworthy point, this will eventually need to be tied in with a mySQL database table I have created that keeps track of user's picks.

You can see what it looks like here: http://www.thesportinghub.com/lms/make-my-picks

Essentially what this form should do (after someone hits submit):

1.) Return an error message if the same team is picked twice. (I want the user to only be able to select a team once throughout all 17 weeks).

2.) Return an error message if a team has been selected after the scheduled time (in EST).

3.) If the user has passed those two aforementioned validations, it will take the current time they hit submit and all of the information and shoot it into a database that can be recalled later.

So what is my problem?

I need help getting started on this. My logic is there I think... does it seem practical? What do you think I will need to 开发者_如何学Godo to make all of this validation work with the XML?

My bullet point #1 seems fairly easy... It is #2 (comparing the time submitted vs. Time the game starts from the XML document WHERE the team is selected) that seems complex.

I am willing to provide any snippets of code and details regarding what I am trying to build.

Any and all help is appreciated!

UPDATE

I am trying to help brainstorm as much as possible. I am wondering if what it should do is build an array of some sort right away after a user submits the data with all of the teams picked, and for what weeks, and for what time the pick was made. Once we have that information in an array, could we compare that with the XML data (specifically the time of the matchup from the XML document)?

Sorry, I am just spitballing trying to think of possibilities. I do not know if that is even possible or what that would look like. Just looking for some guidance at this point.

Thanks! Chris

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜