1,038 Posted Topics

Member Avatar for macfi

Well if you want to implode the values and store it in the cookie then you'd explode it to retrieve it as an array. [code=php] $array = array('orange', 'green', 'blue'); $string = implode(',', $array); // 'orange,green,blue' $second_array = explode(',', $string); // array('orange', 'green', 'blue'); [/code]

Member Avatar for macfi
0
4K
Member Avatar for kssi89

There might be something in includes/footer.php that's doing it. As a side note a meta refresh tag goes in the head section, not the body. Post the entirety of the code so I can at least run it through phplint to see if there are syntax errors :)

Member Avatar for samarudge
0
102
Member Avatar for Rustynails

Is it a requirement that you code all of the AJAX library by hand. If not you might want to take a look at [url=http://www.jquery.com]jQuery[/url]. Otherwise, what is the error you're getting.

Member Avatar for ShawnCplus
0
107
Member Avatar for veledrom
Member Avatar for veledrom
0
41
Member Avatar for mansterdom
Member Avatar for essential
0
103
Member Avatar for weblover

There's no such thing as a conditional insert, it just appends to the end of the table. Do your conditional in PHP.

Member Avatar for Designer_101
0
346
Member Avatar for ahmadjhoney

That's just about as vague a question one could ask. What about mail servers?

Member Avatar for Designer_101
0
84
Member Avatar for KJATL

Well, firstly, for all that is good in the world, please, please stop using @. Secondly, you already have pid, why assign it again?

Member Avatar for meleo
0
117
Member Avatar for 7arouf

There aren't any drag&drop IDEs for PHP that I know of since PHP itself never touches the front end. [url=http://www.zend.com/en/products/studio/]Zend Studio[/url] is probably one of the best out there (You can download a free version though there is a paid version), there's also the [url=www.eclipse.org/pdt/]PDT project[/url] which is a extension …

Member Avatar for BzzBee
0
314
Member Avatar for PsyberMind

Firstly, your loop should be a while, not a do-while. (A do-while will always run at least once even if your condition fails which you don't want). Secondly, would you post your code that's handling the POST. All we see now is your form.

Member Avatar for PsyberMind
0
257
Member Avatar for Vai

Firstly [code=php]$query = "select * from `music` WHERE `music`.`catid` = '" . $catid . "'";[/code] can be simplified to [code=php]$query = "SELECT * FROM `music` WHERE `catid` = '$catid'";[/code] To order you would have [code=php]$query = "SELECT * FROM `music` WHERE `catid` = '$catid' ORDER BY `artist`";[/code] Typically pagination is …

Member Avatar for somedude3488
0
109
Member Avatar for szita1

It's as if what doesn't handle it at all. define doesn't return anything accept true/false whether it successfully declared the constant or not. What exactly are you trying to do?

Member Avatar for ShawnCplus
0
87
Member Avatar for will910
Member Avatar for whitestream6

You don't need a switch statement [code=php] <?php $day = intval($_GET['day']); if($day >0 && $day <8) { include('day' . $day . '.php'); } else { echo 'Invalid page'; } ?> [/code]

Member Avatar for ShawnCplus
0
123
Member Avatar for silh

ORMs exist to make the life of a developer easier, so you aren't manually dealing with physical resultsets from mysql_fetch_array all the time. Also, having an ORM allows you to attach functions to certain objects ie., you want to be able to perform drawCircle on every Circle saved to the …

Member Avatar for ShawnCplus
0
83
Member Avatar for greg022549

Yeah, try that giant SITE SEARCH on the right that takes about 30% of the top of the site.

Member Avatar for Dani
0
59
Member Avatar for kssi89
Member Avatar for Acute

There is no way to force a user to automatically open a file. If there was it would be a huge security risk.

Member Avatar for ShawnCplus
0
51
Member Avatar for cwarn23

Well, looking through a few of them they could use some improvement, most notably the hex to rgb function, hexdec is your friend. [code=php] function torgb($string) { $string = str_replace("#","",$string); $r = substr($string, 0, 2); $g = substr($string, 2, 2); $b = substr($string, 4, 2); return array(hexdec($r), hexdec($g), hexdec($b)); } …

Member Avatar for cwarn23
0
80
Member Avatar for veledrom

well cURL is actually a program in and of itself which can send http requests along with a large number of different protocols. Usually an "HttpRequest" is a Javascript object used to make AJAX calls.

Member Avatar for rm_daniweb
0
64
Member Avatar for veledrom
Member Avatar for ithelp
0
48
Member Avatar for thompson007
Member Avatar for ShawnCplus
0
66
Member Avatar for danielpataki

Why is it you can't use AUTOINC for your primary key? I don't really get your explanation of why you can't.

Member Avatar for digital-ether
0
110
Member Avatar for samarudge

Exactly, that's why most people here probably wont and shouldn't help you with this.

Member Avatar for samarudge
0
178
Member Avatar for claritydigital

It's called AJAX, once you know the term you'll have more articles then you'll know what to do with. Have fun.

Member Avatar for peter_budo
0
226
Member Avatar for azStudent

Do you understand what these lines do? [code=c++]*(boardSkin +(row * columns) + column)[/code] You're setting a memory address to a value, that above line is the same thing as saying [icode]boardSkin[((rows*columns)+column)][/icode]. (I think, its been a LONG, LONG time since I've used [icode]*(array + offset)[/icode] notation, probably because it unnecessarily …

Member Avatar for azStudent
0
141
Member Avatar for claritydigital

[code=php] $keywords = array('value2','value1','value'); $replace = '<a href="webpage.php?view&id=\1">\1</a>'; $search = '/('.join('|',$keywords).')/'; preg_replace($search, $replace, $source); [/code] I've reversed the keywords because the grouping will be non-greedy so if you place 'value' first it will never find value1 or value2

Member Avatar for claritydigital
0
319
Member Avatar for venkitce

Actually, the php.net page does have an installation guide. [url]http://us3.php.net/manual/en/svn.installation.php[/url]

Member Avatar for ShawnCplus
0
47
Member Avatar for Leandro-AL
Member Avatar for brakeb

replace test.html with the name of your file [code=bash] sed -r "s/<Url>([^<]+)<\/Url>/\nURL: \1\n/g" test.html | grep ^URL: | sed -r "s/^URL: //g" [/code] This will give you a newline delimited list of the URLs Also, in the future you can use the following command to clean the XML (requires Tidy) …

Member Avatar for brakeb
0
383
Member Avatar for Talguy

there is no such thing as a double in hex. Use [icode]hexdec[/icode] to convert to an integer then explicitly cast the return to a double. [code=php] $someHEx = "0x01A"; $someDouble = (double)hexdec($someHex); [/code]

Member Avatar for ArkM
0
3K
Member Avatar for Designer_101

Also, you don't need a ; at the end of a while and mysql_fetch_assoc is the same as mysql_fetch_array($resultset, MYSQL_ASSOC)

Member Avatar for ShawnCplus
0
79
Member Avatar for winrawr

C++ does not have anonymous functions. However, C++0x standard does using the following syntax (using a std::for_each as an example) [code=c++] std::map<int, int> someMap; // ... ... std::for_each(someMap.begin(), someMap.end(), []( std::pair<int, int> map_entry ) { // ... lambda body }); [/code] The initial [] leading the arguments defined what should …

Member Avatar for winrawr
0
90
Member Avatar for EdTheUniqueGeek

[url]http://php.net[/url] is an amazing resource if you're using PHP its a good idea to get very familiar with it.

Member Avatar for EdTheUniqueGeek
0
113
Member Avatar for nmakkena

Make sure you don't have IIS installed or running or that any other program you have running is starting a web server.

Member Avatar for ShawnCplus
0
101
Member Avatar for valsaraj

Depends on your needs. If you only need GET parameters then file_get_contents should be fine. cURL on the other hand allows for much more customization in headers sent.

Member Avatar for mschroeder
0
100
Member Avatar for swearword

You'd actually want to use Apache itself to do the load balancing, not PHP. Using things like [url=http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html]mod_proxy_balancer[/url] This is assuming you're using Apache

Member Avatar for justinmichaels
0
1K
Member Avatar for websurfer
Member Avatar for ShawnCplus
0
65
Member Avatar for ahmksssv

[QUOTE=ahmksssv;818927]Hi frnds... I need to integrate php variable with vedio scripting file..... i fetch my vedio file path from database...here i need to replace the file=[B]videos/movieimgae.swf[/B] ....with $vedio.. [/QUOTE] [CODE=php] <?php $video="vedios/aaa.php"; ?> <script type="text/javascript"> var s1 = new SWFObject('player.swf','player','400','300','9'); s1.addParam('allowfullscreen','true'); s1.addParam('allowscriptaccess','always'); s1.addParam('flashvars','file=[B]<?php echo $video ?>[/B]'); s1.write('preview'); </script>[/CODE]

Member Avatar for ShawnCplus
0
305
Member Avatar for OmniX
Member Avatar for Shanti C
Member Avatar for emiola

It might not be the error that's causing your problem but remove the semicolon after the second if statement

Member Avatar for somedude3488
0
151
Member Avatar for zerugaze

[icode]^(.+?):(.+?)$[/icode] That's pretty much it. That's a pretty simple regex, you might want to study them for yourself [url]http://www.regular-expressions.info/[/url], it's a pretty decent resource.

Member Avatar for jedi_ralf
0
146
Member Avatar for PinoyDev

Firstly, this should be in the HTML forum, secondly [code=html]<img height="32" width="32" src="blah.jpg />[/code] ... ...

Member Avatar for PinoyDev
0
94
Member Avatar for cjmalloy

1) You're missing an ending ) on the first line of your JS 2) "Gray" isn't a safe CSS color, use #ccc

Member Avatar for ShawnCplus
0
86
Member Avatar for jedi_ralf

There's no need to use a regular expression for that [code=php] $string = 'Name: Bob, Age: 20, Details: Likes chocolate'; $properties = explode(",", $string); $result = array(); foreach($properties as $property) { $split = explode(":", $property); $result[$split[0]] = $split[1]; } print_r($result); /* Array ( [Name] => ' Bob', [Age] => ' …

Member Avatar for jedi_ralf
0
179
Member Avatar for snadboy6371

It's just me but I'm pretty sure you would contact Paypal about that sort of thing.

Member Avatar for ShawnCplus
0
60
Member Avatar for l00pylou

A) Don't iterate through POST variables if you're doing any sort of key/value assignment. I (as a user) can put anything I want into POST and given that you're [icode]eval[/icode]ing the code you immediately just opened yourself up to every attack under the sun B) Why the heck are you …

Member Avatar for l00pylou
0
108
Member Avatar for Dsiembab

The problem with that almostbob is that if you have a switch-case with 1000 lines of code you're a horrible programmer to which the "goto" is only the stamp on your forehead to label(no pun intended) you as such.

Member Avatar for death_oclock
0
209
Member Avatar for mrcniceguy
Member Avatar for ShawnCplus
0
92

The End.