1,038 Posted Topics
Re: [QUOTE=lonestar23;1124766]How would I go about passing a user agent when requesting an external xml feed from a 3rd party web service. Need to pass the user agent or else the feed produces an error. I am using DOM <?php $request1 = 'http://www.abc123.com/webservice/this.xml'; $requestIT1 = $request1; $response1 = new DOMDocument(); $response1->load($requestIT1); … | |
Re: The problem is that HTML/XHTML is really a horrible and bloated markup language. Most of the larger websites (Google being the main one) that forgo valid HTML do so because the browser will still render it just the same but they save on bandwidth (referring to omitting end tags). Go … ![]() | |
Re: [url]http://www.daniweb.com/forums/announcement8-2.html[/url] | |
Re: If you're thinking of implementing your own XML parser in PHP you might want to forget that idea. PHP already has a built-in XML parser in SimpleXML and the XMLParser library which are language functions written in C. Writing you own parser is possible but will be orders of magnitude … | |
Re: [code=html]<select name=formdata[Program_val] default value='Null' >Program</option>[/code] Should be this. [code=html]<select name='formdata[Program_val]'> <option value='Null' selected='selected'>Program</option>[/code] | |
Re: Read the FAQ, you have a syntax error in your query. | |
Re: You have a syntax error, you're missing the beginning parenthesis before the field list. Which this line will tell you. [code]if (!$result) { echo("ERROR: " . mysql_error() . "\n$SQL\n"); }[/code] | |
![]() | Re: [quote]the port itself is not important, I tried many and the same errors.[/quote] The port itself [b]is[/b] important. The receiving computer must be listening on the port you're trying to send. |
Could the Homework Help announcement in the C++ forum also be added to the PHP forum. I doubt it'll stem the flow of begging or spoonfeeding - which is becoming a growing problem - but it wouldn't hurt. | |
Re: It's never impossible to crack hashing algorithms. Just unlikely due to the massive increase in time needed version encryption. As to where to find it take a look at the SHA1 wikipedia entry and read the papers cited. [url]http://en.wikipedia.org/wiki/SHA1#SHA-1[/url] Many of these exploits are still in their infancy and it's … | |
Re: You want to validate PHP or validate the page that is generated? You can validate PHP by running the script, if it runs it's valid :) If you want to validate the page generated then use [url]http://validator.w3.org/[/url] | |
Re: Well wrapping a td in a div is sort of like mixing sugar and salt. Table cells are used because their alignment and size will be uniform to the surrounding cells, divs are used for general content positioning, which may or may not be uniform. | |
Re: [QUOTE=s32ialx;1107256]While I am asking for help how would i go about implementing my li.js switch to something like this...[/quote] You'd want to take advantage of what's called a fallthrough. [CODE=javascript]switch(this.id){ case "home": case "about": case "shop": case "friend": case "vids": case "music": case "pics": case "ranks": case "stuff": case "read": … | |
Re: Why are you using [icode]file[/icode], just use [icode]file_get_contents[/icode] which doesn't split by newline | |
Re: You're not assigning the function to the onclick the way you're doing it. You're assigning the RETURN of the function to the onclick. You want to return a function from your function so just change your changeDay function to this and use the blah.onclick = changeDay(newDay); [code=javascript] function changeDay(newDay) { … | |
Re: [url=http://php.net/autoload]php.net/autoload[/url] | |
Re: [QUOTE=almostbob;1106188]@ is not a common character, it was chosen as the email delimter because it isnt common I am not familiar with wordpress's setup so I'm not sure how many @ there will be or how close to physical line 430 the one with an error will be, or what … | |
Re: A) Use actual links and not butchered URLs B) Post your code, don't use imageshack with a screenshot of your code. | |
Re: [QUOTE=alexa868;1104550]Hey guys, so I want to write a program that calculates the sinus, cosinus and tangent without using math library... Any ideas?[/QUOTE] SOHCAHTOA | |
Re: The program fails to build most likely because you have no main() function [code=c++] #include <iostream> using namespace std; int main (int argc, char** argv) { // your program here return 0; // successful execution }[/code] | |
Re: My guess is that you're using it as a GET parameter and it's being encoded to it's respective URL entity | |
Re: *sigh* Read the FAQ at the top of the PHP forum | |
Re: Find the function that is getting attached to the <a> tags' onclick to actually do the magic and return false at the end of it. That prevent the link from jumping. | |
Re: Go over to the PHP forum and read the FAQ. | |
Re: The super keyword, to my understanding would be used with this syntax in php [code=php] parent::someFunc(); [/code] | |
Re: [icode]php <filename>[/icode] Example: [icode]php somefile.php[/icode] Did you even try to find the answer yourself? | |
Re: Well you want to JOIN but you're not JOINing (side note, don't use * be explicit about the fields you want. [code=sql] SELECT u.userid, bd.bdate, bd.id FROM bookingdata bd JOIN users u ON bd.userid = u.userid[/code] ![]() | |
Re: [QUOTE=cableguy414;1100339]I'm working on a contact form. I have the form being checked by a PHP script once it's submitted. If the script finds an error, it will load a new page with the error message and then redirect back to the form after 10 seconds so the user can correct … | |
![]() | Re: Where is [icode]script_url[/icode] defined? Global variables = bad. And do some debugging. replace [icode]include[/icode] with [icode]echo[/icode] to see what the actual value being passed to include is. ![]() |
Re: A) Fix your identation B) You don't need addslashes on the password, you're MD5ing it, there will never be slashes C) Where do you place what on your page? | |
Re: Yeah, Javascript and PHP don't work like that. PHP is run [B]before[/B] the page gets to the user. Javascript is run [B]after[/B] it gets to the user so those inserts are happening every single time someone visits the page, not based on that confirm popup. [quote]so don't have the time … | |
Re: .db files are usually associated with SQLite, so go download it and use it to open it. In the future don't post massive blocks of text like that. It's not fun having to scroll for an hour. | |
Re: [QUOTE=vaultdweller123;1095034]hey ardav! you always contradict at my every post! grrr....! :@[/QUOTE] Well, ardav is correct so he is completely within his right to make a post :) ![]() | |
Re: [QUOTE=girl.java;1095200]how are you all I want to write a program where when i enter the number For example 10 must give the numbers of Singles 1, 3, 5, 7 and 9 please its important[/QUOTE] What do you have so far? We're not going to help you if you don't show … | |
Re: [code=javascript] $(document).ready(function() { $('#someform').submit(function () { var i, validate_fields = ['name', 'email', 'address'], // fields to validate invalid_fields = []; // store of empty fields for (i in validate_fields) { // check if field is empty if ($('#' + validate_fields[i]).val().replace(/(^\s+|\s+$)/g, '') === '') { invalid_fields.push(validate_fields[i]); } } if (invalid_fields.length) { … | |
Re: [QUOTE=ardav;1096119]Sorry VD - I'm no great shakes, but I notice that you are making an amazing contribution at the moment with so many replies - well done! It's just that I've been there and done it with some of these questions - I've had the number of records != max … | |
Re: Is your select inside the <form> tag, and do a [icode]var_dump($_POST);[/icode] to see the values of everything passed from the form | |
Re: Well as an example if you're using a database you can add a column to the table you're dealing with called "locked" that is set to the editing user's ID when they open the form, then set back to 0 when that same person saves it. If someone with a … ![]() | |
Re: Get firebug and use Firefox. (getfirebug.com and getfirefox.com) read through the Firebug site on how to use it. | |
Re: I believe you're referring to the controls that look sort of like [code=plain] .---. .---. | + | | + | '---' '---' .---..---. .---. | + || 2 | | 1 | '---''---' . '---' .---. .---. | - | | - | '---' '---' [/code] You could certainly … | |
Re: The thing you are describing is not a framework, it's an ORM. Google around for simple PHP ORMs and you'll find what you are looking for. If you look for framework it's just going to be, exactly like you said, a bunch of stuff you don't need. My best recommendation … | |
Re: Why are you using such an old version of MySQL with the new version of PHP? And does that file actually exist in that directory? | |
Re: If you want to prevent the user from modifying it on the front end you could do as you suggested: Have the timer on the front end (Javascript) but also validate the start and end times on the server. Using both methods would be the way to go. Any time … | |
Re: It can already act like an array [b]Dot Operator[/b] [code=javascript] var someObject = { someProp : 9, someFunc : function () { return this.someProp; } }; alert(someObject.someFunc()); // 9 [/code] [b]Array Accessor[/b] [code=javascript] var someObject = { someProp : 9, someFunc : function () { return this['someProp']; } }; alert(someObject.someFunc()); … | |
Re: [QUOTE=vaultdweller123;1094160]u forget to show the code... well based in your problem i think its because you didn't escaped the singe quotes (') in the sentece. coz. single qoutes has meaning in PHP so they should be escaped. i think this may be your code [CODE]<?php echo "10 Facts about World's … | |
Re: Might want to actually show your code, explaining it helps but seeing your code is much more helpful. And the [icode]yield[/icode] operator is used for generator-iterators not AJAX. | |
Re: Abstract classes are nice in that they aren't full implementations of objects but prototypes of them. So take this bad example.... for example: You have want to have Objects and you want all Objects to have an Identify method but each Object will do something different. [code=php]abstract class Object { … | |
Re: It's called passing by reference: [url]http://us2.php.net/manual/en/language.references.pass.php[/url] | |
Re: [code=php] }else{ print($con->error); }[/code] | |
The End.