AyKay47
-
Posts
3,281 -
Joined
-
Last visited
-
Days Won
1
Posts posted by AyKay47
-
-
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?
-
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');
-
Man1(0), Man1(1), Man1(2), etc.
Man2(0), Man2(1), Man2(2), etc.
Man3(0), Man3(1), Man3(2), etc.
that isn't an array
I don't quite understand what you are asking, a foreach loop is fine for looping through an array.
-
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.
-
It would be neat to call DB as global
global $db;
since you would need db for many different classes and methods, and it's a pain in the but to put them in the constructor all the time.
Or design an abstract class to extend the db object from.
just...no
I agree it is a pain sometimes, but it's the correct way to do it.
Never use the global keyword.
-
couldn't you have tested this yourself?
-
lol, geeze
-
you do realize that the basis of ajax is the use of this object right?
-
<div class="content">content<div>
you missed the closing div tag, should read
<div class="content">content</div>
-
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
-
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; ?>
-
as far as I know it's always been text/html output. There used to be a tab at the top that let you switch between html or plain text and that seems to be gone now. Maybe it remembered your selection so it went to plain text for you by default, not sure if it did that or not.
very well could have, I guess I will have to use a header to get to the proper content-type.
Thanks for the help.
-
http://codepad.viper-7.com/N4SqUv
You should put it in plain text mode when you test things by sending the appropriate header.
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
-
search for it on google.
-
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
-
this isn't really the right solution.
Dates should be stored in a DATE or DATETIME type field in the database.
-
Do you have an example we can use to reproduce the problem? Saying "sometimes it doesn't work" is about as ambiguous as saying there's a security hole in IE6.
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.
-
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";
-
this will allow anything to come before or after the href attr.
Things can be added to this, depending on where its coming from.
-
thanks, but what about the attributes after href :
style="text-decoration: none;">
as the regex does not include it as a possibility...
remove the end >
-
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.
-
*untested*
$pattern = '~<a.*?href=".+?\?N_ID=(\d+)">~';
-
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.
-
I think i found the problem, i was using double quoutes in :
$str = "<i><font color="800080"> man </font></i><p><font color="9898989"> hi </font></p><p><font color="1111111"> cheers </font></p>";
while it should be:
$str = '<i><font color="800080"> man </font></i><p><font color="9898989"> hi </font></p><p><font color="1111111"> cheers </font></p>';
thanks anyways...
that or what thorpe suggested.
Table Styling Question
in CSS Help
Posted
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.