Jump to content

chiefrokka

Members
  • Posts

    117
  • Joined

  • Last visited

    Never

Everything posted by chiefrokka

  1. I have my football scripts all run off my domain with League ID's and everything (like how Yahoo fantasy has theirs). ppl want to install the script on their domain so they don't have to go to my domain to run the games and so they can integrate it into their design. I don't want to give my code out so they can just steal it, so what's the best way? If on another domain, they would be checking my database to run the scripts and they'd be making their picks and altering my database that I'd store on my domain. One reason I like it now all on my domain is because when I do updates I just have to upload the files to my domain and every league gets the updates. thoughts?
  2. I suppose that would be easiest. and just put an else in there to display db values instead if they didn't click submit. thanks
  3. If they DIDN'T click Submit, I grab all the values from database that they already set and my form displays the $row['var1'], $row['var2'] etc. I guess I could just copy and paste the whole form and change all those initial values to be $_POST['var1'], $_POST['var2'] ??
  4. that's what I'm trying to do, just trying to find the easiest code to do this. I usually submit to same page and test if they clicked Submit. If they did, i run the code and display succes/error messages.. if they didn't, i display form. I could use sessions I suppose
  5. I have about 30 text fields... upon testing them when they click Submit, I want them to go back and fix the error. Every time I click Back though the fields are gone and they all have to be entered again. very unfriendly. I'm gathering I could make a link they click to go back and pass all 30 text fields with the variables i got from _Post... but is there an easier way than doing index.php?var1=$var1&var2=$var2, etc. (because that would be very tedious)
  6. gotcha... i posted it right b4 yours came in. thanks for the explanations guys. at least I got this stupid little problem solved. It's fine when I know where the script is being installed such as www.mydomain.com/games/patriots... but if I gave script to a friend who wanted to install it on www.mydomain.com/test/games/patriots the image paths wouldn't work because putting / means root of your domain not root of where the script is installed.
  7. So only way around it is to do the / in front of images... or duplicate my Functions file and put one in Admin folder and one in Root and change it accordingly? seems like there should be a better way as this can cause a mess if it were more than just my echo
  8. nice, you are the man. That worked. I actually just put "/MyGame/images/patriots.gif" and that worked. thank you! but why isn't it working when i just put ../images in my /Functions.php file? why isn't it relative to that Function file instead of the file that's including the Function.php?
  9. this isn't making sense for me. I organized my files into folders such as "admin" and "includes" but I'm now having relative path issues. Here's how I'm Including the file <?php include('includes/Functions.php'); ?> Here's part of a function I'm having trouble with. <?php echo '<img src="images/patriots.gif" width="35" height="28">'; ?> This Functions.php is in my "/includes" folder so technically when the function is called it should say src="../images/patriots.gif" the problem is from my index.php (in root), when I include my /Functions.php file and call the function, it displays the images fine. It Shouldn't display correctly because the function should be ../images/patriots.gif but it seems like it's relative to my index.php which is on the root. so it's just calling the images/patriots.gif When I'm in my Admin page (/admin) and do same thing by adding ../includes/Functions.php and then call same function... the images don't show up because now it's relative to the /admin.php file that included the Functions, so it's trying to display admin/images/patriots.gif which is what the code says. that make sense? I should simply put ../images/patriots.gif in this function and be done with this... no matter what page your in whether from the root or from /admin folder, the function should still run relative to where the Functions.php file is located.
  10. thank you, i'll look into that function. one question I've read from google searches is having to do something with your domain to allow outside access. I'm on GoDaddy so do I have to go into some cPanel and change some settings? By opening it up to allow other sites to access your db (or even basic files like header/footer, are you opening up a can of worms for malicious attacks?
  11. not looking to hire, haha... I will have to do some more research on cURL. I've heard of it but haven't really experienced much of it. Are there any other functions that I'll need to know? Do I have to do anything with my GoDaddy account to allow other domains to login to databases? I remember last year I attempted to organized my scripts into functions and call those function files, but I was having trouble with global variables as they weren't staying throughout every page. I'll play with it more this year to figure out what I was doing wrong
  12. Newbie to php, but I've programmed some football scripts to teach myself PHP each year... it's starting to get more popular each year so I need to change the way I handle it. www.phpPicks.com I need help taking control of all my scripts so their all run off my server, and I'm not giving out my scripts. The problem is people love to install the scripts on their OWN domain so they can integrate it into their sites. I'm afraid I'll lose sales by just having it so people HAVE to access their league via my site like Yahoo does. Ultimately, I'd like to still sell the scripts and allow people to install it on their domain so users go to their actual domain... But I'd like to change the code so enough of it runs off my domain and keeps me still in control and people can't just rip off my scripts. This also allows me to provide updates very easily by just updating files on MY domain. Each page is built dynamically based on NFL matchups, users in your league and their picks they've made... so each page has to load tons of variables from the database first. Can someone help me do this please? I've never connected to another domain before, and I think I need to keep all the functions on MY domain so other domains just call them to get all the variables and calculations they need. If it's installed on someone's domain, they need to be able to have users make their picks and update values on MY database.
  13. awesome. your the man. I'm going to try integrating your code into my scripts soon once I get some free time. I did try it week 4 during preseason and it was capturing the scores very nicely.
  14. ok cool. I got it to work. I used that example code but change the "div" to "p" because I didn't want all my div to scroll throughout my code and I rarely use <p> so I just used that tag with yours and it now scrolls. thanks! <style type="text/css"> p { background-color:#00FFFF; width:350px; height:150px; overflow: scroll } </style> </head>
  15. not sure what you mean by overflow. can you explain a little more
  16. I only want to display like 5 lines and have a scroll bar though. I don't want to display every single message in the db one after another without a scroll
  17. Here's how it's displaying now which I need help with [attachment deleted by admin]
  18. you are right, i can do just echo ($var); I'm just used to adding echo "<font color='#FF0000'>".$var."</font> blah blah"; here's what I'm trying to do. this is from Yahoo. notice how they have name in bold and all left justified [attachment deleted by admin]
  19. it's just a little mini message board I want to display. I have a little Submit Message text field under it that people can easily send messages. I just want a little small area on top right of my page that displays all the messages. it's not like vbullet, it's more like yahoo fantasy has in their "matchups" section that the league can post messages to
  20. b.Messages { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #99999; text-decoration: none; background-color: #CCFFFF; background-position: left; } how do I put the Name in bold, then do a carriage return, display message, then carriage return. All the <br> show up in the textarea. Also, how do i left justify it? it's showing up centered. i can use css to change color and bold and all that but it does the whole textarea text. <textarea name="Threads" class="Messages" id="Threads" cols="100" rows="3" disabled> <? // All Messages will go here $result = mysql_query("SELECT * FROM Messages ") or die(mysql_error()); while ($row = mysql_fetch_array($result)) { echo "".$row['Name']." | ".$row['Date'].""; echo "".$row['Message'].""; echo "------------------------------------------------"; } ?> </textarea>
  21. well you gotta give a better solution if your saying it's a terrible way obsidian already did. You need to use a DATE or DATETIME column for maximum capabilities. oh, i thought you were commenting on his response. sorry I'm still playing with it because in order to compare you need to have both variables as unix timestamp not just echo. i think it will work this way though. thanks
  22. well you gotta give a better solution if your saying it's a terrible way
  23. I've been trying to figure this out for over an hour now. been very close but no cigar. trying to play with mktime and strtotime but can't get exactly what i want. how do I add 3 days to a variable pulled from a database. the variable is in the form $Date_Picked = 09/04/2008 I want to add 3 days to $Date_Picked and then compare it to Today. // $Expiration = $Date_Picked + 3 days if today isn't passed expiration (3 days from when they picked), then do code
  24. ya, guess i can change password for godaddy. i just wan't sure if there's any way besides getting password that someone could do this via xss or something
  25. it's GoDaddy... been using them for few years now with no issues. the file that was written has 644 attributes. writable for owner only
×
×
  • 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.