1,038 Posted Topics

Member Avatar for cali_dotcom
Member Avatar for almostbob
0
132
Member Avatar for samarudge

The AJAX response just has to send like a JSON response then you parse the response and set them in your success callback.

Member Avatar for Airshow
0
130
Member Avatar for telcontar

You are correct, method overloading is and will never be in the language. However, there are ways to get around this. The [`func_get_args`](http://php.net/func_get_args) function can be used to retrieve an array of all arguments passed to the function. Also, as you mentioned, PHP is loosely typed but can be "Type …

Member Avatar for ShawnCplus
0
99
Member Avatar for arajapandi
Member Avatar for arajapandi
0
154
Member Avatar for dholt

It's not PHP, it's CSS. It's just a background-image applied to the textarea

Member Avatar for dholt
0
71
Member Avatar for Jintu

You might want to read your book or the tutorial or whatever you're using to learn PHP again because there are WAY too many things wrong with that script.

Member Avatar for almostbob
0
82
Member Avatar for Barefootsanders

As was noted before, they are superglobals, you can use them anywhere. However, I suggest that you don't. If you're going to go the OOP route then I would suggest abstracting dealing with GET/POST/COOKIE/SESSION variables to a class that deals with them specifically called Request or something along those lines …

Member Avatar for iThaos
0
1K
Member Avatar for 064bct512
Member Avatar for Lolalola
Member Avatar for cronika

A) Use code tags B) It's always going to echo 1 C) You're not retrieving data from the request (in this case [icode]$_POST[/icode] D) Go read the PHP manual [url]http://php.net[/url] and [url]w3schools.com[/url]

Member Avatar for mrcniceguy
0
89
Member Avatar for Learner468

You probably would never make much if any money creating a forum with PHPBB and its ilk out there.

Member Avatar for Thyrosis
0
81
Member Avatar for OwenRoberts

What's the point of using cNum1 and cNum2, you already have the variables first and second to use. You can do the same thing for both functions [code=c++] ComplexNum ComplexCalc::subComplex( ComplexNum &first, ComplexNum &second ) { ComplexNum* result = new ComplexNum(); result->setValues(first.real - second.real, first.img - second.img); return *result; }[/code] …

Member Avatar for ShawnCplus
0
110
Member Avatar for saturngod

Make sure you have indices on the column you're searching, that's probably the easiest way to speed things up but it's a size vs. speed trade-off.

Member Avatar for ShawnCplus
0
96
Member Avatar for dwdata

[code=php] // if you're using XHTML str_replace('<br />', "\n", $string); // if you're using HTML str_replace('<br>', "\n", $string);[/code]

Member Avatar for dwdata
0
111
Member Avatar for edub9
Member Avatar for aran87

It's actually much easier to make bar graphs with CSS than it is with PHP. Here's an quick tutorial [url]http://www.khmerang.com/index.php?p=118[/url]

Member Avatar for make.rohit
0
731
Member Avatar for K?!

Or you could just write the method for (in your example) Person to change the name themselves. ie.,[icode]person->setName()[/icode] There is absolutely no need for a "superclass". Their true name is "god class" and it's referred to as an anti-pattern. They are the bane of good OOP principles. Don't make them. …

Member Avatar for BestJewSinceJC
0
138
Member Avatar for beginninphp

Well if you're trying to extract the username you can just do this. [code=php] $url = 'http://www.myspace.com/username'; $urlparts = explode('/', $url); $username = end($urlparts);[/code]

Member Avatar for beginninphp
0
109
Member Avatar for 83apple
Member Avatar for xyzt

You might want to use grep for that, use can use it inside vi/vim with the ! command :!grep funcname <dir>

Member Avatar for jqbsx
1
68
Member Avatar for Zurompeta

[icode]"/^(\d{1,7})\.(\d{1,2})$/"[/icode] If you're testing a string you want to set the anchors "^" (beginning of string) and "$" (end of string) so you know that there is nothing else in between. [icode]"/(\d{1,7})\.(\d{1,2})/"[/icode] will match [icode]12345678.12[/icode] because it is matching, take a look at this. [code] without ^$ __________ 1|2345678.12| ---------- …

Member Avatar for Zurompeta
0
76
Member Avatar for samm22

Actually, it is a normal vector declaration. std::vectors are a templated class. To instantiate a vector you pass a type to the template. Might want to read up on templates. In this case the code looks to be function prototypes. The first function returns a vector of int's and takes …

Member Avatar for samm22
0
87
Member Avatar for EvilOrange

[code=php] $somearray = array( array('a' => 'Hello'), array('b' => 'World') ); echo $somearray[0]['a'] . ' ' . $somearray[1]['b']; // Hello World [/code]

Member Avatar for ShawnCplus
0
632
Member Avatar for davebrwn1
Member Avatar for Venom Rush

If I had to pick four of the best I'd say Zend, Symfony, CodeIgniter and Cake. Zend is a pretty in-depth and heavy framework. Symfony is lightweight but also quite powerful with a huge community, amazing documentation (a book is published for every version). Cake is even lighter but also …

