Jump to content

premiso

Members
  • Posts

    6,951
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by premiso

  1. Echo out $_FILES['photoname']['type'] and see what prints and it should help you figure out where it is being held up at.
  2. On this line: if($row = mysql_fetch_assoc($res) You are missing the closing if ) it should be: if($row = mysql_fetch_assoc($res)) If you had display_errors on, it should have alerted you of the error vs just 500ing. You could also check the apache error logs, if php is set to log to it.
  3. Would you mind posting the solution (if possible) here so that others may benefit?
  4. ewww. I use tabs as well, not really sure why, but I like that I can change the tab size to be 2 "spaces" vs having to do 4 spaces all the time without much room for manipulating. Just my preference though.
  5. Which is right, but you can get around that by either specifying, tablename.id, or with an aliased tablename. Something like this: SELECT tn2.id FROM tablename1 tn1 JOIN tablename2 tn2 ON tn2.some_id = tn1.id WHERE .... Which will get rid of the ambiguous error. You will just need to make sure to prefix the doubled column names with the respected tablename you want to use.
  6. I am not sure if this is what you are looking for, but you could try and implement something like git that could handle the transactions etc. It may take a bit of coding to figure it out, but it has methods to handle syncs with conflicts etc. I have never really looked into it, but I saw git being used by a program called syncany and it did make sense.
  7. Ok, looking at your script, decided to make some improvements to it. You can choose to use it or not, I just find this a bit more manageable and less error proned. As to your issue I am not sure what you are getting at in "putting into variables" . So when as user submits the form, you want to check for that and put the POST data into a variable? Or do you want it to write it back to the file? If you can clarify that a little bit, I will be more than happy to assist. <?php if (!isset($_GET['id']) or !isset($_GET['game'])) die; $feedid = $_GET['id']; $roTa = $_GET['game']; $file = "$feedid.feed"; $members = file($file); $count = count($members); for ($j=0; $j<=$count; $j++){ list($roTb, $aPT, $hPT, $aPTm, $hPTm, $tot, $om, $um, $aML, $hML) = explode("|",$members[$j]); if ($roTa == $roTb){break;} } function edit_line($members, $feedid) { list($roTb, $aPT, $hPT, $aPTm, $hPTm, $tot, $om, $um, $aML, $hML) = explode("|",$members); $hPTn = isset($_POST['hPTc'])?$_POST['hPTc']:''; $aPTn = isset($_POST['aPTc'])?$_POST['aPTc']:''; $totn = isset($_POST['totc'])?$_POST['totc']:''; $display = <<<DISPLAY <html> <head> </head> <body> <table border="0" cellpadding="1" cellspacing="1" style="width: 250px; "> <caption> Game Data:</caption> <form method="post" action="feedmaker.php?update&id={$feedid}&game={$roTb}&aPT={$aPTn}&hPT={$hPTn}&tot={$totn}">"; <tbody> <tr> <td> <p style="text-align: right; "> Rotation: </p> </td> <td style="text-align: center; "> {$roTb} </td> <td style="text-align: center; "> </tr> <tr> <td style="text-align: right; "> Away Points:</td> <td style="text-align: center; "> {$aPT} </td> <td> <p style="text-align: center; "> <input maxlength="5" name="aPTc" size="5" type="text"></p> </td> </tr> <tr> <td> <p style="text-align: right; "> Home Points:</p> </td> <td style="text-align: center; "> {$hPT} </td> <td style="text-align: center; "> <input maxlength="5" name="hPTc" size="5" type="text"></td> </tr> <tr> <td> <p style="text-align: right; "> Game Total:</p> </td> <td style="text-align: center; "> {$tot} </td> <td style="text-align: center; "> <input maxlength="5" name="totc" size="5" type="text"></td> </tr> <tr> <td style="border-color: rgb(255, 255, 255); "> </td> <td style="border-color: rgb(255, 255, 255); "> </td> <td style="text-align: center; "> <input name="button" type="submit" value="Enter"></td> </tr> </tbody> </table> </form> <p> </p></body> </html> DISPLAY; echo $display; } if (isset($_GET['edit'])) edit_line($members[$j],$feedid);
  8. Does this include the multi-byte versions; i.e. mb_ereg_match? I does not appear to be so. The first source would be the manual, and since there is no big pink "Depreciated" message it has not been thought of being depreciated.
  9. The wording of the site is funny. For me, Google 4; Bing 1 My distaste in Bing is really the fact of the design, I think it is horrendous. And the fact that I have rarely been able to "bing" something and find it within seconds like I can with google.
  10. Whoa guys, let's not try and get off topic here. Again, what part of PHP's OOP syntax did it take from Java? Java didn't invent OOP. Java took its ideas from something else as well. Well I believe abstract class/method, final class/method and interface are all concept/syntax PHP borrowed from Java? I know static is not, since C++ has that too. Skins S01 and S02 were decent UK shows, not sure about the US Skins, as I have not even attempted to watch it and I didn't care for anything after S03.
  11. Shows how much I really pay attention
  12. This topic has been moved to PHP Regex. http://forums.phpfreaks.com/index.php?topic=364878.0
  13. http://php.net/ereg ereg has been depreciated, you will need to convert your ereg items to preg_match <?php chdir(dirname(__FILE__)); $dir = "/sync/www/html/ohx/training"; $numberOfFiles = 6; $pattern = '#\.(pdf|xlsx|xls|doc|docx)$#'; $newstamp = 0; $newname = ""; $dc = opendir($dir); unset($fils); while ($fn = readdir($dc)) { # Eliminate current directory, parent directory if (preg_match('#^\.{1,2}$#',$fn)) continue; # Eliminate other pages not in pattern if (! preg_match($pattern,$fn)) continue; Should work, I just added delimiters to the patterns, which is all it would need (the # are the delimiters).
  14. This topic has been moved to Application Design. http://forums.phpfreaks.com/index.php?topic=364790.0
  15. What about the Inbetweeners and Friday Night Dinner?!?!?!
  16. Yea, for some reason I read the IT Crowd, I never watched the Office, it seemed dumb to me from the pilot...
  17. Watch the UK one, it is 10x better mmm never mind. Just saw it was the office and not the IT Crowd =\
  18. http://forums.phpfreaks.com/index.php?topic=358372.0 This has been posted multiple times, next time... SEARCH THE FORUMS. That is all.
  19. That's what I saw when I read what you wrote
  20. Nope, tl;dr, full of pointless junk with long winded not needed explanations. You are much obliged.
  21. This topic has been moved to Application Design. http://forums.phpfreaks.com/index.php?topic=364766.0
  22. The whole thing.
  23. Obviously.... NULL has been switched with $var. *premiso rollseyes
  24. Did you by chance read the sticky in this forum that is in all caps and tried what it suggested? HEADER ERRORS - READ HERE BEFORE POSTING THEM
  25. PHP vs Java. No.
×
×
  • 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.