AyKay47
Members-
Posts
3,281 -
Joined
-
Last visited
-
Days Won
1
Everything posted by AyKay47
-
make #sidebar and #mainContent heights 100%; that way each div will be the height of the parent div, if you don't want both divs to be the same height as #container, create another parent div inside of #conatiner.
-
PHP or Jquery or should I use something else????
AyKay47 replied to Tech boy's topic in PHP Coding Help
a combination of both really, learning a new language should not be rushed, as this will lead to common errors that can be avoided, if you are serious about wanting to get into web development, take your time, learn the material the correct way, and then proceed with your script. -
thank you for the recommendation, isn't Bjarne the creator of C++? can't really get a more reliable resource than that.
-
I've tried: $count = mysql_query("SELECT COUNT(id) FROM my_posts"); Then: $q1 = mysql_query("SELECT * FROM my_posts ORDER BY id DESC LIMIT 1"); // to be the first result And: $q2 = mysql_query("SELECT * FROM my_posts WHERE id<$count LIMIT 1"); //to be the second result but this cannot be executed.. mysql_query returns a resource, using its return value like an integer is clearly incorrect and will never work.
-
Those books were recommended by one of my friends as well, will definitely need to purchase it/them. I'm assuming it is a several book series?
-
Need help: compare an input string with a set of valid characters
AyKay47 replied to strategos's topic in Applications
1. notify the user by having the necessary string as the input value. 2. use a regular expression to search for the specified pattern in the string. (really, in this instance, strpos may be used.) and act accordingly. -
dealing with backslashes in a like clause can be a little buggy, this link from mysql dev talks about it: http://dev.mysql.com/doc/refman/5.1/en/string-comparison-functions.html#operator_like
-
use a mysql JOIN for this, you can google it if you are not sure what it is, and really, you didn't answer my first question, what errors do you receive.
-
mysql_real_escape_string will take care of the backslash, what error(s) do you actually receive
-
order by primary_index desc limit 3
-
I have done research, almost everywhere I looked it is based on opinion. classic..lol.. and somewhat true
-
thank you MasterAce, i have looked at cplusplus.com and it looks like it does a very good job of covering the basics. I will also look into the book you suggested, thanks again.
-
hey guys, im looking to get into programming applications using C++, maybe Java at some point. I am looking for some recommended online references/tutorials, as well as any books that you guys recommend.
-
TEXTAREA field. Keeping newlines, but keep input to DB safe
AyKay47 replied to eirika's topic in PHP Coding Help
it is recommended to use nl2br() to output data from your db, not on insertion, as mentioned. -
yes, you will need the PDO driver for prepared statements if you choose to go that route, depending on what PHP version you are running, you may or may not have the driver installed/enabled.
-
always have session_start() at the top of any page where you plan on using sessions, if session_start() is not there, sessions will not be displayed. Never have session start() in a condition.
-
mysql_real_escape_string
-
1. to avoid silly errors that come from having to escape everything, don't use php to echo javascript, end php, execute the javascript, then start php again <?php echo "blah"; ?> <script> //js stuff </script> <?php ?> 2. well, you could pass the form object values as arguments, which would make for a more robust and reusable function, which is what functions are for, but either way you should definitely be assigning each value to a different variable. 3. you can for loop the document.forms['addp'] values and check for them being null or empty inside of the loop, this would reduce the amount of code needed greatly.
-
have the form handling on the same page and pass the id from te form via the $_GET or $_POST methods. It would help if you posted the relevant code.
-
should be able to figure it out from the hint, but you'll want something like this, with whatever conditions you want to add. select distinct ip from track
-
Yeah, and StarCraft wasn't founded in Korea either! like
-
You can use the PHP magic constant __FILE__
-
no problem, im glad you figured that last part out on your own. good work
-
because $name = "Bob" is static, every time the page is refreshed, $name will be set to Bob.. if you want the name that the user types in to appear there, you can store the value in either a session or a cookie