Member Avatar for ShawnCplus
0
144
Member Avatar for tulipputih

[QUOTE=tulipputih;891025]Hello everyone, Does anyone knows any query expansion techniques that can be implemented using php other than hierarchical technique. i.e: facet , analysis, thesaurus. By implementing query expansion, the users are not only presented with the keyword they inserted, but some related words to the keyword. Thank you[/QUOTE] If you're …

Member Avatar for tulipputih
0
122
Member Avatar for new at this

You literally just posted the equivalent of a check-engine light. You have to actually explain your problem preferably with code samples

Member Avatar for tom curren
0
261
Member Avatar for atrophiedsoul
Member Avatar for atrophiedsoul
0
108
Member Avatar for whizzell
Member Avatar for JerieLsky

Firstly, toss an echo at the top of your php file to make sure you're even touching that file. Based on your HTML file you may not, [icode]type = "submit"[/icode] those spaces [b]may[/b] or may not be killing the submit button.

Member Avatar for ShawnCplus
0
117
Member Avatar for jbennet

Use <pre> or <code> tags on your output, that's pretty much it. You can do this when you store it but I would highly recommend you do it on output instead.

Member Avatar for ShawnCplus
0
75
Member Avatar for alexgv14

If all you want to do is grab the entire contents of a file and spit it into a textbox then yes, file_get_contents is probably your best bet. If you need to process it then file() or fopen/fread might be the way to go.

Member Avatar for emarshah
0
94
Member Avatar for absk

[QUOTE=Menster;910693]Now, now, I can't do your entire assignment for you :P If you get stuck on anything with php the resource to use is [URL="http://www.php.net"]http://www.php.net[/URL] or just Google "php" followed by your question. Good luck, I hope you get 10/10[/QUOTE] A) You already did his entire assignment for him. B) …

Member Avatar for ShawnCplus
0
155
Member Avatar for chrishtones

Yeah, did you try perhaps googling it and looking at maybe any of the first 1000 results?

Member Avatar for csurfer
0
109
Member Avatar for AnkitKumar
Re: php

[code=php] echo "document.write("Hello Dolly");\n";[/code] Use single quotes [code=php] echo "document.write('Hello Dolly');\n";[/code]

Member Avatar for ShawnCplus
0
78
Member Avatar for Barefootsanders

Post an example string that is to be split, guessing based on your description will produce bad results

Member Avatar for somedude3488
0
135
Member Avatar for cinemaduro
Member Avatar for rockyman12

A) AJAX and DHTML aren't languages, they're methodologies. B) All of those languages can be used for the web C) Use Wikipedia to look up SOAP, it's an acronym hence the capital letters

Member Avatar for diafol
0
152
Member Avatar for coleguitajuan

What the heck are you guys doing? He obviously posted a homework question and he never showed any of his own code in this entire thread, all he said is "thanks for the code" and you just handed him answers.

Member Avatar for Menster
0
110
Member Avatar for elamigosam
Member Avatar for elamigosam
0
159
Member Avatar for o12357
Member Avatar for kingben

Have you tried the AUTOINCREMENT property on the field in the database? Go take a look at the MySQL manual

Member Avatar for kingben
0
99
Member Avatar for plgriffith

Compare the php.ini's on your Mac and on your Ubuntu machine to see what the difference are. From your unintentionally vague description it's hard to tell what's going on exactly so the ini files are the best place to look.

Member Avatar for digital-ether
0
122
Member Avatar for OmniX

If you want everything accept for letters and numbers you can use [code=php] $pattern = '/[^a-z0-9]/i';[/code] If you are specific about \/:"?<*>| then it's this [code=php] $pattern = '#[\/:"\?<\*>|]#';[/code]

Member Avatar for ShawnCplus
0
167
Member Avatar for punithapary
Member Avatar for peter_budo
0
107
Member Avatar for gretty

If you're on Windows and you're not willing to move to Linux then you can get WAMP or XAMPP. And I'll tell you right now: lose Netbeans. If you have to use such a bloated IDE use Zend IDE or Eclipse. Netbeans has no place touching PHP in my opinion.

Member Avatar for diafol
0
211
Member Avatar for gretty

That's not an error, it's a warning. And C++ std::string::length() returns an unsigned int. You're using an int for your counter in your loop so the comparison [icode]j < item.length()[/icode] is comparing a signed int (default int) to an unsigned int

Member Avatar for u8sand
0
306
Member Avatar for rupeshpradhan

PHP is server-side. It never interacts with the client directly, there is no way it can open any dialog, that's up to Javascript and HTML.

Member Avatar for somedude3488
0
117
Member Avatar for thecodingbee
Member Avatar for rrlogu

Read the documentation for mysql_connect again. It's [icode]mysql_connect('host', 'user', 'password')[/icode]. You have mysql_connect('host', 'user@host', 'password')

Member Avatar for rrlogu
0
105

The End.