AyKay47
Members-
Posts
3,281 -
Joined
-
Last visited
-
Days Won
1
Everything posted by AyKay47
-
can you post the code on here please.
-
thought as much, the string "1" should convert to an INT 1 anyway.. can you post some of the relevant code around this so that we can help you further..
-
your error lies within theses lines.. $result=mysql_query($query); $result_set=mysql_fetch_array($result); if(mysql_num_rows($result_set) == 1) you are attempting to use the mysql_num_rows() on a mysql_fetch_array() function, this is invalid... change the lines to this, $result=mysql_query($query); $result_set=mysql_fetch_array($result); if(mysql_num_rows($result) == 1)
-
change to <?php if ($rowRecordset1['moisture'] == 1) {echo "moisture resistant";} ?> remove the quotes around the one..
-
possibly.. I gave some suggestions for this already.. however I advise against it.. that's all I'm saying
-
this will lead to undesired results, ex. clicking an anchor that links to an internal page will trigger this.. since it looks for the DOM being unloaded only
-
because you will need a mail server.. Postfix is a popular choice
-
How to deal with noobs. Really, I cannot stand this.
AyKay47 replied to Far Cry's topic in Miscellaneous
very true.. take what you can out of the class, try to learn as much as you can on your own if the class is behind your skill level.. there is always something new to learn. What you really don't want to do is coast through the class not attempting to learn anything new on your own with the provided books etc.. then the class would be a complete waste. -
there is no easy solution to this to my knowledge.. also can be pretty annoying to the people viewing your site so I really don't recommend it.. but if you have a good reason for doing it then you might want to look at the onunload event.. also to point you in the right direction.. http://stackoverflow.com/questions/2365994/display-a-warning-when-leaving-the-site-not-just-the-page
-
not fully understanding.. why are you manually adding quotes to your search criteria? it looks like $queryemails should work.. im assuming that it doesn't?
-
not a very helpful post.. OP, if this is the only case that you have.. a switch is not the best way to go about this.. simple if else statements will work.. and it looks to me from the code provided, the the $error variable doesn't really do anything.. if both of your conditions specified are met, then an error message will show.. if the aren't met, the error message will not show.. isn't this what you want?
-
not a problem.. please mark this as solved.. and let us know if you have any other issues in the future..
-
you are returning $message..but this variable is not available outside of the functions scope.. I think this may be where you are confused.. to get the returned value.. you muse set the function to a variable.. $message = $db->addNewBookmark($hash,$url,$title,$current_user); //arguments filled out appropriately. now $message (or whatever you name the variable) will contain the value of your return statement..
-
this is a good precautionary step.. but should not be used as the only safeguard, as it can be tampered with.. OP can you explain a little further as to why this is not working for you.. I looked through your code and it appears like it should be doing what you want it to.. if the password length is greater than 8 characters, it will be bordered red and a message will appear..
-
i missed $sql sorry, remove the AND in $query and add to $sql if($key == 0) { $sql .= "AND room = '$id' "; } else { $sql .= " OR room = '$id'"; } because right now you would have AND OR room = "$id" which is obviously invalid
-
read my post above and look into the methods that I mentioned.. you will want to use AJAX for this..
-
because I believe that he wants it to scroll until it gets to the bottom.. like the one at the top does.. however OP if this is incorrect.. yes you can simply set the div to position:fixed with bottom:0px and left: 0px
-
you need to check for the POSt index to be set before you try to set it to a variable, as stated above.. also, I notice that you do not have a submit button in your form.. I am assuming that you want your code to recognize what radio button is enabled as soon as the user clicks it? This cannot be done in PHP.. you will want to look into using AJAX or jquery AJAX API if this is the case
-
1. you are forgetting your variable symbol $ $result = mysql_query($query, $this->connection); 2. the return should work.. other than above, i don't see any other issues
-
How do I reflect the text content of the variable $a in this text form?
AyKay47 replied to Morris2's topic in PHP Coding Help
what? -
you don't have an OR in the query you gave us.. what field_type is `deleted`?
-
once you have the plugin code you can actually modify the positioning in the code. perhaps make another plugin and name the function something else for the bottom fixed positioned div. It looks like the code governing the position is at the end of the code..
-
since you asked how to access the id attribute of an element, i'll give an example.. in the example I will show how to grab a filed value using jquery (javascript framework) <form action='test.php' method='POST' onsubmit='testFunc'><input type='text' value'default Value' id='text_input' /><input type='submit' value='submit' /></form> testFunc(){ var input_val input_val = $("#text_input").val(); if(input_val != "default Value"){ //probably do some AJAX here } return false; //stops the forms default action } now you will also want to handle the form using PHP as well, just in case the user does not have javascript enabled, thus why I included the form tags and filled in the necessary information needed for PHP to handle it
-
may i ask why you have an entire document stored in a function? typically not a good idea. you receive a header error because you are trying to use the header function after you have already sent output to the browser.. this will not work.
-
what does your query look like now? you will want to use a JOIN here..