344 Posted Topics
Re: Try [icode]"\r\n"[/icode] instead of just [icode]"\n"[/icode]. \r is a carriage return. | |
Re: The technique you are looking for is called a Lightbox, which uses JavaScript. This tutorial may help (I haven't read it yet, but it looks like it accomplishes your goal. You may want to click the "create a lightbox with fade in effect" link first to see how they made … | |
Re: You may find this page useful too. It tells you what order WordPress uses when it looks for which page to display: [URL="http://codex.wordpress.org/Template_Hierarchy"]Template Hierarchy[/URL] | |
Re: [QUOTE=almostbob;1203069]notepad++ has code completion and hinting but doesnt have a visual display)[/QUOTE] Sorry for getting off topic, but Notepad++ has code completion? I've been using it for 2 years and didn't know that. How do I turn it on? | |
Re: What are you doing with the result? | |
Re: To create a dynamic drop-down menu that extracts information from a database: [code=PHP] <?php // In this example, // field1 will be the value you want your form to return. // field2 will be the text you want the drop-down menu to show. // You can change these accordingly. $query … | |
![]() | Re: This sounds somewhat similar to using a revision control tool, like Subversion: [url]http://en.wikipedia.org/wiki/Revision_control[/url] [url]http://en.wikipedia.org/wiki/Subversion_%28software%29[/url] |
Re: If your problem is with the JavaScript not changing the text to "postback", there are several things that could be affecting this: 1) Your JS code is outside the [icode]<html>[/icode] and [icode]</html>[/icode] tags. It should be within these tags. 2) Your JS code appears before the actual #postback div. It … | |
Re: You can't send header information once you've already started outputting information. [icode]fwrite($handle, $data)[/icode] is sending output. Either that or there's somewhere earlier in the file where output is being sent to the page. You should use PHP's output buffering to fix this: [code=PHP] <?php ob_start(); // begin output buffering $file … | |
Re: Check out [URL="http://w3schools.com/"]http://w3schools.com/[/URL]. Best of luck! | |
Re: [QUOTE=infinitus 8;1158652]Hello, it's my first post and I'm not sure if is the right place. I want to integrate some contact form into my website, but every page I have diferent email address and ID, 2 or 3 page it's ok, I can do manually, but it will be hundreds … | |
Re: PHP code won't actually call the function for you. It just prints whatever is in the echo statement to the page, it doesn't trigger any function names it prints. If you don't mind my asking, why disable the textboxes? Instead, you can have PHP print them out, or not print … | |
Re: [QUOTE=innovative1;1148993]How to change the date.timezone value in PHP? [/QUOTE] [URL="http://php.net/manual/en/function.date-default-timezone-set.php"]date_default_timezone_set()[/URL] [URL="http://www.php.net/manual/en/timezones.php"]List of Supported Timezones[/URL] may be useful as well. | |
Re: PHP variable names are case-sensitive. Your name and id for the textarea are "Comments" (line 113), but the variable you pass to saveGuestbook (line 21) is [icode]$comments[/icode]. It should be [icode]$Comments[/icode] instead. | |
Re: Assuming [icode]<div id="results">[/icode] is the box on the right that first holds the image and then shows results after searching, you could do something like: [code=PHP] // Have code that processes the form, and stores results in an array, or have the form processed further down in the following "if" … | |
Re: Please wrap your code in [ code=PHP ] [ /code ] tags | |
I'm trying to use the [URL="http://htmldog.com/articles/suckerfish/dropdowns/"]Son of Suckerfish[/URL] dropdown menu to make the drop-down menu for a site I'm working on. The dropdown looks fine in FF3, but on IE7 (the only other browser I've tested it on so far) it's got some problems. I've posted an example of the … | |
Re: I'm CS and I've taken 2 semesters of Japanese and 3 of Mandarin Chinese. If you're thinking of either of these two, maybe I can help you decide. In my opinion, Japanese is far easier to pronounce. Mandarin has 5 tones of speech you need to get used to hearing … | |
Hello, I'm looking to write a wallpaper-swapping program. This is just a personal project I feel like doing. I'm aware that there's already software out for this, but the one I like has limits on the freeware version, and the others don't have some of the features I'm looking for, … | |
Hello, My professor has asked me to write a C# GUI for a C++ program. I did not write the C++ program (hell, I'm not even completely sure what it does -- something to do with pattern recognition). I wanted to know how one would go about writing a C# … | |
Hi, I'm using GD to dynamically draw a rectangle on an image I have of a map. I've got that part working fine. Here's my question: I know I need to set the headers of the page to [icode]content-type: image/png[/icode], otherwise I get a bunch of characters instead of the … | |
Re: futhonguy, I already answered this question in the other thread you posted about an hour ago: [URL="http://www.daniweb.com/forums/thread235823.html"]http://www.daniweb.com/forums/thread235823.html[/URL] | |
Re: [QUOTE=MDanz;1036843] [CODE] while($row = mysql_fetch_array( $report)) { $id = $row['id']; }[/CODE][/QUOTE] This won't work, by the way. You'll end up with only the $row['id'] of the last row of your results. You're not preserving the previous values. To do that, either $id would need to be an array, or you'd … | |
Re: You're looking for [code=mysql] DELETE FROM table_name WHERE fieldname = 'value'; [/code] MySQL documentation for DELETE: [url]http://dev.mysql.com/doc/refman/5.0/en/delete.html[/url] | |
Re: Your problem is with the "|| 68": [ICODE]if(isset($_SESSION['user_id']) && $_SESSION['user_id'] == 1 || 68)[/ICODE]. It should be: [code=php] if(isset($_SESSION['user_id']) && $_SESSION['user_id'] == 1 || $_SESSION['user_id'] == 68) [/code] It's like you're asking [icode]if(68)[/icode], which will of course return true. You need to compare the 68 to $_SESSION['user_id'] Also, you may … | |
Re: How about converting the date string into a UNIX timestamp, then subtracting that stamp from today's stamp? Something like: [code=PHP] $b_day = strtotime("1/1/1970"); // UNIX time for birthday $today = strtotime(date("m/d/Y")); $age = date("your formatting string here", $today - $b_day)); [/code] | |
Re: Regular Expressions is what you're looking for. As ShawnCplus said, preg_match() is the function you'll want to use. You might want to do some reading on regular expressions. I used this tutorial a while ago: [url]http://www.regular-expressions.info/tutorial.html[/url] | |
Re: If I have a bunch of includes that every page needs, I'll make an includes.php file that has all these includes listed in it through relative paths, and then have other files include includes.php. This lets me hold on to relative paths for most of the includes. | |
Re: Do you know (X)HTML? You have to start with that. If not, try [URL="http://www.w3schools.com"]http://www.w3schools.com[/URL] | |
Re: [QUOTE=mrcniceguy;966499]now the problem is how i`m going to remove http: //www .youtube.com/watch?v= out of "http: //www .youtube.com/watch?v=JC1D0OQNZg4".[/QUOTE] Try this: [code=PHP] <?php /* * Retrieve the video ID from a YouTube video URL * @param $ytURL The full YouTube URL from which the ID will be extracted * @return $ytvID The … | |
Re: Have you tried using z-index? How come you can't just add a few pixels to the "top:" of the inner div to move it down a bit? Will it just cut off the bottom? | |
Re: [QUOTE=veledrom;966081]No it doesn't work. I realised that this problem starts as soon as after first HTML code. In this case error line is [inlinecode]<?php [/inlinecode] after [inlinecode]<body>[/inlinecode] tag.[/QUOTE] If this PHP after the body tag has anything in it that affects the headers, such as a [icode]header("Location: URLHERE");[/icode] call or … | |
Re: This has more to do with your web server than PHP. If you are using an Apache web server, do some research on "mod_rewrite". Edit: As I see buddylee17 has already recommended =) | |
Re: I'm not sure if I completely understand your problem, but I'm gonna put this out there and hope it helps. If you want to keep your form method as [B]POST[/B], and "Oldpassword does not match!" is the [I]only[/I] possible value that [icode]$errorpass[/icode] can have, you can just add a hidden … | |
Re: [QUOTE=ShawnCplus;966485]You might want to use google before we spoonfeed you homework help.[/QUOTE] +1 Looking up the difference between programming languages and scripting languages might be a good place to start. | |
Re: [QUOTE=kaylar;963410]Is this even possible just using HTML and CSS?[/QUOTE] It's not likely. To get the search box working in the first place you probably have to paste a snippet of code (PHP or the like) into your website. [QUOTE=kaylar;963410]Id like it to show each item with a pictures instead of … | |
Re: [QUOTE=sam023;961564]i just want to separate php code from html.. i have seen this in many open source project.. where html is other file and php code in another..! even at the time of listing.[/QUOTE] From my understanding of this question, I think you're looking for includes. Try [code=PHP]<?php include("mydirectory/myfile.php"); ?>[/code] … | |
Re: [QUOTE=servis;965872] [ICODE] foreach($link AS %links){ --------code here------- } [/ICODE] i am not understanding where i comit mistake.[/QUOTE] If that code was a copy and paste from your actual code (as opposed to if you manually typed it into here), I hate to inform you but it's just a typo. You … | |
Re: You need to create a variable that will store a reference (if that's the right terminology, I'm not a VB pro) to the form you want to show. The variable should be of type [icode]Windows.Forms.Form[/icode]. In the following example, Form2 would be the name of the form you want your … | |
Re: I suppose you could make a GIF with that animation. Use the original image for the normal picture, and then use a CSS :hover to change the image when the mouse is moved over it to the animated GIF. Personally though I'd recommend using jQuery for this, but you'd need … | |
Hello, I am writing a program (for fun as well as for practical uses) that will allow me to keep track of several projects I am working on and how long I have spent working on each. My program has a class "Project" which has the following variables: [code="VB"] Private … | |
Re: I usually use Notepad++, but I've had a few people recommend [URL="http://aptana.com/"]Aptana[/URL] to me. It looks pretty good, some nice features to it (like code assist, which is nice for lazy people like me =P), I just haven't had the patience to learn a new IDE. |
The End.