1,038 Posted Topics
Re: Don't bump your posts like that, it's annoying. Where is $_SESSION['validation'] being set and did you make sure that they are in fact equal, there are some debugging steps you can do yourself before you go to a forum, and if you have tried to debug it yourself what steps … | |
Re: What is the msort function supposed to do, frankly I can't tell. | |
Re: [QUOTE=phoenix911;876515]im not thinking at all.... all i can do is say [code] cout << num << "00"; [/code] or is there a way to multiply with <<??[/QUOTE] haha, that's thinking outside the box. Yeah, that'll work for "multiplying" by 100 but if you want to change the multiplier to 5 … | |
Re: Why are you putting your message text directly in the header and leaving the message argument blank? [url]http://php.net/mail[/url] | |
Re: If its an interview question then I'll make sure I've waited a day or so to answer you. Lying about things you don't know will not get you a job. | |
If you've gotten the error "Supplied argument is not a valid MySQL resource" you're in luck because so has everyone else that has ever used PHP... ever. The error is caused by a number of things including: Your query is wrong, you failed to connect to the database or you … | |
Re: Why oh why did I even bother writing the FAQ that answers this very issue if no one is going to read it? It never stops baffling me when I see these posts. | |
Re: Usually when you have bold/italic text there will be separate ttf files for the standard font, the bold font and the italic font so just load those as separate fonts and write text using them. | |
Re: When you draw text you have to tell the function the x and y positions. Build an array of strings by exploding on newlines then iterate over the array and modify the Y value based on the bounding box of the previous (see [url]http://us3.php.net/manual/en/ref.image.php[/url]) | |
Re: Your [icode]mysql_connect[/icode] call isn't in that code but I can tell that you don't have a mysql server setup on localhost. | |
Re: Sure, why not. (If you're looking for us to give you the code that's not going to happen) | |
Re: well php is a serverside language and extjs is Javascript (clientside) so unless you're using a framework there really is no integration between the two | |
Re: I have no idea what you're trying to do, you're already are passing those variables to the function. [code=javascript]buildString(this, data.cells[i].letter, x, y);[/code] | |
I wrote this FSM to tokenize HTML for my syntax highlighter, it works pretty well and its fast but its currently ugly as all heck and could definitely use some love so if anyone is up for taking a whack at cleaning it up or giving me some speed hints … | |
| |
Re: [QUOTE=itisnot_me;877087]is it possible to do some kind of str_replace and replace the thing with a php string. ex: [CODE]{name}[/CODE] to [CODE] <? myrow['name']; ?> [/CODE][/QUOTE] Well it sounds like you're trying to write a template parser in which case I'd recommend using a prebuilt one like Smarty or just searching … | |
Re: [code=javascript]window.location.pathname[/code] returns the string after the hostname. window.location is an object. If you're using firebug just type window.location in the console window and click on the output and you can see all of the properties you can access. | |
Re: NOW() is a MySQL function | |
Re: OK, lets get one thing clear: AJAX involves sending requests to another server and processing the response. DHTML involves manipulating the DOM. Fancy effects are [b]NOT[/b] AJAX, they are DHTML. And to achieve the same effects as Flash in HTML you really have no other choice but to use a … | |
Re: In the way you're creating the variable, no. You can't do that in any language that does object orientation (or at least you shouldn't.) It wouldn't make any sense for Father to inherit the traits of Son. If you want to have a class that uses the traits of Son … | |
Re: Well, my first question would be why disable CTRL+N? That still leaves CTRL+T (new tab in ie7) and it doesn't prevent them from just opening a new instance of IE7 the normal way. I personally despise when people alter my keyboard shortcuts and/or disable things on a site. If you're … | |
Re: Might want to try it yourself first looks like the description is pretty detailed. I'll wait while you give it a shot. | |
Re: You're missing an ending parenthesis on almost all of those conditions. You don't need to disambiguate so much. [code=php] if ( (strlen($Type) > 0) && (strlen($Brand) > 0 ) && (strlen($Size) > 0 ) && (strlen($Price) > 0 ) )[/code] can just be [code=php]if ( strlen($Type) > 0 && strlen($Brand) … | |
Re: In members.php [code=php]// this will never do anything, you're never defining $UserName if isset($UserName) {echo $UserName; } // This does not do what you think it does If (isset($_POST['UserName'])) //Connect to DB and Get the mailing list $dbcnx = mysql_connect('myhost', '', '');[/code] [code=php]// This is what it actually does If … | |
Re: Well you could do it either in PHP and Javascript or just Javascript. In PHP you would use [icode]$_SERVER['REQUEST_URI'][/icode] to get the request URI (who'd a thunk it?) and then give that to javascript to "paste" into the textbox. In purely Javascript you could use [icode]window.location.href[/icode] as the value to … | |
Re: A) You fail for using marthastewart.com as a reference site and B) This should be in the javascript section. | |
| |
Re: [QUOTE=ganmo;873853]Hello I've a question when creating a class with functions. e.g. [CODE=javascript] function constructor() { this.myFunc = function() { return "Hello World"; } } [/CODE] do I have to write the function in that way? this.funcName = function() for every function in that class? Because when I tried to write … | |
Re: No, the problem is that you aren't specifying the fields you want to insert into (this should be done even if you are doing them in order to save an internal lookup) [code=sql]INSERT INTO <table> (field1, field2) VALUES ('field1_value', 'field2_value')[/code] | |
Re: Requests (depending on the server) are usually handled in separate threads so my request to blah.php and your request to blah.php at the exact same time happen simultaneously*, in a non-blocking manner. If my request somehow fails, yours wont and vice versa. And unless something catastrophic happens and by some … | |
Re: [QUOTE=netdoer;872379]That worked. Thank you.[/QUOTE] This kind of made me angry. Do you understand why xan's fix worked? Do you understand the operator precedence that is taking place between your statements? Are you aware of necessary disambiguation to avoid these issues? Or did you just accept it as "OK, now it … | |
Re: [url]www.w3schools.com/jsref/jsref_obj_regexp.asp[/url] Regular expressions were made for this, they'll be hard to grasp at first but they'll be your friend in the end. | |
Re: [url=http://lmgtfy.com/?q=php+mail+form]No, that has never been attempted, ever in the history of PHP.[/url] | |
Re: If the account has IMAP enabled use that. [url]http://lmgtfy.com/?q=php+imap[/url] | |
Re: I'd actually have to disagree with that one. There are a number of things wrong with it as noted in the comments, there are much better around the net. | |
Re: [code=php]$day = {"Saturday", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday"}; [/code] Is this even working? That is a syntax error, that's now how you declare arrays in PHP. | |
Re: Your function call itself shouldn't have the =array(1), only the definition should. | |
Re: Firstly, sqred isn't a property, its a class. Secondly, how else would you use an image without sending a request? (There are ways to do it by base64-encoding the image but it doesn't work in IE). If you're asking how to set the background-position of the list-style-image you can't. You … | |
Re: Well I can guarantee you haven't tried what you said because you'd get a bunch of errors. A) You're not calling a function, B) you have overlapping/unclosed quotes, C) because of A you have unnecessary commas. Go look at [url]http://www.php.net[/url] because I can also guarantee you haven't looked there yet. | |
Re: As Ezzaral mentioned there is absolutely no need for you to build an entire website for this. Sites like Flickr and Picasa exist solely for this, use them, they're free. | |
Re: The files you require don't have to be in the htdocs folder, they can be anywhere on the filesystem. Only files that you want people to access should be in htdocs. So good practice is to put them in a semantically divided folder layout below htdocs, ie., [code] / /webroot … | |
Re: I think this is about the third post like this, you aren't actually querying. You have to call mysql_query, right now you just have it wrapped in parenthesis. | |
Re: [code=php]$var = $variable.$i; $$var = $row[0];[/code] I'm not entirely sure why you would want to do this instead of use an array though. | |
Re: mysql_db_query takes two[or three] parameters. The first is the database name, the second is the query, the optional third is the connection. Use php.net it's your friend. | |
Re: Well if they block cookies they're blocking sessions as well since a user's SESSIONID is stored in a cookie. | |
Re: So you just gave up on this problem and scrapped your previous work or have you just decided you'd let everyone else do it for you? I told you before you obviously have a strong enough grasp of the concepts (that is, unless you got the code you posted from … | |
Re: [QUOTE=HITMANOF44th;867517]i think this can be done by spliting and then just show the first 10 words or something like that i bet there is a easier way tho[/QUOTE] 6 year bump, new record! I think that qualifies for drinking an entire case! | |
Re: There is no way to create relationships between tables in the MyISAM engine, it all must be done in your business logic. Your tables must use InnoDB for foreign key constraints. I'll let you look up the info on InnoDB foreign key constraints. | |
Re: [QUOTE=almostbob;867059][noparse][code=pet peeve][/noparse] sql time or php date are 10 decimal digits representing the number of seconds from 1/1/1970 (doh,, 1970 or 1980? ) human readable representations of date() or time() are unneccessary and waste processor time the computer uses digits better than text representations thus time() + 300 = five … |
The End.