Jump to content

exally

Members
  • Posts

    38
  • Joined

  • Last visited

    Never

Everything posted by exally

  1. I believe there is a problem with you SQL query - The column names are enclosed with the character ' and really should be with the character `. Also while calling mysql_query within mysql_num_rows or mysql_fetch_assoc looks more efficient it makes it harder for Debugging. I suggest something to the following. $sql = "SELECT * FROM `users` WHERE `site_name` LIKE 'berland' AND `card_id` LIKE '290093C84E' LIMIT 0 , 30"; $res = mysql_query($sql) or die(mysql_error() . "<br/>" . $sql); if(mysql_num_rows($res) > 0) echo '1'; else echo '0'; That way you can also use the same result to iterate through the rows.
  2. "$xml->healings[0]->".$xmla."[0]->descrip[0]"; This might require that you use the function eval.
  3. echo utf8_decode($xml->healings[0]->$xmla[0]->descrip[0]); to echo utf8_decode($xml->healings[0]->xmla[0]->descrip[0]); Without more information about the object etc, what are you hoping to achieve?
  4. like everyone else said, nl2br --- if you have something that addslashes when going into the database you made need to do a str_replace("\\\\", "\\", $string);
  5. your Parameters for the If statements aren't being set? if you are receiving them over post or get declare them via $var = $_POST['var']; maybe??
  6. iversonm - i test the following code. If you leave out the {} brackets it will execute or not to the next ';' (semi-colon). <?php $p1 = ""; $p2 = 'on'; $k = 'on'; $pointsmin = 'ptmin'; $pointsmax = 'ptmax'; $xLow = 1; $xHigh = 3; $yLow = 0; $yHigh = 4; $x1 = 2; $x2 = 3; if ($p1=='on' AND $p2=='') $include = " AND points >= '$pointsmin'"; else if ($p1=='' AND $p2=='on') $include = " AND points <= '$pointsmax'"; else if ($p1=='on' AND $p2=='on') $include = " AND points BETWEEN '$pointsmin' AND '$pointsmax'"; else if ($p1=='' AND $p2=='') $include = ""; if ($k =='on') $betweenclause = "x BETWEEN $xLow AND $xHigh AND y BETWEEN $yLow AND $yHigh"; else if ($x=='on' AND $y=='') $betweenclause = "x BETWEEN $x1 AND $x2"; print $include . "<br/>"; print $betweenclause . "<br/>"; ?> and got the result of
  7. simplest way for you would be to run in through a function that converts from that format to the desired $time = str_replace(array(" ", ":"), array("-","-"), $col['date']); //format for explode $time = explode("-", $time); $time_stamp = mktime($time[3], $time[4], $time[5], $time[1], $time[2], $time[0]); //Convert to timestamp print date('d F Y', $time_stamp); There is probably a better way, but none that involves that sort of simplicity.
  8. Look at this, i can understand the want to speed up the code by losing the '{'. But in this case put that back in. The second if and else if statements need ( not { styled brackets.
  9. be wary, some servers with disable your access if you try to send 10000 at once
  10. Yes, look in /catalog/includes/configure.php and /catalog/admin/includes/configure.php - However, you change one you change them all in this case.
  11. I have heard of this recently. If you have an old version of FckEditor that could be a cause. There is also numerous other ways that do it to. More likely this vuneralbility was somethign that you did not do but a third party software. Any thoughts on that?
  12. Your answer may lie in a Java applet or a Adobe Air application.
  13. front. In form definition, multipart maybe?. There is little reason why Server side code should be effected by browser usage.
  14. The best editor i have found so far is definately Web Expressions 3 by Microsoft. Other than that mainly Dreamweaver or Visual Studio 2005 with the PHP.NET add on.
  15. if($list_include[0] = 'product'){ include("source/form_product.php"); } to if($list_include[0] == 'product'){ include("source/form_product.php"); }
  16. thanks, testing this now! It does make sense as we are sharing the server but not the document root if you get me. we are home2 where i assume there is a home
  17. in order to be sure, I assume that the files are stored in /tmp - would it be better to create /tmp/custom or /tmp2 Also do i have to create the folder and set certain permissions or would PHP handle that?
  18. how big are the files? becuase i have just thought of a real shitty way to do it. Basically using CURL, request a php file on the local server to open it and print the file as the response. Then instead of read file, print or echo the CURL response. Shitty method i know, also look at FTP'ing to the new server on request. using the PHP FTP functions.
  19. unfortunately my server has disabled this method, however i have put this in my .htaccess file and appears correctly when i do phpinfo() and each page where i call session_start()
  20. if you are competent with PHP you can build this quite easily.
  21. Hey guys, I can't seem to get my PHP sessions to stay alive longer than 5 mins of inactivity. I have set session.gc_maxlifetime 86400 session.cookie_lifetime 86400 session.name FILEITHERE (i do this as a test, still doens't work). Any ideas ??
  22. If you are have VS2008 ignore MFC completely. It is good if you want to your custom classes imported into, but really you should be looking to update you coding to Windows Forms .NET either in C# or C++. The conversion is a simple one from C++ to C#. The fact is that MFC and Windows Form acts in the same way, you have a simple designer that you can create nice forms and what not in. You then interact with the object using either event handlers in .NET and the linked object in MFC. The hardest thing to do in WF is the string manipulation but once you learn you have System::Convert::To<type>(); or basically everything has a .ToString() function attached it is easy. BTW to load forms from other forms is simply Form2 frm2 = new Form2() frm2.Show() or frm2.ShowDialog();
×
×
  • 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.