1,730 Posted Topics
Re: introducing variables into query will expose you to dangers of SQL injection. it is bad practice AFA security is concerned. I would have if..else for that, something like below. Also instead of using mysql_** I would use PDO or MySQLi [CODE=PHP]$tags = $_POST["search-tags"]; $age = $_POST["search-age"]; $rating = $_POST["search-rating"]; $city … ![]() | |
Re: your datagrid class is poorly designed and here is why: 1. You have mixed Database issues with non database -Either make it fully database with all connections and queries in one class 2. You make mistake of adding html into class. Html should be in separate php class where you … | |
Re: just a hint based on your code. foreach loop works better than for loop! $array = array("Moja", "Mbili", "Tatu"); [CODE=PHP]foreach(array as $key=>$value){ echo "Array Key is: ".$key." And value is: ".$value; }[/CODE] Arghhhhh! You have just resurrected old thred ;) Let them die and open new thread for your question! | |
Re: If you need to activate something, send them secret code and not any user information. If you want to be more secure, use double word activation in that two keywords are needed to activate and they are sent separately in different times. You can use tri-keyword...et al depending on sensitivity. … | |
Re: [CODE=PHP]If($var){ include "page1.php"; } else{ include "page2.php; }[/CODE] | |
Re: Database arrays does not understand where result came from (search or article, all it knows is it is from db). It seems your pagination code is tied to DB code which is quiet bad thing to do! | |
Re: [CODE=C++]int func1(int x){ //do something with int return func1(x-1); }[/CODE] see also [URL="http://www.danzig.us/cpp/recursion.html"]this[/URL] and [URL="http://www.cprogramming.com/tutorial/lesson16.html"]this one[/URL] | |
Re: [CODE]<?php function fix_it($name) { $name=ucwords(strtolower($name)); //echo $name; <----Don't echo just return it return $name; } ?>[/CODE] | |
Re: [QUOTE=wattaman;1688526]Sorry, I must gave the impression I'm an expert :) Would you kindly write the code that will do the trick? I don't know much about php and mysql :( Thank you![/QUOTE] to secure a web app from XSS, validate input against whitelist and discard anything not in white list. … | |
Re: use GUI toolkit. If you go for wxPython there is [URL="http://docs.wxwidgets.org/trunk/classwx_combo_box.html"]wxComboBox[/URL] as one of options | |
Re: if you don't mind waste time fixing things you can use [URL="http://www.wampserver.com/en/"]Wamp[/URL]. In windows is what I use! | |
Re: do you mean AJAX? | |
Re: [QUOTE=RazorRamon;1688451]I changed line 12 like u said but it still isn't working.[/QUOTE] "isn't working" does not convey anything useful! | |
Hi, I was reading on the net and could not find how to implement as loop something like twig's [CODE] <ul id="navigation"> {% for item in navigation %} <li><a href="{{ item.href }}">{{ item.caption }}</a></li> {% endfor %} </ul>[/CODE] I want to have idea of what is going on! | |
Re: also [I]"it does not work"[/I] is not better way to explain problem. Say what and how exactly it does not work! | |
Re: Apart from w3schools my fav is [URL="http://devzone.zend.com/article/627"]PHP 101[/URL]. It is crash course | |
Re: [QUOTE=pritaeas;1688556]Use Bcc and put it in the additional header. See an example in [URL="http://php.net/manual/en/function.mail.php"]the documentation[/URL].[/QUOTE] In the context of correspondence, blind carbon copy (abbreviated Bcc) refers to the practice of sending a message to multiple recipients[B] in such a way that conceals the fact that there may be additional addressees … | |
Re: [QUOTE="PHP Manual"]string implode ( string $glue , array $pieces ) string implode ( array $pieces ) [/QUOTE] from [URL="http://php.net/manual/en/function.implode.php"]PHP Manual[/URL] [CODE]<?php $array = array('lastname', 'email', 'phone'); $comma_separated = implode(",", $array); echo $comma_separated; // lastname,email,phone // Empty string when using an empty array: var_dump(implode('hello', array())); // string(0) "" ?> [/CODE] | |
Re: [QUOTE=cereal;1617841] You should just check if the file has the sizes you want, and if not, then the user should change the values on his own computer[/QUOTE] This is perfect solution. That should be "policy". User should not upload files greater than you want them to :) | |
Re: what went wrong, I mean how did it start? Which OS are you using?? | |
Re: [QUOTE=daniel36;1687489].please solve my problem.[/QUOTE] So what is your problem? | |
Re: Are you sure XSS filtering is not enabled? | |
Re: [CODE=PHP]else ([/CODE] is supposed to be [CODE=PHP]else {[/CODE] line 157 | |
Re: if you study how it works and explain here, we will easily help. No body can translate it for you! ![]() | |
Re: I thinks its disadvantages are more of philosophy than hardware thing. once get compiled to machine language/byte code, that disappears. I don't have any good reason to offer you though | |
Re: are using phpmail to deal with mime? Why not give try to PHPMailer/SwiftMailer? As adviced above please post relevant code (not whole thing) | |
Hi friends, it is weeks now I'm trying to figure out how to make simple custome theme engine for my custom PHP CMS. I want to use it for my projects. It is based on custom framework too. So I checked how Drupal does it and Joomla. They are complex … | |
Re: Seems to me like you need [URL="devzone.zend.com/article/627"]this[/URL] to get up | |
| |
Re: did you try google? here is one of the link teaching to do just that. Follow tutorial and if you fail anywhere tell us [url]http://woork.blogspot.com/2009/05/how-to-implement-post-to-wall-facebook.html[/url] | |
Re: [QUOTE=54uydf;1686417]if the file is on the server- [CODE]if (file_exists("folder/myfile.xlsx")) unlink("folder/myfile.xlsx");[/CODE][/QUOTE] Give Op Something to work on instead of straight code. That way they won't learn. That being said, I would suggest you check [URL="http://php.net/manual/en/class.directoryiterator.php"]SPL's directory iterator[/URL]. There are couple of examples under comments | |
Re: I hope we are not seers. We cannot peep in your machine and look at your code! | |
Re: Yes it is called [URL="http://net.tutsplus.com/tutorials/php/how-to-paginate-data-with-php/"]pagination[/URL] | |
Re: no magic follow security rules. here is one of them concerning the question: [QUOTE]Before putting user input in HTML output, ALWAYS CONVERT control chars to [URL="http://www.php.net/manual/en/function.htmlspecialchars.php"]HTML entities.[/URL] This protects against cross-site scripting (XSS) or messing up your output with custom HTML[/QUOTE] [URL="http://security.goldenrules.tk/"]Source:[/URL] I would add to that, since it is … | |
Re: [QUOTE=victor1244;1684500]I am using cd's that I downloaded from the Ubuntu website. I can't understand that either. victor1244[/QUOTE] can you present exact message and screenshot? | |
Re: [QUOTE=ardav;1684799]siva - you'll be glad to know that you've won today's prize for: "Making the least sense on a forum" We have many prizes from which you can choose. Just send your email address, along email with password and any credit card details to my PM.[/QUOTE] ;) | |
Re: [QUOTE=ardav;1684559]Dw is an ide. Use both if you like[/QUOTE] OP always posts useless questions! May be s/he is a kid! | |
Re: [QUOTE=catherine sea;1683655]Add semicolon after include [CODE]include 'connect.php'[COLOR="Red"];[/COLOR][/CODE][/QUOTE] Yep, that is it! Since PHP interprets semicolon as fullstop then line it will interpret as one line, so you are illegally trying to concatenate string and variable without a dot: [CODE=PHP]include 'connect.php' $id = $_GET['id'];[/CODE] | |
Re: Tomcat works with MySQL without Apache. Apache and Tomcats are servers doing similar joby utilizing different technology. So Install Tomcat and then install MySQL server and use JDBC to connect to MySQL | |
I have been given acer 5100 and pressing power button it light momentarily and goes off. It will not boot anything, until I press power button and then hold down F9 or F10 keys then it will boot as usual and things goes well. I have even upgraded the bios … | |
| |
Re: Use while loop to ask variables and the condition should be limited to max value [CODE]var = getUserMaxValue; anotherVar = 0; while(anotherVar<var){ askUserToInputSomething; StoreInArrayOrVector; } sortTheVector; printValues;[/CODE] Just a hint: [url]http://www.cplusplus.com/reference/stl/vector/push_back/[/url] [url]http://www.cplusplus.com/reference/algorithm/sort/[/url] | |
Re: [CODE]<?php $form = <<<EOT <form action={$_SERVER["PHP_SELF"]} method="post" enctype="multipart/form-data"> <label for="username">Username:</label> <input type="text" name="username" /> <br /><br /> <label for="password">Password:</label> <input type="password" name="password" /> <br /> <input type="submit" name="submit" value="Submit" /> </form> EOT; if(isset($_POST['submit'])){ //do stuffs print_r($_POST); }else{ echo $form; }[/CODE] | |
Re: [CODE=C++]# include <cstdlib> int main(){ system("gedit /home/name/Downloads/filename.html"); return 0; }[/CODE] | |
Re: ending tags and string for values are missing [CODE=php]<input name="nama" size="20px" type="text" value =<?php echo $data['nama_produk']; ?>>[/CODE] is supposed to be [CODE=php]<input name="nama" size="20px" type="text" value ="<?php echo $data['nama_produk']; ?>"/>[/CODE] | |
Re: fix? Nope! Work on them and bring specific point for help. We don't do homework for you! |
The End.