428 Posted Topics

Member Avatar for baudday

I am not sure what the point of $x is in that function besides being a counter. But this should solve your recursion issue. [code] <?php //Path to starting point $path = '/your/path/goes/here'; //Create a recursive directory iterator $iterator = new RecursiveDirectoryIterator($path); echo "<ul>\n"; $x=0; //Foreach iteration do something. foreach …

Member Avatar for baudday
0
177
Member Avatar for Narayan15

[code=javascript] <script type="text/javascript"> document.write('Clock'); </script> [/code] But, seriously, how about you do some searching, try to put something together and when you have problems you post what you have so far and we provide you with some assistance.

Member Avatar for fuego2008
0
392
Member Avatar for nostalgia149

Just be very careful when working with values passed in the GET & POST arrays . Its extremely easy for them to be modified by the user and you have to be fully aware of this. Probably the most common thing i've seen is the usage of $_GET and $_POST …

Member Avatar for nostalgia149
0
151
Member Avatar for leviathan185

The problem you're having is $_FILES['userfile']['tmp_name'] is an actual filename. your destination is a directory without a file name. its trying to create a file named "uploads", which is a valid filename on a linux system, in your dw folder. Try actually giving the file a filename in the destination …

Member Avatar for leviathan185
0
176
Member Avatar for codemaker

check out [URL="http://www.mysqlperformanceblog.com/"]http://www.mysqlperformanceblog.com/[/URL] you will have to do some looking and some reading but provide a lot of really good information for performance tuning and/or what you can expect from both engines.

Member Avatar for dsherwin
0
124
Member Avatar for Facte

Why even bother with all of the sanitizing when the php5 DOM does this for you. Check out the following code...it is based on what you originally posted and creates the same XML. Its not a perfect representation of what your script does but i wanted to make sure it …

Member Avatar for mschroeder
0
234
Member Avatar for jaykom

