8,966 Posted Topics
Re: Change the echo on line 15 to output it the way you want. [CODE] <a href="/' . $linknavn . '?sid=' . $sid . '">' . $subjectlinklabel . '</a></li>'; [/CODE] | |
Re: [url]http://www.daniweb.com/web-development/php/threads/362877[/url] | |
Re: This issue can be resolved by setting a default timezone in your PHP.INI. This error most often occurs after your server's PHP version has been upgraded. A newer version of PHP expects something like the following: [CODE=text] date.timezone = Europe/Amsterdam [/CODE] | |
Re: You choose whether you add an IDENTITY column, or a timestamp column to your table structure. My personal preference is to always use an IDENTITY column. Show your current table structure, and we will advise. | |
Re: Although consistent use of require_once should avoid this problem, [URL="http://www.electrictoolbox.com/tell-if-php-constant-defined-already/"]here[/URL]'s another way to check your constants. ![]() | |
Re: [CODE] if (preg_match('/([-\w]+)\.html$/i', $subject, $regs)) { $result = $regs[1]; } else { $result = ""; } [/CODE] | |
Re: You cannot reference mysql table columns in a php if statement. Php if structure looks like this: [CODE] if ($var1 == $SID) { $sql = ""; } elseif ($var2 == $SID) { $sql = ""; } else { echo 'no match'; } [/CODE] | |
Re: Something like: [CODE] preg_replace('%(^++ b.*?)(++ c)%', '$2', $yourfile); [/CODE] but you'll have to do some test to see if it is correct. | |
Re: No, you cannot use strings in a case. It accepts only ordinal types (booleans, sets, integers). There are work-arounds for this. One tutorial can be found [URL="http://delphi.about.com/cs/adptips2002/a/bltip0202_5.htm"]here[/URL]. | |
Re: What do you have so far, and what do you need help with ? | |
Re: Start [URL="http://w3schools.com/php/php_mysql_intro.asp"]here[/URL]. ![]() | |
Re: Just posted a link in [URL="http://www.daniweb.com/web-development/php/threads/380948"]this thread[/URL]. Hope it helps. ![]() | |
Re: There is some information on [URL="http://dev.mysql.com/doc/refman/5.5/en/type-conversion.html"]this page[/URL]. | |
Re: No, this is not possible using PHP only. You could use PHP to call an external program that does this. Also, there are plenty of websites that offer this as a service (paid of course). | |
Re: Probably only if your program runs under administrator rights. | |
Re: I think that hiding that address is a feature of the mail client, and not something that can be controlled by headers. | |
Re: Something like [URL="http://www.google.com/cse/"]Google CSE[/URL] perhaps ? | |
Re: Open results.xml from the source zip file and change the question and answers. Do not forget to reset the votes to 0. | |
Re: You want to display a PDF in a div you specify, is that correct ? If so, I don't think it is possible, because it depends on the browser whether it can handle PDF files. | |
Re: The reason you get the notice is, that the $_GET array may not have a key with value 'op'. It wants you to check the value before using it. If you want to get rid of it do something like this: [CODE] $op = isset($_GET['op']) ? $_GET['op'] : ''; if … | |
Re: Chances are that that domain is a CDN, so optimized for delivering static data (like images). Benefit is a better caching and faster retrieval for all images, thus improving usability. | |
Re: The line containing $in is missing something | |
Re: Use a session variable, to determine whether this code has already been executed. | |
Re: I use [URL="http://www.mantisbt.org/"]Mantis[/URL]. Compared to the ones you mention, very lightweight, but it suits my needs. | |
Re: Minor correction, uselessninja says he's using mssql (which does not support limit) [CODE] $sql="SELECT TOP 1 TOTALMW, TOTALMVAR, ID FROM generators WHERE date='2011-08-11' ORDER BY ID DESC"; [/CODE] | |
Re: [iCODE]isset($_SESSION['navn'])[/iCODE] returns true or false, depending on whether that variable has a value set. You should use something like this: [CODE] isset($_SESSION['navn']) ? $_SESSION['navn'] : '' [/CODE] If [iCODE]$_SESSION['navn'][/iCODE] has a value then use it, else use an empty string (or whatever you want). | |
Re: line 33 should start with [iCODE]echo '[/iCODE] (single quote, instead of double). | |
Re: You set the page output to image, which should have a sub type. Echo'ing other data after that will not show correctly, because you are trying to output a picture. | |
Re: If you really want to have it tested by unknowns, setting up a Non Disclosure Agreement is your only defense I guess. | |
Re: If every book and sale is kept in the database, then determining the best seller is relatively easy. The actual query depends on the structure of your database and your specific requirements. | |
Re: You get that notice because the session variable may not be set yet. You can do something like this: [CODE] public $myArray = array ( 'key1' => 'something', 'key2' => isset($_SESSION['something_else']) ? $_SESSION['something_else'] : 'a default value' ) [/CODE] | |
Re: You can change the map's center with something like this: [CODE] gMap.setCenter(new google.maps.LatLng(0, 0)); [/CODE] Replace gMap with the variable for your map. Replace the 0's with your lat and long. | |
| |
Re: Search for (multiple times): [CODE] $like_button_xfbml = " [/CODE] and replace with: [CODE] $like_button_xfbml = ""; [/CODE] | |
| |
Re: It is a verification problem. Are you sure that the username shouldn't be your e-mail address ? If not, ask your system administrator. | |
![]() | Re: Because you want to display the URL differently, I'd suggest replacing the link before outputting it, after retrieving it from the database. ![]() |
Re: Specify your error and it's location. (use code tags for your code) | |
Re: New line before content-disposition ? And doesn't it need a content-length ? | |
Re: Output mysql_error(). You'll see that you need a primary key on id. [CODE] CREATE TABLE admin( id int(11) NOT NULL AUTO_INCREMENT, username varchar(24) NOT NULL, password varchar(24) NOT NULL, last_log_date date NOT NULL, PRIMARY KEY (id), UNIQUE KEY (username) ) [/CODE] | |
Re: If the insert works, then the problem is most likely with the retrieval of the latest record. Check that code instead. | |
Re: You can use SimpleXml or XmlReader to parse the data. Read more in [URL="http://www.php.net/manual/en/refs.xml.php"]the manual[/URL]. | |
Re: Explain what you want with an example please. | |
Re: Do you want to insert into a datetime or time column, or in a varchar column ? datetime/time: [iCODE]insert into table (datetime_column) VALUES (NOW())[/iCODE] varchar: [code] $time = date('g:i A'); $query = "insert into table (varchar_column) VALUES ('$time')"; [/code] | |
Re: [url]http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/[/url] | |
Re: Your stored proc never returns an error, because it updates the existing record when found. | |
Re: A regex is typically for checking/replacing a string, not creating one. | |
Re: Try using position relative, float right, no left but right margin |
The End.