Need PHP Programmer Help

Back in February I had a topic asking for help. The basic problem is old code, the web host provider upgraded the servers, and deprecated code no longer works. I recall the significant PHP changes were the database commands.

I was going to learn PHP to make the changes. However, that got set aside when I decided to move and have been doing just that. Now that I am settled in I can get back to this. However, the code is for online picking for the NFL and time is short. I run a freebie NFL pool with friends. There is no way I can complete the changes in time.

I am willing to pay someone to make the changes. Anyone interested or have suggestions how I should proceed. There is no way I can afford a company’s consulting rates. It would need to be an individual. FYI - I live in Sarasota, Florida area. Maybe there is someone around here who can help me.

Budget?
Time frame?
Scope of work?

I may be interested, but those would need to be answered first.

1 Like

Ditto. I also may be interested.

Ditto, Ditto, Ditto

It would be helpful if the OP stated the version of the script he has.

The php script Author’s text menu download link goes to a db error page (there may be working download links in the Author’s help forum, but you must register and log in to see/download files, and be willing to look at green text on a dark green background), but there is a post in the help forum where someone ‘got the code to work’ under php 5.3 - see the 4th post in this thread - http://www.lvbash.com/phpBB2/viewtopic.php?t=587

The link in that post redirects to a playoffpools site. If you check out the help forum on that site, you can find a download link here - http://playofficepools.com/forum/topic/phpfootball-2-2-2/

This ‘v2.2.2’ code, and there’s a lot of it, is still filled with bad and out of date code.

1 Like

PHDR - Thank you for this response.
Not sure how to determine the version of the script. The only thing I can tell from looking at the code is a comment indicating an update in 2005.

I found the v2.2.2 code.

To: astonecipher, benanamen, and ErnieAlex -
I have been contemplating all day how to provide a Scope Of Work. Since I am not “fluent” with PHP I would struggle to figure out what needs to be changed in what files.
Here is a possible solution:

  • I would imagine we should take this offline at some point. You suggest when.

There is a file login.php. It also contains 2 “require” statements (one for an hdr.php and the other for footer.php).
What if I provide these 3 files for you to review and quote. (This is the point we should take this offline).

It occurs to me that maybe getting this fixed then I can use the code changes for this to fix the other files myself. I don’t know and that is a red flag - Do not make an optimistic assumption.

I suppose we could use this as a starter.
Tomorrow I can look at the tasks we are using and try to identify the files involved. The key ones I remember are:

  1. Uploading the schedule
  2. Users can update their profile.
  3. Weekly picks - Display the games, users select their picks. Their picks are displayed.

What if we start with getting the login working? That will then display the menu and options, then I can better identify the other tasks that we use.

Well, you gave us some minor info…

The header file is most likely the beginning code that sets up each page showing your general layout and all of the sub-files you need to make each page work. The footer file is most likely the ending section of each page with your copyright info and whatever is at the bottom of your site’s pages.

A NFL website for picks, winners, blog, etc. is not really hard to create or alter. But, we can not do this without seeing the code. Forget the hdr.php and footer.php for now. Just show us the login section of the code. Now, this might be inside the hdr.php file, we do not know. If you want off-site help, any of us can help. Some want to charge others not. You have not really asked any programming questions as yet. So, either hire someone or post some code and we will help for free.

Thanks ErnieAlex for the reply. Now that I think it through there are only so many tasks/commands involved - opening, reading, and writing to the database. I am guessing the SQL statement is the same. Knowing what commands are removed and what commands to replace them with, I can go through the code and swap them myself. The login script would have the open and read, maybe even a write if it updates something like a “last login date” field.

Here is the login.php code. How do I insert code so the lines are preserved.

<?php
  session_start();

//* Jan3118 EdA01 - session_register deprecated, "replacement" $_SESSION['...']
//*               - Replace <? with <?php

//* EdA01  session_register("user");
//* EdA01  session_register("uname");
$_SESSION = ['user', 'uname'];

//***************************************************************************
//* ASP Football Pool                                                       *
//* Do not remove this notice.                                              *
//* Copyright 1999-2004 by Mike Hall                                        *
//* Please see http://www.brainjar.com for documentation and terms of use.  *
//*                                                                         *
//* PHP Football Pool                                                       *
//* PHP Port of ASP Football pool                                           *
//* Copyright 2005 by Brian Paulson and George Garcia                       *
//* Please see http://lvbash.com/phpBB2 for more support on PHPFootball     *
//* version                                                                 *
//*                                                                         *
//* Allows a user to login.                                                 *
//***************************************************************************
$subtitle="Login";
ob_start();
require("header.php");
//Get any form data.
$football->WhoOnlineDelete;

