runnerjp Posted October 8, 2008 Share Posted October 8, 2008 im trying to make an area of my profile site where users can add there running times to there profile... an example is shown below: event pb 100m 9.98 seconds 5000m 15min 32 seconds 10000m 32min 15 seconds but im not sure whats the best way for users to add there data? any one have some ideas that users could enter there personal bests whilst keeping them in the same format so time can be compared?? Link to comment https://forums.phpfreaks.com/topic/127530-help-and-ideas-needed-on-inserting-users-data/ Share on other sites More sharing options...
waynew Posted October 8, 2008 Share Posted October 8, 2008 Ask them to enter their data in seconds. Restrict anything that isn't numerical with: is_numeric() Restrict fullstop signs. And make it clear to them that its to be entered in seconds. OR Have one text field for minutes and another one for seconds. Then do the math yourself. Link to comment https://forums.phpfreaks.com/topic/127530-help-and-ideas-needed-on-inserting-users-data/#findComment-659814 Share on other sites More sharing options...
runnerjp Posted October 8, 2008 Author Share Posted October 8, 2008 ok but what about on how many pbs they want to enter... how would i go about having a button that adds fields?? an example would be that used on phpmyadmin,, where you select how many more fields you want to add and it shows the allready filled in fields?? Link to comment https://forums.phpfreaks.com/topic/127530-help-and-ideas-needed-on-inserting-users-data/#findComment-659816 Share on other sites More sharing options...
waynew Posted October 8, 2008 Share Posted October 8, 2008 Have a submit button inside a form allow them to add fields. Set the submit button to something such as "add_pbs" or something. Then have a check on the page to see if: if(isset($_POST['add_pbs'])){ //echo field } Thats a pretty simple example but you can probably work it out from there. Link to comment https://forums.phpfreaks.com/topic/127530-help-and-ideas-needed-on-inserting-users-data/#findComment-659820 Share on other sites More sharing options...
runnerjp Posted October 8, 2008 Author Share Posted October 8, 2008 ill guve it ago thnaks Link to comment https://forums.phpfreaks.com/topic/127530-help-and-ideas-needed-on-inserting-users-data/#findComment-659828 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.