Jump to content

AyKay47

Members
  • Posts

    3,281
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by AyKay47

  1. Handling information from a database is a bit different then grabbing data from a static array. But as to your question, using inline styles should typically be avoided on large scale projects, as this will lead to alot more code then is necessary. Typically you want to use classes and id's to style elements using one ore more external style sheets. The author of this code probably just styled them inline for a quick example.
  2. Obviously the number of rows being grabbed is 1. If this is not what you expect to be returned, then something is wrong with your query. It's hard to help any further without actually seeing the query. What data does the user have to enter in order to login?
  3. Well I only glanced at the code and I already see a couple of things. It's obvious that you do not have error_reporting on. so place these two line at the top of the PHP code and fix any errors that you receive. error_reporting(-1); ini_set('display_errors', 'On');
  4. that isn't an array I don't quite understand what you are asking, a foreach loop is fine for looping through an array.
  5. It really depends on how much of the information that you have "learned" you actually understand and are confident using, and yes I agree with thorpe regarding the topic you posted in, which I commented on before I saw this thread. All that we have to base your knowledge off of is posts on this forum, seems like you have a ways to go. My advice would be instead of trying to cram as many languages in as you can, focus on becoming proficient in each language one at a time. Once you feel that you have a firm understanding of one, move on to the next.
  6. just...no I agree it is a pain sometimes, but it's the correct way to do it. Never use the global keyword.
  7. couldn't you have tested this yourself?
  8. lol, geeze
  9. you do realize that the basis of ajax is the use of this object right?
  10. <div class="content">content<div> you missed the closing div tag, should read <div class="content">content</div> http://jsfiddle.net/hZ6nQ/
  11. you can use .htacces php_flag session.bug_compat_42 1 php_flag session.bug_compat_warn 0 or php.ini session.bug_compat_42 = 1 session.bug_compat_warn = 0
  12. remove the break; that you have in the else condition. If $sig[0] does not match, the break; will break you out of the for loop and no other $sig values will be compared. $string = 'TESTSTRING!! I AM AN EMAIL TEXT!!! SO RANDOM! --- I AM A SIGNATURE!! HERP DERP CUT ME OFF'; //define possible sig starts (=filter) $sig[0]=("#=="); $sig[1]=("---"); $sig[2]=("the name of an enterprise"); $sig[3]=("___"); for ($i=0; $i <= count($sig); $i++) { $sigpos = strpos($string,$sig[$i]); if($sigpos !== false) { $string = substr($string,0,$sigpos); echo trim($string); break; } } echo "<br />"; //show where the sig is cut off echo $sigpos; ?>
  13. very well could have, I guess I will have to use a header to get to the proper content-type. Thanks for the help.
  14. right but I shouldn't need to do that every time. things like this used to work fine on codepad.viper-7. I guess they changed the content-type from text/plain
  15. search for it on google.
  16. What $_GET values are available in that script? Also, there's no point in reset()ing $_GET Basically this error occurs when attempting to directly transfer global variables into the $_SESSION array when register_globals is off
  17. this isn't really the right solution. Dates should be stored in a DATE or DATETIME type field in the database.
  18. heh, yeah sure. http://codepad.viper-7.com/20Gd51 it seems that tags are now stripped or something of the sort. The behavior seems kind of random to me, as sometimes it parses the string fine and sometimes its stripped. This behavior did not occur until maintenance was performed on the site about 2 weeks ago.
  19. you are using the php operators in your sql statement. $query3="SELECT * FROM hours WHERE (out1 <> '0' AND in1 = '0') OR (out2 <> '0' AND in2 = '0') AND `date` = $date";
  20. this will allow anything to come before or after the href attr. Things can be added to this, depending on where its coming from.
  21. remove the end >
  22. Is anyone else noticing unexpected behavior with regex functions like preg_match() etc. on codepad.viper-7.com? A few tests I have performed have not shown any results at all. A pattern like '~.*~'; isn't matching anything when the $subject argument is certain things, other times it will match everything in the $subject argument, very strange. I haven't ran enough tests to determine what exactly in the $subject arguments is causing this, just wondering if anyone else has experienced this.
  23. *untested* $pattern = '~<a.*?href=".+?\?N_ID=(\d+)">~';
  24. the problem is this line: $season = $k['season']; so if the season if 1, at the end of the first iteration of the for loop, $season will be set to 1, and the next iteration of season 1 episode 2, this line will not pass: if($season!=$k['season']) { so your credentials will not be wrapped in the season div. I'm not sure of the logic for this, but it needs changed.
  25. that or what thorpe suggested.
×
×
  • 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.