1,038 Posted Topics

Member Avatar for peck3277

[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 …

Member Avatar for ShawnCplus
0
123
Member Avatar for Eriku
Member Avatar for DemonGal711

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]

Member Avatar for DemonGal711
0
87
Member Avatar for shishtawitch

[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 …

Member Avatar for shishtawitch
0
109
Member Avatar for niche1

[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 …

Member Avatar for niche1
0
115
Member Avatar for enzo420

[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] …

Member Avatar for ShawnCplus
0
223
Member Avatar for Jayakrishnan_gk
Member Avatar for whiteyoh

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.

Member Avatar for whiteyoh
0
101
Member Avatar for realchamp

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 …

Member Avatar for realchamp
0
224
Member Avatar for leviathan185
Member Avatar for slaywee

[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, …

Member Avatar for Phil++
-1
78
Member Avatar for severman

This will find the php interpreter for you and use it, don't directly link to it. [code=sh] #!/usr/bin/env php [/code]

Member Avatar for codejoust
0
111
Member Avatar for aejr

[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.

Member Avatar for ShawnCplus
0
89
Member Avatar for veledrom

[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 …

Member Avatar for ShawnCplus
0
120
Member Avatar for alexjbriggs

[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 …

Member Avatar for network18
0
96
Member Avatar for pandeyprashant

[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.

Member Avatar for beeerlover
0
194
Member Avatar for glycerine
Member Avatar for gagan22
Member Avatar for claudiu_is

It's the same for pretty much every browser. [code=javascript]document.getElementById('someidhere');[/code]

Member Avatar for claudiu_is
0
100
Member Avatar for Ghodmode

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 :)

Member Avatar for Troy III
0
1K
Member Avatar for InsaneVr6

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]

Member Avatar for InsaneVr6
0
112
Member Avatar for swthurmond
Member Avatar for swthurmond
-1
872
Member Avatar for punithapary

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 :)

Member Avatar for network18
0
63
Member Avatar for C++ Beginner

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]

Member Avatar for K0ns3rv
-1
3K
Member Avatar for shaifymehtadnn

[QUOTE=shaifymehtadnn;1009525]1. Develop sigma and pie bonding and anti bonding molecular orbitals of 2s and 2p[/QUOTE] 2. ??? 3. Profit

Member Avatar for ShawnCplus
0
32
Member Avatar for hajjo

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.

Member Avatar for ShawnCplus
0
52
Member Avatar for specialk423

[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 = …

Member Avatar for baki100
0
169
Member Avatar for neithan

[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 …

Member Avatar for neithan
0
385
Member Avatar for Taavi

Line 49 [code=php] if ($_POST["$submit"]) // should be if (isset($_POST['submit']))[/code]

Member Avatar for Taavi
-1
148
Member Avatar for michael123
Member Avatar for network18
0
120
Member Avatar for Altairzq

[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] …

Member Avatar for Altairzq
-1
123
Member Avatar for Reliable

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, ' . …

Member Avatar for Reliable
0
71
Member Avatar for enzo420
Member Avatar for enzo420
0
159
Member Avatar for singhyash2008

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]

Member Avatar for ShawnCplus
0
43
Member Avatar for SKANK!!!!!

[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 …

Member Avatar for SKANK!!!!!
0
135
Member Avatar for valonesal

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;

Member Avatar for valonesal
0
135
Member Avatar for jen140

[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 …

Member Avatar for EvolutionFallen
0
99
Member Avatar for madhav089

Might want to take a look in your textbook or around the MySQL documentation before you start asking homework questions without showing work.

Member Avatar for madhav089
0
169
Member Avatar for sevensamurai

Or you could do something along the lines of [code=javascript]this.setAttribute("onmouseover", ""); this.setAttribute("onmouseout", "");[/code]

Member Avatar for Troy III
0
1K
Member Avatar for headedtomexico

[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.

Member Avatar for headedtomexico
0
166
Member Avatar for ultras1

[code=php] $search = join('%', explode(' ', $search)); /* For Example: search = 'John Smith'; search = join('%', explode(' ', search)); search now = John%Smith */[/code]

Member Avatar for ultras1
0
100
Member Avatar for bharath_neo

[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 …

Member Avatar for ShawnCplus
0
58
Member Avatar for nazarahmat

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.

Member Avatar for ShawnCplus
0
51
Member Avatar for zorro-az

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 …

Member Avatar for Airshow
0
140
Member Avatar for virtualmisc

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/ …

Member Avatar for redhouse
-1
206
Member Avatar for Xessa

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]

Member Avatar for ShawnCplus
0
82
Member Avatar for mark2326l

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.

Member Avatar for mark2326l
-1
79
Member Avatar for SKANK!!!!!

[QUOTE=SKANK!!!!!;1003646]that link is bad. no text. anyways how do i do it?[/QUOTE] Neither of those links are bad, read them.

Member Avatar for ShawnCplus
0
120
Member Avatar for ENetArch

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])

Member Avatar for somedude3488
-1
97
Member Avatar for severman

A) Why is your ID field TEXT? B) [code=sql]SELECT MAX(CAST(id AS DECIMAL)) as id FROM object[/code]

Member Avatar for severman
0
114

The End.