I think I have achieved what you were describing. There is some consolidation that could occur as there is minor repetitive code. [code=html] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function() { function toggleReq() …

Member Avatar for mschroeder
0
118
Member Avatar for jugg3r

[QUOTE=Atli;887480] P.S. You should ALWAYS store dates and times in the standard date/time format (YYYY-MM-DD HH:SS), and store them in date type fields, to avoid problems just like this one.[/QUOTE] This is such a common topic that can be debated in so many different ways. The fact is BOTH the …

Member Avatar for diafol
0
2K
Member Avatar for hi.meral

They are two different technologies: php is server-side and will be executed on the server with the results being displayed to the user. jquery is client-side and will be executed in the user's browser. the only code it can modify is the html code that is delivered by the server. …

Member Avatar for hi.meral
0
118
Member Avatar for koolhq
Member Avatar for koolhq
0
152
Member Avatar for ramanand

Actually in a purely PHP file, the closing tag ?> should be excluded. It is necessary when you are jumping in an out of php control structures that are mixed with html or some other kind of output.

Member Avatar for ramanand
0
162
Member Avatar for totalnoob

Then the problem is in the code prior to: [code=php] echo '<tr>'. '<td>'.$row['title'].'</td>'.'<td>'.$row['category'].'</td>'.'<td>'.$row['year'].'</td>'. '<td>'.'<font size="2"><a href="edit.php?autoid="'.$row['autoid'].'"> edit</a></font>'.'</td>'.'<td>'.'<font size="2"><a href="delete.php?autoid="'.$row['autoid'].'" >delete</a></font>'.'</td>'. '</tr>'; [/code] as it doesn't appear to actually be returning an autoid.

Member Avatar for totalnoob
0
98
Member Avatar for bamboebahr
Member Avatar for samarudge

php simply isn't meant for this kind of thing, regardless of its intention, albeit yours is a pretty useless one. On the basis of an 8 character password, where each letter can be 1 of 62 possibilities (a-zA-Z0-9) that is 9.807971461541689e+55 possibilities. Good luck with that.

Member Avatar for samarudge
0
178
Member Avatar for mangel.murti

Store a [URL="http://en.wikipedia.org/wiki/Unix_time"]UNIX Timestamp[/URL] in that mysql column. [code=php] <?php $iCurrentTime = time(); [/code] $iCurrentTime would result in an integer like: 1236884436 Which is the number of seconds since the Unix Epoch. You can pass that integer into the php date() function and format it any way you want, and …

Member Avatar for Designer_101
0
142
Member Avatar for kg_ally
Member Avatar for Designer_101

[code=php]header( 'refresh: 5; url=http://www.example.com' );[/code] Can also be a url relative to your site, like: home.php etc.

Member Avatar for mschroeder
0
95
Member Avatar for rEhSi_123

What is the actual error message you are getting, and what is the value of $_SESSION['uid'] in this part of your code? [code=php] if($_SESSION['uid']){ /** Add the following line **/ echo $_SESSION['uid']; $sql = "SELECT id,username FROM 'users' WHERE 'id'='".$_SESSION['uid']."'"; $res = mysql_query($sql) or die(mysql_error()); if(mysql_num_rows($res) == 0){ session_destroy(); /** …

Member Avatar for rEhSi_123
0
356
Member Avatar for valsaraj

I'm not sure if there will be a reliable alternative for the time being. This is due to the Y2K38 problem. [url]http://en.wikipedia.org/wiki/Year_2038_problem[/url]

Member Avatar for mschroeder
0
111
Member Avatar for jeffc418

For starters, Zend Guard is a product for encoding your php in opcode *I believe the term is opcode*, it has nothing to do with securing a form or validating logins. Second, I'm going to make a big assumption here, and say that you're using javascript validation to verify that …

Member Avatar for mschroeder
0
214
Member Avatar for andrewsCWD

Depends on the use case. I always use a database for information that needs to be related together. I couldnt personally say 50/50 or 80/20 etc because my uses of flat files vs databases changes depending on the project i'm working on. However, writing a text file is not just …

Member Avatar for andrewsCWD
0
165
Member Avatar for valsaraj

While you can't directly set a cookie for a remote site with php, at least not from what I could tell with some quick tests. You can emulate it by calling a script on a foreign site and passing some values to it in the url. For example. [code=php] <?php …

Member Avatar for cwarn23
0
3K
Member Avatar for valsaraj

Are there parameters and if so do they need passed via GET or POST requests? cURL will allow for GET and POST requests, but file_get_contents will only be able to open urls that can accept GET requests. Since you're parsing XML and 90% of the web services I see work …

Member Avatar for mschroeder
0
100
Member Avatar for gagan22

For starters the above code has absolutely nothing to do with troubleshooting a connection to your database server. gagan22: Is your site throwing any php errors and/or any mysql connection errors? if you're not getting any errors or are simply getting a blank page, I would create a separate file …

Member Avatar for mschroeder
0
95
Member Avatar for onaclov2000

Are you trying to set something up, where as you make changes throughout the day, at a certain point, say once a night the server goes and compiles the source into a nightly build? If this is more of your intentions and it doesn't need to be absolutely on demand …

Member Avatar for onaclov2000
0
117
Member Avatar for Lensva
Member Avatar for Lensva
0
92
Member Avatar for veledrom

[url]http://www.swiftmailer.org/wikidocs/v3/sending/bounce_address[/url] [url]http://www.swiftmailer.org/wikidocs/v3/misc/logging[/url] I believe both of those pertain to what you're looking for.

Member Avatar for veledrom
0
1K
Member Avatar for veledrom

I disagree with CAPTCHA on the login form. If a bot is trying to log into a site via a login form then that makes the assumption that the bot has already registered an accout or is attempting to brute force its way in. On the login side of things, …

Member Avatar for mschroeder
0
88
Member Avatar for danielagaba

You could also create a new table for saved form data and then serialize your POST or GET array depending on how you're passing your form data. Then store the serialized data in the table and relate it to your form in a way that makes sense to your code. …

Member Avatar for nav33n
0
427
Member Avatar for lonestar23

[code=php] <?php $xYahooXML = ' <ysearchresponse responsecode="200"> <prevpage> /ysearch/web/v1/sunflower%20seeds?appid=e4j0dGfIkY0.VnPaj_m8JivWDmAdWAV50uTRuIaqvA--&amp;format=xml&amp;count=1&amp;start=0 </prevpage> <nextpage> /ysearch/web/v1/sunflower%20seeds?appid=e4j0dGfIkY0.VnPaj_m8JivWDmAdWAV50uTRuIaqvA--&amp;format=xml&amp;count=1&amp;start=2 </nextpage> <resultset_web count="1" start="1" totalhits="376055" deephits="11600000"> <result> <abstract> Home to the <b>seed</b> brand featuring products, nutrition facts, and more. </abstract> <clickurl> http://lrd.yahooapis.com/_ylc=X3oDMTRrYzhoc210BF9TAzIwMjMxNTI3MDIEYXBwaWQDZTRqMGRHZklrWTAuVm5QYWpfbThKaXZXRG1BZFdBVjUwdVRSdUlhcXZBLS0EcG9zAzEEc2VydmljZQNZU2VhcmNoV2ViBHNsawN0aXRsZQRzcmNwdmlkA2ZIUnh2RVBEQjJHQjIxOF9zZjhLc3dsa1RNTzJsa21qWS5FQUE2WkI-/SIG=10v00dabm/**http%3A//www.davidseeds.com/ </clickurl> <date>2008/12/12</date> <dispurl>www.<b>davidseeds.com</b></dispurl> <size>7122</size> <title>David <b>Sunflower</b> <b>Seeds</b></title> <url>http://www.davidseeds.com/</url> </result> </resultset_web> </ysearchresponse>'; $oSimpleXML = new SimpleXMLElement( $xYahooXML …

Member Avatar for lonestar23
0
203
Member Avatar for chicago1985

This is one of the weaknesses of php. You can not use php to check the file size until AFTER the file/image has been SUCCESSFULLY uploaded to the server. You also can not use javascript to access the client side file system. This is an area where i see Adobe …

Member Avatar for shadiadiph
0
116
Member Avatar for laxminarayanaou

That would be an AJAX auto complete/auto suggest feature. Have you even tried looking for [URL="http://lmgtfy.com/?q=ajax%2C+autocomplete%2C+php"]examples[/URL]?

Member Avatar for laxminarayanaou
0
86
Member Avatar for changeco

This almost looks like you're trying to work with a java or javascript object instead of php. In PHP it would be something like: [code=php] $rs = $sql->Execute('SELECT ... '); if( $rs->rowCount > 0 ) { return true; } else { header('Location: expired.php'); exit; } [/code] Are you getting any …

Member Avatar for mschroeder
0
95
Member Avatar for arunmozhi

Can i ask what your implementation of this is? Hoe are you using it, and why do you need to display a floating div in front of the page to tell the user it is loading? I'm not criticizing or anything, I just don't think i've ever seen something like …

Member Avatar for mschroeder
0
102
Member Avatar for viron

I would like a double cheese burger and a large shake, and yes, I do want fries with that... I will trade that for some code, do you take code? [code=javascript] for($i=1; $i>0; $i++) { alert( 'Here is some code'); } [/code] Alright since you didn't make any effort to …

Member Avatar for mschroeder
0
104
Member Avatar for FlashCreations

Why does the page value need to be passed in the url? Will it always be the same as the hidden field view? I ask because i see $_GET['page'] & $_POST['view'] being set to the same value. Here is a quick example of moving the value of "page" to a …

Member Avatar for mschroeder
0
372
Member Avatar for hbk_star2006

The problem is not in the check_login.php file. The error is in your config.php file. You can NOT have ANY output from php prior to calling the header function. I assume you have something like the following in your config.php file: [code=php] <?php //Ignore the next line, it just reproduces …

Member Avatar for mschroeder
0
124
Member Avatar for Narayan15

I believe you're talking about a "popup" that is more of a modal window then a true popup. This would mean creating a div that is positioned above the page and floats over everything else. Here's a quick example of how you could do this with jQuery and CSS. The …

Member Avatar for mschroeder
0
562
Member Avatar for Potato.Head

Here is a quick jQuery example, the alert shows the top and left position of the image. It also gives you a chance to actually see the javascript set the new position. Let me know if you need any more explanation. You can also check out the documentation for .position() …

Member Avatar for mschroeder
0
114
Member Avatar for rachaael

I see three options that you could pursue but since you posted this in the Javascript forum I'll assume you are not looking for a serverside solution using php etc., correct me if I'm wrong. With javascript you have two options, you could load the content for both pages into …

Member Avatar for mschroeder
0
92
Member Avatar for diafol

If the server is configured to allow access from the outside world, then just use the ip of the machine to connect to it. At least in terms of cPanel you need to add external hosts to the permissions for connections outside of localhost. I *believe* DirectAdmin was/is the same …

Member Avatar for diafol
0
594
Member Avatar for wwwmadeasy

After taking a quick look at their javascript it looks like they're simply overlaying a transparent image over the base map image when you hover a particular link. here is the link to the file that seems to be handling the overlay of the images. [url]http://www.findaproperty.com/fapmaps/js/0/0_1.js[/url]

Member Avatar for almostbob
0
113
Member Avatar for raghavendra83

are you trying to toggle every check box on the page on and off? or just one checkbox?

Member Avatar for ~s.o.s~
0
116
Member Avatar for oskido2010

> Hi, > > Does anyone have a better idea of the ajax based login code, the one that does error checking etc, and also the member registration authentication. so far i have got an idea of the following!!! function doLoginAction() { $filter = new Zend_Filter_Input($_POST); if (!($login = $filter->testAlnum('login'))) …

Member Avatar for mschroeder
0
89
Member Avatar for eawade

I built this on the jQuery library, its a very simple example with a lot of duplicated code that could be turned into a function or two. Hopefully some people with some older browsers can verify that it works, but it works in FF3, Opera 9.6, IE7 and Safari 3.2.1 …

Member Avatar for essential
0
260
Member Avatar for shadiadiph

I would recommend [URL="http://phpmailer.codeworxtech.com/"]PHPMailer[/URL] or [URL="http://www.swiftmailer.org/"]SwiftMailer [/URL] for this task. Both handle attachments and html emails etc seamlessly, but both are also much more frequently udpated/patched etc.

Member Avatar for shadiadiph
0
110
Member Avatar for marjan_m

Try this example out. This uses jQuery to grab the css properties you want. Even on elements that do not have inline styles. This is what matters, it serves the jquery library from googles cdn, but this could be from a local copy too. [URL="http://docs.jquery.com/CSS/css#name"]jQuery CSS Documentation[/URL] Sends two alerts …

Member Avatar for marjan_m
0
171
Member Avatar for JimD C++ Newb

how is your form setup? generally you would want a series of checkbox fields all called type[] with unique values. this way what you go to parse over the results in php, $_POST['type'] is an array of check values. [code=php] if(isset($_POST['type'])){ $type = $_POST['type']; echo 'You selected: ' . implode( …

Member Avatar for mschroeder
0
128
Member Avatar for shasha821110

notepad++ zend studio, although i only prefer it over Eclipse PDT and Aptana because of its integration with PHPUnit.

Member Avatar for almostbob
0
121
Member Avatar for serdas

if you mean when typing in the textarea the text just continues on one long line, add wrap="physical" to the textarea markup. [inlinecode]<textarea name="" cols="" rows="" wrap="physical" class="" id=""></textarea>[/inlinecode] This will make the textarea wrap at word breaks [spaces] that are close to the end of the line. If it …

Member Avatar for mschroeder
0
194

The End.