$username=$_POST['username'];
$password=$_POST['password'];

if ($_POST)
{
//Check input.
    if ($username=="") {
        $football->ErrorMessage("Please enter a username.");
    }   elseif ($password=="") {
        $football->ErrorMessage("Please enter your password.");
    }   else {
        //Verify the password and redirect to default page if correct.
        $sql="select * from ".$football->prefix."users where user = '".$username."'";
        $rs = $football->dbQuery($sql,$football->database);
        $row = mysql_fetch_object($rs);
        $rows = mysql_num_rows($rs);
        if($rows == 0) {
            $football->ErrorMessage("User '".$username."' not found.");
        } elseif (md5($password) != $row->password) {
             $football->ErrorMessage("Incorrect password, please reenter.");
        } else {
            $user=$row->user;
            if ($row->name =="") {
                $uname=$row->user;
            } else {
                $uname=$row->name;
            }
            header("Location: index.php");
        }
    }
}    else {
    //Set test cookie.
    setcookie("football","peanutbutter",0,"/",$football->domain,0);
}
?>

<form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post">
<table class="main" cellpadding="0" cellspacing="0">
  <tr><th align="left">User Login</th></tr>
  <tr>
    <td>
    <div class="freeForm">
    <table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td><strong>Username:</strong></td>
        <td><input name="username" value="" size="12" /></td>
      </tr>
      <tr>
        <td><strong>Password:</strong></td>
        <td><input name="password" type="password" value="" size="12" /></td>
      </tr>
    </table>
    <p>Enter your username and password and click 'Login'.</p>
  </div>
  </td></tr>
</table>

<p><input class="button" type="submit" value="Login" />
<input class="button" type="reset" value="Clear" onclick="this.form.elements['username'].selectedIndex = 0; this.form.elements['password'].value = ''; return false;" />
</p>
</form>

<?php require("footer.php"); ?>

EDIT by Benanamen : Added code formatting.

Well, session_register() is long gone, hence deprecated.

It was used to stick variables into the session file on the server so the variable can be passed to other pages.
Now, we set the session variable in this format: $_SESSION[“variable-name”] = some-value;
So, just change all of your session_register references to this format. Then if you get stuck, show us the code! Good luck…

The login code and all the things that have already been written about it can be found in the OP’s thread about a http 500 error - HTTP ERROR 500

The code is obsolete and will not work at all on current PHP. It is also wide open to an SQL Injection Attack.

The whole thing will need to be re-written. Looks like the author has a newer ASP version available. http://www.brainjar.com/AspFootballPool/

If you are wanting to hire one of us you will need to post a zip of all the files for review. First thing though, tell us what your budget is so we can decide if we even want to review the files.

Thanks! I will work on this.

Thank you.
What does OP mean?

Original Poster/Original Post

Benanamen:

LOL … Thanks for the “brainjar” link!!! The first couple of years that I had the code I would re-check the “brainjar” site to see if they were doing anything else. Then I figured it was a “one time” thing and stopped checking.

I will download the new code, install it, re-train for what is new, and (hopefully) will be able to use it. It will either be this or follow ErnieAlex’s advise - make changes, test, and post questions if/when I get stuck.

That said, I will withdraw my request to hire someone (I am optimistic about the new version). And make a donation to Mike Hall / brainjar.

Thank you all so much for the guidance!

Keep in mind, the new version is not Php, it is ASP which means you will need a windows server host. Also, the demo links on the authors site are all broke. Double Red Flags. :triangular_flag_on_post: :triangular_flag_on_post:

If you want a real PHP football pool there is one on Github which is free.
In my humble opinion, PHP is better suited for this type of site than ASP…

If you want to look at it, it can be found here: PHP Pickem Football Pool Template

benanamen - Thank you for the heads up about the new version being ASP. I don’t want to go there. My host is on unix system.

ErnieAlex - Thank you for the PHP Pickem Football Pool Template.

Downloaded and unzipped. Now reviewing and editing where needed. Plugging away, having to research some things. I am a PHP guppy who dove into the deep end of the pool. :slight_smile:

Sponsor our Newsletter | Privacy Policy | Terms of Service