8,966 Posted Topics
Re: if you have a look in the manual (php.net/str_replace) you can see that you are instructing php to replace the whole word with a single star. [code=php] $password = preg_replace('.', '*', $password); // or $password = str_repeat('*', $length); [/code] | |
Re: I use wampserver as local development server. Typically I use PHPMailer, Smarty, jQuery, Shadowbox and Google API's. Next to that are my cms, some custom classes and image packs. | |
Re: Something like this: RewriteRule "^photo/(.*)$" "http://www.linkzdirect.com/art/$1" [R=301,L] | |
Re: 1. He could poll the database to see if there have been any changes. 2. He could write a specific page which you can trigger. | |
Re: It's missing an important feature: caching. [url]http://www.webresourcesdepot.com/19-promising-php-template-engines/[/url] | |
Re: Is it required to see those lines as they are generated. If you could send them to a file, you can speed it up. The memo is really awful for this amount of data. Also, the processmessages slows things down. You could call it every 100 loops instead for example. … | |
Re: You get this error, because you've already outputted the doctype on the first line. You can remove it, because your code will always redirect. Same goes for the /body and /html tag. Also the echo's before the header cause this problem. | |
Re: the first [ starts a character class in a regex. if you intended to use the character [ then prepend it with a backslash. | |
Re: It is just an <a> tag with several css properties. Just inspect the element using your browser, and you can see how it's done. | |
Re: See the helpfile for the function Pos(). It will allow you to search for a substring. | |
Re: You can use MyFileStream.Write(); Please look in the help for parameter info. I think the first can be a string, and the second the length. If you want to write ResponseStream, there might be some other options. | |
Re: I don't think there is a need to use $x. In general it is not a good idea to use globals in recursive functions. I have no possibility to test my code, but you could try this: [code=php] function list_dir($handle, $path, $x = 0) { // Loop over the directory … | |
Re: Add the line: [code] $Firstname = $_POST['Firstname']; [/code] before the line with mysql_select_db. | |
Re: [url]http://dev.mysql.com/doc/refman/5.1/en/encryption-functions.html[/url] | |
Re: Replace $res = mysql_query($sql) or die("cud not add record"); with $res = mysql_query($sql) or die(mysql_error()); and paste the error message too. | |
Re: An XML document needs exactly one root element. So you should wrap your devices tags in another tag. See: [url]http://en.wikipedia.org/wiki/Root_element[/url] | |
Re: According to the section "PHP Access" in [url]http://code.google.com/apis/ajaxsearch/documentation/#The_Basics[/url] it should be possible. My guess is you already tried this. At work we use the paid version of google search, which just returns xml. | |
Re: Perhaps here: [url]http://pear.php.net/packages.php?catpid=1&catname=Authentication[/url] | |
Re: Not sure about security, but mySQL will eventually be dropped in favour of mySQLi. That should be reason enough to decide... | |
Re: "The onLoad and onUnload events are triggered when the user enters or leaves the page." -- w3schools A refresh is leaving a page and then entering the same once again. I don't think there is a way to see if the same page will be loading again, or if the … | |
Re: It probably can't connect to the DB... Unless the DB class uses your login credentials as default. [code=php] $db = new DB('localhost', 'youruser', 'yourpass', 'yourdb'); [/code] might do the trick, although this solution is not recommended. | |
Re: [code] $esql = "CALL editweeklyevent()"; [/code] Inside the () put the variables in the correct order, as specified in the create procedure. | |
Re: [code=php] <?php session_start(); if (isset($_POST['submit'])) { $fields = array ('cliname', 'cliadd', 'clino', 'cliprod', 'clitest', 'clidr'); $empty_field = false; foreach ($fields as $field) if (empty($_POST[$field])) $empty_field = true; if ($empty_field) $_SESSION['err'] = 'All fields are mandatory!'; else click_submit(); } $err = $_SESSION['err']; ?> //OR <?php session_start(); if (isset($_POST['submit'])) { if (empty($_POST['cliname']) … | |
Re: Maybe you can use this: [url]http://www.daniweb.com/forums/thread200109-3.html[/url] Post #28 Created an admin panel as a demo that does just that. You only need to change it to use your own database, but an example db is included. | |
| |
Re: If the query has no result, $link will be null and that is the invalid argument. If you initialize $link = array (); before the query, this will solve that problem. | |
Re: If you are just looking for an implementation: [url]http://www.phpclasses.org/browse/package/193.html[/url] | |
Re: Fiddler can do this too, even if it's not your server. [url]http://www.fiddler2.com/fiddler2/[/url] [url]http://www.robbihun.com/post/2009/06/08/Manipulating-POST-Data-with-Fiddler.aspx[/url] | |
Re: using php: [url]http://php.net/manual/en/function.date.php[/url] or in your query: NOW() [url]http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html[/url] | |
Re: It is possible that your script times out before reaching the end. You can try to use: set_time_limit(0); at the start of your script, to allow it to run (indefintely) until completed. | |
Re: [code=php] <?php $query="SELECT id,firstname FROM people"; echo "<select name='people' id='people'>"; FillList($query); echo "</select>"; ?>[/code] | |
Re: you can try "overflow: hidden;" in your table cell css | |
Re: I think you should do something like this: [code=php] $inject = false foreach ($badchars as $bad) { if (strpos($char, $bad) !== false) $inject = true; } [/code] | |
Re: It should be possible to download and parse the raw access logs from your website. All info you need should be in there. You can find a lot of parsers online to process them. | |
Re: [url]http://us.php.net/manual/en/function.imagepng.php[/url] You should add a filename to the imagepng() function call. | |
Re: [url]http://dev.mysql.com/doc/refman/5.1/en/server-logs.html[/url] | |
Re: I use this: [code] <Files ~ "^[^\.]+$"> ForceType application/x-httpd-php </Files> [/code] Or this: [code] <Files ~ "^[^\.]+$"> ForceType application/x-httpd-php5 </Files> [/code] Depending on the server. It will treat any file without extension as a php file. | |
Re: 1. There are paid services offering this. 2. Create a webservice which can create such snapshots on demand. In the backend you'll need an application to download the page and save the output to an image. | |
Re: I think your group by and where are in the wrong order. | |
Re: Can you explain a bit more ? What special charaters ? Are you using the right content-type ? | |
Re: You cannot use a variable in a single quoted string. Use: [code=php] mail($email, 'test', 'test message') [/code] or [code=php] mail("$email", 'test', 'test message') [/code] | |
Re: This happens because you are opening a new php file. You would need to use e.g. index.php?page=linkexchange and test in your index.php if linkexchange is set, and then show different content. Another option is to create a function to setup the basic layout and call it in every php file. | |
Re: You get a hyperlink in Excel because Excel recognizes the email format. Navicat just treats it as text. | |
Re: [code=sql]select * from products,images where products.id = images.product_id[/code] |
The End.