1,038 Posted Topics
Re: [QUOTE=peck3277;1023139]Hi all, I've tried searching both here and google for help on this one. I'm not quite sure what to call it basically I have a directory with different files all .txt. I want to display only the ones beginning with letter A. How do I modify my below code … | |
Re: You can't, use a database. It's that simple. | |
Re: You're not giving a full path, you're giving a web path. In the first example it is making a web request to fetch the file, in the second example it is directly accessing the filesystem. Make sure your path is correct or use an absolute path like [icode]/path/to/your/webroot/page.html[/icode] | |
Re: [QUOTE=shishtawitch;1020756]i dont no whether it is the place or not to share my problem........the problem is that i have a little problem with my router..........!! when ever the electricity failure happens, my internet connects gone to disconnect imediately............then if i turn on and off my router manually it connects again … | |
Re: [QUOTE=niche1;1019792]I need to import TEST.TXT (located in the same directory as my script It has 1 Record: "6","Lunch","234" Iget this error message: Warning: mysqli_close() expects exactly 1 parameter, 0 given in C:\wamp\www\test\import.php on line 19 Why? Heres my script: [code=php] <?php // Connect to the MySQL server and select the … | |
Re: [QUOTE=enzo420;1019699][CODE] echo '<a href="profile.php?id="$id">Enzo's Profile</a>'; ?> [/CODE] ive spotted the " after the = sign, wasnt supposed to be there but $id doesnt seem to contain anything?[/QUOTE] If you're trying to get the value of $id in that string then you have to concatenate because you're using single quotes. [code=php] … | |
Re: If you get no errors and no exception is through but it's still a white page that means the query returned no results. Execute the query directly in MySQL or phpmyadmin or whatever you're using to directly access the database and see if it returns any rows. | |
Re: There are a couple of ways to do it that pretty easy. If you're using the socket approach you can just have PHP open a client socket and send data to the C++ app. The other way is just to have C++ poll a file that PHP writes to. The … | |
Re: [QUOTE=slaywee;1014571]Develop an Inventory Control System. The database of inventory should keep the information of Items in the file with flowing components, a. Item ID b. Item Category c. Item Name d. Last Date of Purchase e. Cost Per Unit f. Number of Items in hand Include in your project add_new_Item, … | |
Re: This will find the php interpreter for you and use it, don't directly link to it. [code=sh] #!/usr/bin/env php [/code] | |
Re: [QUOTE=Phil++;1014478][code] int numbers[10]; for(int i=0; (i<10); i++) { cout << "Please enter number " << i << endl; cin >> numbers[i]; } cout << numbers[3]; cout << numbers[5]; cout << numbers[2]; [/code] Something like that?[/QUOTE] Try not to spoon-feed him homework help considering he hasn't posted any attempts. | |
Re: [QUOTE=veledrom;1012021]Hi, We can code this way to print something if Exit button is clicked. [code] <form action="process.php" method="POST"> <input type="hidden" name="hiddenName" value="Jolly" /> <input type="submit" name="submit" value="Exit" /> </form> if($_POST["submit"] == "Exit") { echo $_POST["hiddenName"]; } [/code] What about if we use this way. How do i check if Exit … | |
Re: [QUOTE=alexjbriggs;1012200]xan, i read through that before i posted. still can't figure it out.[/QUOTE] If you read through the FAQ then you would have A) Figured it out or B) posted the MySQL error that your are getting instead of just the error that says invalid argument. So read through the … | |
Re: [QUOTE=pandeyprashant;1012962]Hello everyone, please tell me how to disable print-screen option in mozilla firefox to save my web page.[/QUOTE] You can't. Simple as that :) Even if you did disable it with javascript all the user would have to do is disable javascript and hit printscreen. | |
| |
Re: [icode]return subConfirm()[/icode] not just [icode]subConfirm()[/icode] | |
Re: It's the same for pretty much every browser. [code=javascript]document.getElementById('someidhere');[/code] | |
Re: No you can't. i in your scenario is the key for each value so the only way to get the actual value would to do [icode]['val1', 'val2', 'val3'][i][/icode] which would defeat the purpose :) | |
Re: Your query might be failing [code=php] $result = mysql_query($sql);[/code] Try [code=php] $result = mysql_query($sql); if (!$result) { echo mysql_error(); }[/code] | |
Re: What language are you using the for backend? (PHP, ASP, whatever) | |
Re: Most hosts now-adays have a web-based apache log viewer in their control panels. If yours doesn't you might want to get a new host :) | |
Re: Well here [code=c++]if (num < 1 || num > 4)[/code] You're already checking if user input input is negative for the menu so just use that logic when you get input for the user's other values, for example [code=c++]if (base < 0)[/code] | |
Re: [QUOTE=shaifymehtadnn;1009525]1. Develop sigma and pie bonding and anti bonding molecular orbitals of 2s and 2p[/QUOTE] 2. ??? 3. Profit | |
Re: You can't, the alert dialog uses the system's (or more accurately, the browser's) theme. If you want to change the way alerts look you will have to create your own modal dialogs. | |
Re: [QUOTE=SKANK!!!!!;1005048]what are those : and ? marks doing in there?[/QUOTE] That's called the ternary operator. [code=php] $somevar = (condition) ? (true case) : (false case); // so $test = true; $somevar = $test ? "Hello" : "Goodbye"; // is the same as $test = true; if ($test) { $somevar = … | |
Re: [QUOTE=neithan;1008468]I'm new to C++, and i've seen some C and C++ code. I tried array[] and vector<> so i see i can use both, why should i use what way to work with vectors? Furthermore, i've seen a lot of "array[]" in this forum... so, any lead? Thank you! Oh … | |
Re: Line 49 [code=php] if ($_POST["$submit"]) // should be if (isset($_POST['submit']))[/code] | |
Re: [code]$_SERVER['QUERY_STRING'][/code] That's the short answer | |
Re: [QUOTE=Troy III;1002543]Nice I'm puzzled though, why is that code using same id on multiple elements? And I have another puzzle somebody could answer to me: whose responsibility is to mark threads as solved, :: the thread starter or admins? (!please, I really don't know the answer to this, just curious!)[/QUOTE] … | |
Re: What exactly don't you understand? You have a function 'hello' that takes 'name' as a parameter. Any time you call hello and pass it a value, in this case Daniweb it will use that value as the value of the parameter name. [code] function hello($name) { echo 'Hello, ' . … | |
Re: You never close this if check [code=php] if (isset($_POST['submit'])) { [/code] | |
Re: A) This is not the C forum B) You're using void main! C) Stop using conio! D) Don't use getch! E) [b]Use code tags[/b] | |
Re: [code=php] $lowercaseusername = preg_replace("/[^a-z]/i", "", $lowercaseusername);[/code] You do realize that'll remove any letter, whether it's uppercase or lowercase from the string, right? So [icode]ShawnCplus123[/icode] becomes [icode]123[/icode]. Then your strtolower does nothing because there is nothing in the string except non-alpha characters. Remove the i off the end of the regular … | |
Re: You could have the click be on an <a> tag with a target="_blank" which will open a new window. But if they have javascript enabled you can bind events to it with onlclick to open a popup and return false (to prevent the other window from opening; | |
Re: [QUOTE=jen140;1007296]Hello all. I have a string that will contain the username, for the security reasons i want it to be checked it if its diferent from the specific charset. I think it could be done by looping the check 1 character from the username at a time till the end … | |
Re: Might want to take a look in your textbook or around the MySQL documentation before you start asking homework questions without showing work. | |
Re: Or you could do something along the lines of [code=javascript]this.setAttribute("onmouseover", ""); this.setAttribute("onmouseout", "");[/code] | |
Re: [quote]He's contacted the owner of the machine, and they are not willing to reinstall php for him.[/quote] Nope, there isn't. GD has been built into PHP since 4.3 which is crazy-old. If the host isn't willing to update PHP then I'd say find a new host. | |
Re: [code=php] $search = join('%', explode(' ', $search)); /* For Example: search = 'John Smith'; search = join('%', explode(' ', search)); search now = John%Smith */[/code] | |
Re: [QUOTE=bharath_neo;1005774]Hi, I am new to ajax and was taking look at code snippets. Most of the code open and send are like this: [code] var client = new XMLHttpRequest(); client.open("POST", "/log"); client.send(message); [/code] They open a connection and send the msg. Isnt connection open a costly call since the connection … | |
Re: You have to make an AJAX call to a server-side language which executes the command-line utility. Javascript can't access your server's filesystem directly. | |
Re: Well an HTML page is laid out like a tree. [code]/* HEAD | BODY \ DIV <-- SPAN's parent node \ SPAN / \ A IMG <-- SPAN's child nodes[/code] Each point in the tree is called a Node. The Node directly above another in the tree is its parent … | |
Re: There really is no "best" with IDEs. Try a few out for a week or so (enough to get to know the IDE) then try another one. At the end figure out which one you like the best and stick with it. Some popular ones: [LIST] [*]Zend Studio [*]Eclipse w/ … | |
Re: You should still make your checks for length before this but this will check for numbers like 1111111 and 999999 [code=javascript] var phone_number = "9999999"; if (!/^(\d)\1{6}$/.test(phone_number)) { alert('Good phone number'); } else { alert('Bad phone number'); }[/code] | |
Re: You have [icode]C = document.frmOne.txtThirdNumber.value *1[/icode] in your function so if that field doesn't exist and you try to perform an action on it ( *1 in this case) the function will die. | |
Re: [QUOTE=SKANK!!!!!;1003646]that link is bad. no text. anyways how do i do it?[/QUOTE] Neither of those links are bad, read them. | |
Re: Usually if you want something like that you'll have an ORM handle it for you transparently. Take a look at Doctrine ([url]http://www.doctrine-project.org/[/url]) | |
Re: A) Why is your ID field TEXT? B) [code=sql]SELECT MAX(CAST(id AS DECIMAL)) as id FROM object[/code] |
The End.