Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 3 123 LastLast
Results 1 to 15 of 32
  1. #1
    New Coder
    Join Date
    Feb 2007
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need help with coding excel for php and mysql use???

    Hello,

    Ok, so i have an excel document that i can enter my current golf scores in on and it'll calculate different stuff with the data that i enter...

    Is there a way that i could use the formula from excel that calculates that data, and make it so that one could use it on my website and it would also save and store the data that they entered, as well as calculate it like excel does and display the current data..

    So quick and to the point, I want a database based way of users using what i would use at home kinda, from excel...

    wayne

  • #2
    Senior Coder
    Join Date
    Mar 2003
    Location
    Atlanta
    Posts
    1,037
    Thanks
    14
    Thanked 30 Times in 28 Posts
    Yes. There is a way . You'd have to translate your code to PHP tho. In addition to adding to a database, you can also save the results in a .csv file, an excel compatible format. For more assistance I think you'd have to post more details on what you're attempting to accomplish.
    Last edited by StupidRalph; 07-07-2007 at 04:50 AM.
    Most of my questions/posts are fairly straightforward and simple. I post long verbose messages in an attempt to be thorough.

  • #3
    New Coder
    Join Date
    Feb 2007
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Should i upload the excel file?

    And all i'm trying to acomplish really is to have a handicap/golf score tracker for my users so that they can enter there score etc.. and their score will be saved, so it'll keep track of it for them :P

    wayne

  • #4
    Regular Coder
    Join Date
    Jun 2007
    Location
    Los Angeles
    Posts
    545
    Thanks
    81
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by waynem80 View Post
    Should i upload the excel file?

    And all i'm trying to acomplish really is to have a handicap/golf score tracker for my users so that they can enter there score etc.. and their score will be saved, so it'll keep track of it for them :P

    wayne
    SR already mentioned you'll have to code the excel formula into PHP...so I'm not sure why you want to "upload the excel file"??? What are you hoping that will accomplish? We need more info please.
    RalphF
    Business Text Messaging Services
    https://www.MobileTextingService.com

  • #5
    New Coder
    Join Date
    Feb 2007
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Lol, sorry, duh... I'm very new to php :P ok, well how do i start to code the excel formula into php? Suggestions on how i go about doing this?

    thank you,
    wayne

    Anyone???
    Last edited by waynem80; 07-07-2007 at 11:28 PM.

  • #6
    New Coder
    Join Date
    Feb 2007
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Can anyone atleast give me an idea of what to google on this topic?

    thanks,
    wayne

  • #7
    Senior Coder
    Join Date
    Mar 2003
    Location
    Atlanta
    Posts
    1,037
    Thanks
    14
    Thanked 30 Times in 28 Posts
    I think you're missing what we are saying.


    We can't give you any more info. b/c we don't know specifically what your formula is. Perhaps you can break down whats going on in your excel sheet...how it works. Different excel formulas will be coded differently in PHP...try posting one of your formulas that needs to be translated.

    If you upload your excel file, most people may see it as insulting as if you are trying to get them to do your work for you. Most people are willing to help...but not do it for you. Just meet us half way and we'll get you there.
    Last edited by StupidRalph; 07-08-2007 at 10:52 PM. Reason: incoherrence
    Most of my questions/posts are fairly straightforward and simple. I post long verbose messages in an attempt to be thorough.

  • #8
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,147
    Thanks
    2
    Thanked 333 Times in 325 Posts
    An excel spreadsheet cannot directly be used by PHP for a web page. You would need to write PHP code that specifically accesses each cell you want, and PHP code to load and store values...

    Even if you have excel on the same server as the PHP, I am not sure if using a COM object to put a value in a cell, if formulas will even operate. See these links for how you might read a native excel file using PHP -

    http://www.php.net/manual/en/class.com.php
    http://sourceforge.net/projects/phpexcelreader/
    http://www.eephp.com/

    Here is an excel search example - http://www.php.net/manual/en/ref.com.php#51780 That is a lot of code to just search for something in a spreadsheet. Do you really want to write a lot of PHP code to manipulate a spreadsheet?

    A spreadsheet is not "Web friendly" nor is it really a database. To do what you want using PHP will require you to use a real database and completely code your application in PHP. Any formulas you have in the spreadsheet would need to be written out using PHP variables and code.

    Edit: To use PHP and a real database (mysql) you will need to learn PHP and mysql. Start with the programming reference manuals -
    http://www.php.net/docs.php
    http://dev.mysql.com/doc/

    I just searched www.hotscripts.com for "golf" under the PHP category and it only returned three hits, none of which were for a script that records scores and keeps track of handicaps...

    Searching on google for "php golf score script" did not turn up much either for a web based script (there are a number of PC based ones), so finding an existing script to do this for you might be hard.
    Last edited by CFMaBiSmAd; 07-08-2007 at 04:19 PM. Reason: fixed wording and added php/mysql doc links
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #9
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,147
    Thanks
    2
    Thanked 333 Times in 325 Posts
    Here is guy that has written about what you want (read his other threads in that forum too) - http://www.dbforums.com/showthread.php?t=1605256

    Reading his other threads will also give you an idea of how you would need to create forms, read/write information to the database...

    You might try to email him through his link in his profile to see if he would give you his code as a starting point.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #10
    Senior Coder Len Whistler's Avatar
    Join Date
    Jul 2002
    Location
    Vancouver, BC Canada
    Posts
    1,323
    Thanks
    26
    Thanked 100 Times in 100 Posts
    waynem80....what is the math formula that excel uses for the calculation?

    I doubt there are many golf enthusiasts on this board and we do not know how handicap scores are calculated. PHP has very powerful math capabilities.
    Leonard Whistler

  • #11
    New Coder
    Join Date
    Feb 2007
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok guys, i've just now finished reading everyone's comments :P very nice.. i'll have to give yall some examples of the math formulas, and then maybe ya'll can help further.

    I really feel like i'm in over my head.

    But ya know what, i'm gonna give it my best try :P

    Here's an example site of what i'm trying to do exactly...

    http://www.oobgolf.com/
    It's basically a stat tracking php program... and it'll also calculate their handicap with the stats and display that, the handicap comes from the players stats..

    another example from this site... http://www.greenskeeper.org/handicap...ckersample.cfm

    thank you,
    wayne
    Last edited by waynem80; 07-09-2007 at 01:00 AM. Reason: added 1 more example

  • #12
    Senior Coder Len Whistler's Avatar
    Join Date
    Jul 2002
    Location
    Vancouver, BC Canada
    Posts
    1,323
    Thanks
    26
    Thanked 100 Times in 100 Posts
    I did a quick Google search and came up with this. I believe this is the math you may need.

    http://golf.about.com/cs/handicappin...calculated.htm
    Leonard Whistler

  • #13
    New Coder
    Join Date
    Feb 2007
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yep your right... and all else i need is a way for my users to enter there scores into the data base and it save them for them...

    I'm just new to php, so i find this very overwhelming, but i really just need the right direction to start and i'm sure i can get it.

    So i'll also need for the user to enter in the rating/slope of the course on their own, or i could already have that data stored on my database, but i'd rather them just enter that in.

    wayne

  • #14
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,147
    Thanks
    2
    Thanked 333 Times in 325 Posts
    Inputting any kind of data on a web page requires HTML forms and code to process the data when it reaches the server (PHP). Here is some basic info -
    http://w3schools.com/html/html_forms.asp
    http://w3schools.com/php/php_forms.asp
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #15
    New Coder
    Join Date
    Feb 2007
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok, well that makes sense, i'll try and learn a bit on that 2nite

    wayne


  •  
    Page 1 of 3 123 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •