Jump to content

Zane

Administrators
  • Posts

    4,362
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Zane

  1. one difference with short tags is that you can do this ="Hell World" ?> or ="It is" . time(); ?>
  2. So on the local server it gets results and on the hosting server it gets NO results... you claim it's the exact same data and structure... Are there any errors that appear whatsoever?
  3. are you using SESSIONs? if you aren't...then I strongly suggest it...seeing as it will solve your problem. read about sessions here http://www.tizag.com/phpT/phpsessions.php
  4. you need to show us your code and how you are inserting the time. then all the questions of UNIX timestamps and NOW() functions that'll come up later won't be as confusing. but before I decide to tell you about using a UNIX timestamp instead of the NOW() function....we all need to see you current code so you don't mess it up with random lines people are probably going to give you.
  5. Just throwing an idea out there but maybe using IRC wouldn't hurt. I found this little tutorial on a simple IRC Connection in PHP Surely it's enough to spark an idea or epiphany that could possibly work. http://codingforums.com/showthread.php?t=91765 I'm very new to the IRC Connection/PHP thing so I'm no expert on it. But I'm sure IRC would be faster than reading MYSQL over and over
  6. there's always this $filename = substr($str,strrpos($str,"/"),0);
  7. here try this $filename = ereg("/(.*\..{3,4})"), $str, $arr) ? $arr[1] : "No File Name"; you shouldn't need a loop if you just need the filename like that. Regex can chop it all up no matter how long it is EDIT: I had to edit the code btw
  8. you could use regex.... $filename = ereg("/(.*)\..{3,4}", $str, $arr) ? $arr[1] : "No File Name"; haven't tested this code
  9. to get your sum for par_value $getresults5 = mysql_query("SELECT Par_Value, SUM(Par_Value) as ParSum FROM tblcountries WHERE then you don't need $sum=$sum+$row etc etc you'll have $row['ParSum']
  10. That said line is telling the database to skip a row basically. Notice the similarities in the red areas. You started looping the rows of the db after you told it to skip a line EDIT:I know were not all gurus, I'm just trying to show you whats wrong instead of doing it for you. That's how you learn
  11. I can see what you're trying to do here..and adding .html to the PHP extension list isn't going to help you >http://www.mywebsite.com/watch? >When you go to that address it's looking for a folder called watch not a file.....since there's no extension >so just create an index.php file inside a "watch" folder identical to your watch.php file and you'll be set. just get rid of the .htaccess file
  12. here's a great example http://www.tizag.com/javascriptT/javascriptconfirm.php
  13. $row = mysql_fetch_array($result); while ($row = mysql_fetch_assoc($result)) { Because you've called mysql_fetch_array twice....well not neccessarily fetch array but the mysql_fetch Class and whenever you do that it moves onto the next row...that's why the loop works like that. From the PHP manual http://php.net/mysql_fetch_array
  14. F of n is the same as f(n) and f(n) is the same as say..... myNewFunction($parameter) technically you'd call that myNewFunction of $parameter
  15. F of n = Increment by 1 starting at one until you reach n G of n = Increment by f(1) starting at f(1) until you reach f(n). seems pretty straight forward to me
  16. show us game_html To find out for yourself try taking that variable out of the function for time being. and see
  17. Here's an alternative to you're dilemna \\ Variable Names $theVars = array(); $theVars[] = "S46"; $theVars[] = "QU46"; $theVars[] = "S57"; $theVars[] = "QU57"; $theVars[] = "S810"; $theVars[] = "QU810"; $theVars['time'] = date('m-d-Y'); foreach($theVars as $var=>$key) { if(isset($_POST[$var])) { $_SESSION[$var] = $_POST[$var] //You really don't need the line below...it just makes a new variable for all those items in your POST array. ${$var} = $var; } else { $_SESSION[$key] = $_POST[$key]; ${$key} = $var; }
  18. what happens if you enter the number manually in your script say..you change this line "> to if that gives you a correct number then something's wrong in your database most likely your datatype, which would maintain the length of the number (or amount of cash)
  19. Yeah man, that was exactly what I was looking for. Too the T. now I'm stuck on nconvert and it's syntax. Well, more like regedit and it's syntax. I have "C:\WINDOWS\piconvert.bat %1" in my value the command window pops up and all that but does nothing....so I added a pause command to the bat file It's only getting the first word of the filename or whatever....first letter/character....to put it bluntly it's just not getting the full filename as the input. So, how do I tell regedit to retrieve the full filename of whatever is clicked. EDIT: Nevermind, I figured it out....enclosed %1 in double quotes
  20. use the asterick instead of the plus sign
  21. to get all errors you need E_ALL error_reporting(E_ALL);
  22. wow...I learn something everyday never knew about UNION before I'm not the greatest SQL person in the world
  23. SELECT * FROM table1 AS a table2 AS b table3 AS c WHERE a.quizid = 3 AND b.quizid = 3 AND c.quizid = 3
  24. I guess I should have wrote mine like this if(!($cnt % 4)) echo "\n"; if($cnt == 0 || !($cnt % 4)) echo "\n"; @haku...that pretty much is the answer, but then you'll have an unneeded at the very beginning...causing a validation error.
×
×
  • 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.