Jump to content

ChemicalBliss

Members
  • Posts

    719
  • Joined

  • Last visited

    Never

About ChemicalBliss

  • Birthday 12/27/1988

Contact Methods

  • AIM
    uniflare1
  • MSN
    uniflares_den@hotmail.com
  • ICQ
    478681231
  • Yahoo
    uniflare

Profile Information

  • Gender
    Male
  • Location
    Earth

ChemicalBliss's Achievements

Newbie

Newbie (1/5)

1

Reputation

  1. change $os .= $i; to $os[] = $i; and you got yourself a winner.
  2. In your display i cannot see where locationid form variable exists. you are just echoing it out. Also, foreach() expects it's first parameter ($_POST['locationid'] in your case) to be an array. Which a single id is clearly not (unless you put it inside an array). If you have multiple locationid's and updating multiple forms at once, you will have to iterate each form element for ex; HTML: <form> <input name="locationid[0]"> <input name="location_name[0]"> <input name="location_date1[0]"> <input name="location_date2[0]"> --- second form <input name="locationid[1]"> <input name="location_name[1]"> <input name="location_date1[1]"> <input name="location_date2[1]"> --- etc... PHP: <?php if( isset( $_POST['locationid'] ) && count( $_POST['locationid'] ) >= 1){ foreach( $_POST['locationid'] as $formId => $locationId ){ $thisForm = array( "id" => $locationId, "name" => $_POST['location_name'][$formId], "date1" => $_POST['location_date1'][$formId], "date2" => $_POST['location_date2'][$formId] ); // input validation etc // then update database using new values gained. } } ?>
  3. If you havn't already I would get used to using the php manual, it's real quick and easy to find what you need. In this case, the parameters of the function setcookie: http://php.net/setcookie Just drop the last two parameters until you understand exactly why your using them .
  4. I agree with your statements that this could be misrepresented as a "Teach Me" topic. All I can say is know who your dealing with, search my posts if you want to know how often I ask for help . (Not often). But this isn't about asking for help a such, more to the effort of getting a better understanding of advanced concepts such as OOD. As stated, I am currently learning OOP for php and certain things I'm not too sure of I might ask for some clarification, whereas I can offer what I already know about OOP, and the extensive knowledge of general programming in PHP This is a two-way thing here, help each other as you stated . PHP Groups yes, that is a good idea and I have used IRC chats before but it seems much like on forums, non-personal, sometimes the other person just doesn't care. And it's next to impossible to get a good relationship going with people that constantly help others. Having a personal friend(s) you can contact is much more personal, you get the friendship that forms from getting to know each other and what each other knows.
  5. Thanks for the input . It has already proved quite useful, although my time is limited, I haven't been "harassed" at all from the few people I have already added and we have helped each other already. (and it was fast!). So it's working out great at the moment and hope to gain more php buddies . Will keep watching this thread if anyone would still like a coding buddy.
  6. Ohh it can . I'm using it as we speak . Apache 2.4.1 PHP5.4.0 (release) xDebug 2.2 Dev NetBeans 7.2 Dev
  7. Even xdebug? Since he hasn't compiled 2.2 yet..
  8. @the little guy Don't mean to be rude but this thread is for people looking for general talk and idea sharing. I suggest you ask in the freelance forum if you want coding help with your current projects. If you want to talk about ideas and concepts drop me a shout. Thanks
  9. If you want to use xDebug with php 5.4.0 - I have compiled the windows dll myself (with only 1 issue: max_exec_time isn't modified so have to modify in php.ini - nothing major). Or I can outline steps to compile xdebug yourself. (fairly lengthy, from tools download to using the dll in netbeans can take up to an hour depending on network speed.)
  10. Don't mean to bump Just wanted to say I've had a couple of bites . It's good to have friends that program like you that you can contact quickly (learn and teach a lot all at the same time ). But, More is merrier so if anyone else is willing to Talk/Learn/Program/Teach or otherwise communicate about PHP, drop me a message and Ill give you my skype/email. Cheers guys .
  11. Don't remove any code if your not sure what it does, or if you do, pout it back if it doesn't do what you expected. change timeclock.php from: if (($display_current_users == "yes") && ($display_office == "all") && ($display_group == "all")) { $current_users_date = strtotime(date($datefmt)); $calc = 86400; $a = $current_users_date + $calc - @$tzo; $b = $current_users_date - @$tzo; $query = "select ".$db_prefix."info.*, ".$db_prefix."employees.*, ".$db_prefix."punchlist.* from ".$db_prefix."info, ".$db_prefix."employees, ".$db_prefix."punchlist where ".$db_prefix."info.timestamp = ".$db_prefix."employees.tstamp and ".$db_prefix."info.fullname = ".$db_prefix."employees.empfullname and ".$db_prefix."info.`inout` = ".$db_prefix."punchlist.punchitems and ((".$db_prefix."info.timestamp < '".$a."') and (".$db_prefix."info.timestamp >= '".$b."')) and ".$db_prefix."employees.disabled <> '1' and ".$db_prefix."employees.empfullname <> 'admin' order by `$sortcolumn` $sortdirection"; $result = mysql_query($query); } elseif (($display_current_users == "yes") && ($display_office != "all") && ($display_group == "all")) { $current_users_date = strtotime(date($datefmt)); $calc = 86400; $a = $current_users_date + $calc - @$tzo; $b = $current_users_date - @$tzo; $query = "select ".$db_prefix."info.*, ".$db_prefix."employees.*, ".$db_prefix."punchlist.* from ".$db_prefix."info, ".$db_prefix."employees, ".$db_prefix."punchlist where ".$db_prefix."info.timestamp = ".$db_prefix."employees.tstamp and ".$db_prefix."info.fullname = ".$db_prefix."employees.empfullname and ".$db_prefix."info.`inout` = ".$db_prefix."punchlist.punchitems and ".$db_prefix."employees.office = '".$display_office."' and ((".$db_prefix."info.timestamp < '".$a."') and (".$db_prefix."info.timestamp >= '".$b."')) and ".$db_prefix."employees.disabled <> '1' and ".$db_prefix."employees.empfullname <> 'admin' order by `$sortcolumn` $sortdirection"; $result = mysql_query($query); } elseif (($display_current_users == "yes") && ($display_office == "all") && ($display_group != "all")) { $current_users_date = strtotime(date($datefmt)); $calc = 86400; $a = $current_users_date + $calc - @$tzo; $b = $current_users_date - @$tzo; $query = "select ".$db_prefix."info.*, ".$db_prefix."employees.*, ".$db_prefix."punchlist.* from ".$db_prefix."info, ".$db_prefix."employees, ".$db_prefix."punchlist where ".$db_prefix."info.timestamp = ".$db_prefix."employees.tstamp and ".$db_prefix."info.fullname = ".$db_prefix."employees.empfullname and ".$db_prefix."info.`inout` = ".$db_prefix."punchlist.punchitems and ".$db_prefix."employees.groups = '".$display_group."' and ((".$db_prefix."info.timestamp < '".$a."') and (".$db_prefix."info.timestamp >= '".$b."')) and ".$db_prefix."employees.disabled <> '1' and ".$db_prefix."employees.empfullname <> 'admin' order by `$sortcolumn` $sortdirection"; $result = mysql_query($query); } elseif (($display_current_users == "yes") && ($display_office != "all") && ($display_group != "all")) { $current_users_date = strtotime(date($datefmt)); $calc = 86400; $a = $current_users_date + $calc - @$tzo; $b = $current_users_date - @$tzo; $query = "select ".$db_prefix."info.*, ".$db_prefix."employees.*, ".$db_prefix."punchlist.* from ".$db_prefix."info, ".$db_prefix."employees, ".$db_prefix."punchlist where ".$db_prefix."info.timestamp = ".$db_prefix."employees.tstamp and ".$db_prefix."info.fullname = ".$db_prefix."employees.empfullname and ".$db_prefix."info.`inout` = ".$db_prefix."punchlist.punchitems and ".$db_prefix."employees.office = '".$display_office."' and ".$db_prefix."employees.groups = '".$display_group."' and ((".$db_prefix."info.timestamp < '".$a."') and (".$db_prefix."info.timestamp >= '".$b."')) and ".$db_prefix."employees.disabled <> '1' and ".$db_prefix."employees.empfullname <> 'admin' order by `$sortcolumn` $sortdirection"; $result = mysql_query($query); } elseif (($display_current_users == "no") && ($display_office == "all") && ($display_group == "all")) { $query = "select ".$db_prefix."info.*, ".$db_prefix."employees.*, ".$db_prefix."punchlist.* from ".$db_prefix."info, ".$db_prefix."employees, ".$db_prefix."punchlist where ".$db_prefix."info.timestamp = ".$db_prefix."employees.tstamp and ".$db_prefix."info.fullname = ".$db_prefix."employees.empfullname and ".$db_prefix."info.`inout` = ".$db_prefix."punchlist.punchitems and ".$db_prefix."employees.disabled <> '1' and ".$db_prefix."employees.empfullname <> 'admin' order by `$sortcolumn` $sortdirection"; $result = mysql_query($query); } elseif (($display_current_users == "no") && ($display_office != "all") && ($display_group == "all")) { $query = "select ".$db_prefix."info.*, ".$db_prefix."employees.*, ".$db_prefix."punchlist.* from ".$db_prefix."info, ".$db_prefix."employees, ".$db_prefix."punchlist where ".$db_prefix."info.timestamp = ".$db_prefix."employees.tstamp and ".$db_prefix."info.fullname = ".$db_prefix."employees.empfullname and ".$db_prefix."info.`inout` = ".$db_prefix."punchlist.punchitems and ".$db_prefix."employees.office = '".$display_office."' and ".$db_prefix."employees.disabled <> '1' and ".$db_prefix."employees.empfullname <> 'admin' order by `$sortcolumn` $sortdirection"; $result = mysql_query($query); } elseif (($display_current_users == "no") && ($display_office == "all") && ($display_group != "all")) { $query = "select ".$db_prefix."info.*, ".$db_prefix."employees.*, ".$db_prefix."punchlist.* from ".$db_prefix."info, ".$db_prefix."employees, ".$db_prefix."punchlist where ".$db_prefix."info.timestamp = ".$db_prefix."employees.tstamp and ".$db_prefix."info.fullname = ".$db_prefix."employees.empfullname and ".$db_prefix."info.`inout` = ".$db_prefix."punchlist.punchitems and ".$db_prefix."employees.groups = '".$display_group."' and ".$db_prefix."employees.disabled <> '1' and ".$db_prefix."employees.empfullname <> 'admin' order by `$sortcolumn` $sortdirection"; $result = mysql_query($query); } elseif (($display_current_users == "no") && ($display_office != "all") && ($display_group != "all")) { $query = "select ".$db_prefix."info.*, ".$db_prefix."employees.*, ".$db_prefix."punchlist.* from ".$db_prefix."info, ".$db_prefix."employees, ".$db_prefix."punchlist where ".$db_prefix."info.timestamp = ".$db_prefix."employees.tstamp and ".$db_prefix."info.fullname = ".$db_prefix."employees.empfullname and ".$db_prefix."info.`inout` = ".$db_prefix."punchlist.punchitems and ".$db_prefix."employees.office = '".$display_office."' and ".$db_prefix."employees.groups = '".$display_group."' and ".$db_prefix."employees.disabled <> '1' and ".$db_prefix."employees.empfullname <> 'admin' order by `$sortcolumn` $sortdirection"; $result = mysql_query($query); } to: if (($display_current_users == "yes") && ($display_office == "all") && ($display_group == "all")) { $current_users_date = strtotime(date($datefmt)); $calc = 86400; $a = $current_users_date + $calc - @$tzo; $b = $current_users_date - @$tzo; $query = "select ".$db_prefix."info.*, ".$db_prefix."employees.*, ".$db_prefix."punchlist.* from ".$db_prefix."info, ".$db_prefix."employees, ".$db_prefix."punchlist where ".$db_prefix."info.timestamp = ".$db_prefix."employees.tstamp and ".$db_prefix."info.fullname = ".$db_prefix."employees.empfullname and ".$db_prefix."info.`inout` = ".$db_prefix."punchlist.punchitems and ((".$db_prefix."info.timestamp < '".$a."') and (".$db_prefix."info.timestamp >= '".$b."')) and ".$db_prefix."employees.disabled <> '1' and ".$db_prefix."employees.empfullname <> 'admin' order by `$sortcolumn` $sortdirection"; } elseif (($display_current_users == "yes") && ($display_office != "all") && ($display_group == "all")) { $current_users_date = strtotime(date($datefmt)); $calc = 86400; $a = $current_users_date + $calc - @$tzo; $b = $current_users_date - @$tzo; $query = "select ".$db_prefix."info.*, ".$db_prefix."employees.*, ".$db_prefix."punchlist.* from ".$db_prefix."info, ".$db_prefix."employees, ".$db_prefix."punchlist where ".$db_prefix."info.timestamp = ".$db_prefix."employees.tstamp and ".$db_prefix."info.fullname = ".$db_prefix."employees.empfullname and ".$db_prefix."info.`inout` = ".$db_prefix."punchlist.punchitems and ".$db_prefix."employees.office = '".$display_office."' and ((".$db_prefix."info.timestamp < '".$a."') and (".$db_prefix."info.timestamp >= '".$b."')) and ".$db_prefix."employees.disabled <> '1' and ".$db_prefix."employees.empfullname <> 'admin' order by `$sortcolumn` $sortdirection"; } elseif (($display_current_users == "yes") && ($display_office == "all") && ($display_group != "all")) { $current_users_date = strtotime(date($datefmt)); $calc = 86400; $a = $current_users_date + $calc - @$tzo; $b = $current_users_date - @$tzo; $query = "select ".$db_prefix."info.*, ".$db_prefix."employees.*, ".$db_prefix."punchlist.* from ".$db_prefix."info, ".$db_prefix."employees, ".$db_prefix."punchlist where ".$db_prefix."info.timestamp = ".$db_prefix."employees.tstamp and ".$db_prefix."info.fullname = ".$db_prefix."employees.empfullname and ".$db_prefix."info.`inout` = ".$db_prefix."punchlist.punchitems and ".$db_prefix."employees.groups = '".$display_group."' and ((".$db_prefix."info.timestamp < '".$a."') and (".$db_prefix."info.timestamp >= '".$b."')) and ".$db_prefix."employees.disabled <> '1' and ".$db_prefix."employees.empfullname <> 'admin' order by `$sortcolumn` $sortdirection"; } elseif (($display_current_users == "yes") && ($display_office != "all") && ($display_group != "all")) { $current_users_date = strtotime(date($datefmt)); $calc = 86400; $a = $current_users_date + $calc - @$tzo; $b = $current_users_date - @$tzo; $query = "select ".$db_prefix."info.*, ".$db_prefix."employees.*, ".$db_prefix."punchlist.* from ".$db_prefix."info, ".$db_prefix."employees, ".$db_prefix."punchlist where ".$db_prefix."info.timestamp = ".$db_prefix."employees.tstamp and ".$db_prefix."info.fullname = ".$db_prefix."employees.empfullname and ".$db_prefix."info.`inout` = ".$db_prefix."punchlist.punchitems and ".$db_prefix."employees.office = '".$display_office."' and ".$db_prefix."employees.groups = '".$display_group."' and ((".$db_prefix."info.timestamp < '".$a."') and (".$db_prefix."info.timestamp >= '".$b."')) and ".$db_prefix."employees.disabled <> '1' and ".$db_prefix."employees.empfullname <> 'admin' order by `$sortcolumn` $sortdirection"; } elseif (($display_current_users == "no") && ($display_office == "all") && ($display_group == "all")) { $query = "select ".$db_prefix."info.*, ".$db_prefix."employees.*, ".$db_prefix."punchlist.* from ".$db_prefix."info, ".$db_prefix."employees, ".$db_prefix."punchlist where ".$db_prefix."info.timestamp = ".$db_prefix."employees.tstamp and ".$db_prefix."info.fullname = ".$db_prefix."employees.empfullname and ".$db_prefix."info.`inout` = ".$db_prefix."punchlist.punchitems and ".$db_prefix."employees.disabled <> '1' and ".$db_prefix."employees.empfullname <> 'admin' order by `$sortcolumn` $sortdirection"; } elseif (($display_current_users == "no") && ($display_office != "all") && ($display_group == "all")) { $query = "select ".$db_prefix."info.*, ".$db_prefix."employees.*, ".$db_prefix."punchlist.* from ".$db_prefix."info, ".$db_prefix."employees, ".$db_prefix."punchlist where ".$db_prefix."info.timestamp = ".$db_prefix."employees.tstamp and ".$db_prefix."info.fullname = ".$db_prefix."employees.empfullname and ".$db_prefix."info.`inout` = ".$db_prefix."punchlist.punchitems and ".$db_prefix."employees.office = '".$display_office."' and ".$db_prefix."employees.disabled <> '1' and ".$db_prefix."employees.empfullname <> 'admin' order by `$sortcolumn` $sortdirection"; } elseif (($display_current_users == "no") && ($display_office == "all") && ($display_group != "all")) { $query = "select ".$db_prefix."info.*, ".$db_prefix."employees.*, ".$db_prefix."punchlist.* from ".$db_prefix."info, ".$db_prefix."employees, ".$db_prefix."punchlist where ".$db_prefix."info.timestamp = ".$db_prefix."employees.tstamp and ".$db_prefix."info.fullname = ".$db_prefix."employees.empfullname and ".$db_prefix."info.`inout` = ".$db_prefix."punchlist.punchitems and ".$db_prefix."employees.groups = '".$display_group."' and ".$db_prefix."employees.disabled <> '1' and ".$db_prefix."employees.empfullname <> 'admin' order by `$sortcolumn` $sortdirection"; } elseif (($display_current_users == "no") && ($display_office != "all") && ($display_group != "all")) { $query = "select ".$db_prefix."info.*, ".$db_prefix."employees.*, ".$db_prefix."punchlist.* from ".$db_prefix."info, ".$db_prefix."employees, ".$db_prefix."punchlist where ".$db_prefix."info.timestamp = ".$db_prefix."employees.tstamp and ".$db_prefix."info.fullname = ".$db_prefix."employees.empfullname and ".$db_prefix."info.`inout` = ".$db_prefix."punchlist.punchitems and ".$db_prefix."employees.office = '".$display_office."' and ".$db_prefix."employees.groups = '".$display_group."' and ".$db_prefix."employees.disabled <> '1' and ".$db_prefix."employees.empfullname <> 'admin' order by `$sortcolumn` $sortdirection"; } $result = mysql_query($query) or die("<h1>MYSQL QUERY ERROR</h1>\n<b>Query:</b> ".$query."\n<br/><br/>\n".mysql_error()); Basically, "Not a valid mysql result resource" means a query failed somewhere (if the code is supposed to work). Make sure you testing this with all errors and notices turned on. especially if your converting old code. Tell us what it says. Good luck.
  12. To be honest I'm surprised a server admin helped you that far. I'm guessing it's a free host, most admins just don't care/have time to help on those free hosts. (they don't get paid ). Even if it's a paid host I would imagine they would not "support" third party scripts like SMF. Although I'm surprised SMF themselves have not given you any hints on their forums. Basically, you need to learn regex. You need to learn how regex works in PHP, the preg_match/preg_replace(_all) etc if you want to do this yourself. This can take a while to learn. But if you really want to learn PHP I would stick at it until you do it, generally, it is an easy fix. Two options; 1. Modify the existing regex matcher. 2. Create a new (separate or inline) regex matcher to parse the smilies the original matcher missed. They would generally both take as much effort, 1- having to keep the functionality of the original matcher and 2- not breaking the functionality of he original matcher. Give us the output that I explained in my previous post and the whole method code (you've provided a snippet that's hard to measure) (function name(){ all code }), from the function name to the last curly brace (not the last curly brace in the file, just for that method - match them up). Good luck.
  13. I thought I would share the fact that I finally compiled it! Basically you compile as a PECL extension (duh) - Not the way xdebug documentation suggests. I now have apache 2.4.1/PHP5.4.0 and Xdebug (2.2) running with netbeans perfectly (ok 1 problem..). Only problem I think is from xdebug: Max Execution Time is exceeded when debugging, just set max_execution_time in php.ini to 0 or a higher number (not sure if the web service you use will timeout also, most have 300 sec limits). Thanks again
  14. UPDATE: So I followed "https://wiki.php.net/internals/windows/stepbystepbuild" to the letter. All successful. Then I try o compile the xdebug extension separately as required. Steps: 1. Unpack xdebug (c:\xdebug) 2. run phpize (from inside xdebug - success) 3. run configure --with-xdebug ! Failure ! Here is the console output: c:\php-sdk\php54a\vc9\x86\php540rc8-xyz>cd c:\xdebug c:\xdebug>C:\php-sdk\php54a\vc9\x86\php540rc8-xyz\Release_TS\php-5.4.0RC8-devel- VC9-x86\phpize.bat Rebuilding configure.js C:\php-sdk\php54a\vc9\x86\php540rc8-xyz\Release_TS\php-5.4.0RC8-devel-VC9-x86 module ... Now run 'configure --help' c:\xdebug>configure --with-xdebug Saving configure options to config.nice.bat Checking for cl.exe ... <in default path> Detected compiler MSVC9 (Visual C++ 2008) Detected 32-bit compiler Checking for link.exe ... C:\Program Files\Microsoft Visual Studio 9.0\VC\Bin Checking for nmake.exe ... <in default path> Checking for lib.exe ... <in default path> Checking for bison.exe ... <in default path> Checking for re2c.exe ... <in default path> Detected re2c version 0.13.5 Checking for zip.exe ... <in default path> Checking for lemon.exe ... <not found> Checking for mc.exe ... C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin Checking for mt.exe ... C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin Build dir: Release_TS PHP Core: php5ts.dll and php5ts.lib Enabling extension C:\xdebug [shared] c:\xdebug\configure.js(1254, 3) Microsoft JScript runtime error: 'PHP_PGI' is un defined c:\xdebug>nmake Microsoft (R) Program Maintenance Utility Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. NMAKE : fatal error U1064: MAKEFILE not found and no target specified Stop. Note: During the configure process: I checked the JS file and that constant sure enough is not mentioned apart from 2 lines that try to read it. Along with 'PHP_PGO'. It is though, the same routines that are in the original configure.js for compiling PHP itself, which runs perfectly well without any changes. I am baffled as to why I am stuck at this point. Perhaps something is not being included as it should be.. ? Thanks for any input you may have regarding this .
  15. Hi guys, I need to compile xDebug from the Master Git Repository for PHP 5.4.0RC8 for Windows x86. I can find next to no information for loading this project into a VC9 IDE, and then compiling the result. The source comes with a makefile batch program but does not contain the mak files themselves. Any help would be greatly appreciated! Thanks PS: xDebug Source - https://github.com/derickr/xdebug PHP5.4.0RC8 Binary/Source: http://windows.php.net/qa/ using Visual Studio 2010. And nMake 1.5. (Windows 7) Tried; http://blog.slickedit.com/2007/09/creating-a-php-5-extension-with-visual-c-2005/ then tried running the makefile with nmake to find .mak files missing. UPDATE: Just caught this link: http://bugs.xdebug.org/view.php?id=730 Seems someone knows how to do it . Will review this case and see if I can get it to build.
×
×
  • 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.