Jump to content

onthespot

Members
  • Posts

    424
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

onthespot's Achievements

Advanced Member

Advanced Member (4/5)

0

Reputation

  1. The error is stating I am redeclaring a class, but if I remove the require_once for that class, it gives me an error because it needs to use functions within. I just can't understand how I am going to get around this. Never come across anything like it before. It just WILL NOT work if I am not in the root directory. The issue is clearly when I am in a folder onto of the root directory. 7 hours spent trying to fix this now and still no luck!
  2. Changed it to Session1 and same error but for Session1. What is really odd is that it seemed to work fine yesterday. Then i refreshed the page and this had happened. I made no changes, hmmmm. Could something have been changed by the host that could cause this? As I've said, it's really odd that the error only happens in the admin folder. If I move this same file into the root directory and change the links accordingly, it's fine.
  3. Fatal error: Cannot redeclare class Session in /home/content/63/8026363/html/include/session.php on line 7 Line 7 is where the class Session { starts. So the claim now is that I am redeclaring that class, when I clearly am not!
  4. I have changed include to require_once throughout the project. Now it is complaining about session.php rather than user_database.php. Again, in the root directory, no problem. Any ideas?
  5. I can't understand it though. In the root, the files were fine. Once I go to /admin, there is a problem. Even though I am including all the files in the same way just with ../ in front!
  6. I have the following error That links to the line But I have not redeclared this anywhere I can see. I've checked all the include files and still can't see it. I have now changed the name to user_database1.php which is DEFINITELY only included once in my WHOLE system and I am still getting the same message! This only occurs in my root/admin directory. When I moved the file it occurs into the root directory and updated the include files from ../file.php to just file.php, it worked perfectly. I can't understand why having the file.php in the /admin directory and using ../ to include files isn't working! Can anyone offer any experience of this? Or a potential fix. I'll provide some code from the top of the file in question.. <?php include("../include/session.php"); include("../include/admin_database.php"); Clearly this is the problem but I can't understand why! Hope someone can help !
  7. I wasnt declaring the function in the right place! And thanks for the help, solved everything now!
  8. If the names are all stored within the same table, you can just SELECT the names and then run the neccessary script to allow those image names to do something!
  9. As the previous user wrote, you are missing the = Simples!
  10. Hi, I have done a similar thing before. I stored the images in a folder and then called the image something that would relate to the purpose. I'm not sure it's the best way to achieve it, but I had a user profile and I wanted to have a user profile picture. So i let users upload and the file was called $userid.jpg. That in itself is a link you see!
  11. Hey guys, My first problem is that i'm having trouble with a variable name. $comp_name = "$subformat_$subgame_$subname_$subseason"; $_SESSION['comp_name'] = $comp_name; This seems to be returning just the value of $subseason? Is there a quick fix for this? Secondly, I am getting a undeclared function error. I have two functions in my class. One of the functions calls the other function. First function.... function flip($match) { $components = split('v', $match); return $components[1] . "v" . $components[0]; } Second function but only part of it (it's long!).... $s = flip($r); That is just a snippet of code from the second function. I am not sure if i should be declaring the function a different way? Thanks for reading
  12. I've never thought of it like that, definately lesson learn't. Cheers
  13. Sorry, I wasnt aware it was that bad. My layout has actually improved, used to be all over the place. What would you recommend to improve it?
  14. <?php if(isset($_SESSION['leaguesuccess'])) { if($_SESSION['leaguesuccess']) { echo "<h1>League creation successful, now add players and teams</h1>"; echo "<form action='process.php' method='POST'> <table cellspacing=\"10\">"; $u = $database->generateUserArray(); $t = $database->generateTeamArray(); for ($i = 0; $i < $_SESSION['players']; $i++) { echo " <tr> <td> User : <select name='user[$i]'>"; foreach ($u as $username) { echo"<option value='$username'>$username</option>"; } echo" </select> </td> <td> Team : <select name='team[$i]'> "; foreach ($t as $teams) { echo"<option value='$teams'>$teams</option>"; } echo" </select> </td> </tr>"; } echo" </table> <input type='hidden' name='leagueusers' value="1"> <input type='submit' value='Submit'></form>"; } else { echo "<h1>League creation failed</h1>"; echo "<p>Sorry, try again.</p>"; } unset($_SESSION['leaguesuccess']); } ?> Receiving the following error: Parse error: syntax error, unexpected T_LNUMBER, expecting ',' or ';' I cant see whats wrong? Please help
  15. I have the following code if($form->num_errors > 0) { return 1; //Errors with form } /* No errors, add the new account to the */ else if($database->addLeagueInformation($subname, $subplayers, $subformat, $subgame, $subseason, $subwindow, $subadmin, $subchampion, $subtype)) { return 0; //New user added succesfully } else { return 2; //Registration attempt failed } I want to add the following to it: $databases->addLeagueTable($name) Is needs to happen at the same time as the addLeagueInformation function does. Is this possible?
×
×
  • 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.