450 Posted Topics
Re: __sleep() and __wakeup() run prior to serialize() and unserialize() respectively. [URL="http://us.php.net/oop5.magic"]http://us.php.net/oop5.magic[/URL] __sleep() returns an array of all variables prior to serializing an object __wakeup() also runs prior to unserializing an object to reestablish any database connections etc... for that object prior to unserialization | |
Re: Not wanting to duplicate threads: [URL="http://www.daniweb.com/forums/thread133738.html"]http://www.daniweb.com/forums/thread133738.html[/URL] | |
Re: add a semicolon after this line [CODE=php] $message = '<html><head></head><body>$formresults</body></html>' [/CODE] | |
| |
Re: Usually when you see something like this: arrayName.item(0) it is referring to something in the DOM, for example: [URL="http://jacksleight.com/blog/2008/01/14/getelementsby/"]http://jacksleight.com/blog/2008/01/14/getelementsby/[/URL] | |
Re: very basic version but it should get you started: [CODE=javascript] <!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=iso-8859-1" /> <title>Untitled Document</title> <script language="javascript" type="text/javascript"> function validateForm(inputID) { if(document.getElementById(inputID).value == "") { document.getElementById(inputID + "_error").style.display = "block"; } else { document.getElementById(inputID + "_error").style.display = … | |
Re: Total: [CODE=sql] select sum(`Amount`) as total from `sample`; [/CODE] Total Records: [CODE=sql] select count(`pmtID`) as total from `sample`; [/CODE] | |
Re: [QUOTE=derekcpt;672572]I'm having a for where I can create invoices. Now I'm having the form fields where I have to fill it out with the customer's data. Well I don't want to fill out existing customer's data everytime. So I am having a link which opens up a page with a … | |
Re: [QUOTE=jasimp;665306]Generation Y will be the downfall of America.[/QUOTE] They certainly are good at ruining music. [B]Gen X all the way baby.[/B] I feel sorry for Gen Z. | |
Re: There are several ways, here are just a few: mysql_fetch_assoc: [URL="http://us.php.net/manual/en/function.mysql-fetch-assoc.php"]http://us.php.net/manual/en/function.mysql-fetch-assoc.php[/URL] mysql_result: [URL="http://us.php.net/manual/en/function.mysql-result.php"]http://us.php.net/manual/en/function.mysql-result.php[/URL] mysql_fetch_array: [URL="http://us.php.net/manual/en/function.mysql-fetch-array.php"]http://us.php.net/manual/en/function.mysql-fetch-array.php[/URL] | |
Re: try this [CODE=php] <?php $host=""; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name="images"; // Database name $tbl_name="categories"; // Table name // Connect to server and select database. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $sql = "SELECT id,category_name FROM categories ORDER BY category_name"; echo … | |
Re: do a find and replace in your script for the following: replace ‘ with ' replace ’ with ' | |
Re: [CODE=php] <? $mysql_date = "2008-08-17"; list($y, $m, $d) = explode("-", $mysql_date); echo date("m/d", mktime(0, 0, 0, $m, $d, $y)); ?> [/CODE] | |
![]() | Re: How are you bringing the values back? get, post, session, cookie? |
Re: One of the things that I have done in the past(some would prefer not to because it will change the primary keys) is to delete the values in the table pertaining to that user and then add the values as if it was the first time. This will readjust the … | |
Re: Also, you shouldn't be using session_register() as this is registering a global variable. You will find that in most hosts, register globals is turned off and in php 6.0 it is completely removed. You shouldn't be using register globals anyway. You only need to use $_SESSION[]. So, unless you really … | |
Re: BRONCOS all the way man! You see what Favre is doing? What a baby. | |
I wonder if I'm going to be hearing that from my kids within the next 10 years? [url]http://www.newscientist.com/article/dn8826.html[/url] "But the neighbor kid has them!" | |
Re: I'm pretty sure it is people with under 10 posts. | |
Re: [QUOTE=Aia;659101]In Spain the working people are obligated by the state to contributed to the Roman Catholic Church whether they want or not. This is accomplished via income tax, but is not deductible. In fact, many even don't know that some of their money goes to the archives of the Catholic … | |
Re: Some funny budweiser commercials [URL="http://www.youtube.com/watch?v=ywVnmQiCbPU"]http://www.youtube.com/watch?v=ywVnmQiCbPU[/URL] [URL="http://www.youtube.com/watch?v=z4m9k0c_lgU"]http://www.youtube.com/watch?v=z4m9k0c_lgU[/URL] [URL="http://www.youtube.com/watch?v=vQdgu-FvTog"]http://www.youtube.com/watch?v=vQdgu-FvTog[/URL] | |
Re: [QUOTE=yasmena;671086]i need to know how to get the selected value from a drop down box in php for example : while($row=mysql_fetch_array($query)) { echo"<option value='category'>".$row["cat_name"]."</option>"; } i want in another page to get the selected value and perform some operation on it[/QUOTE] you just call it by the name of the … | |
Re: This would be a javascript version [CODE=javascript] <!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=iso-8859-1" /> <title>Untitled Document</title> <script language="javascript" type="text/javascript"> function calcFields() { if(!IsNumeric(document.getElementById("txtVal1").value) || document.getElementById("txtVal1").value == "") { var val1 = 0; } else { var val1 = document.getElementById("txtVal1").value; } document.getElementById("txtVal1").value … | |
Re: What you are looking for is Curl [URL="http://us.php.net/manual/en/curl.examples.php"]http://us.php.net/manual/en/curl.examples.php[/URL] [URL="http://us.php.net/manual/en/ref.curl.php"]http://us.php.net/manual/en/ref.curl.php[/URL] ![]() | |
Re: What you are probably doing is setting the default action to shown when the default action should be hidden. Then if a user is logged in the hidden items are then shown rather than the other way around. | |
Re: if the user is viewing your form via https and you post relatively, the form will post https. You can test to see if the user is viewing your form via https by testing with: [CODE=php] if(!isset($_SERVER['HTTPS'])) { header("location: https://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); } [/CODE] | |
Re: Posters that whine for help, "Pleeeeeze oh Pleeeeze". If it's so urgent, why didn't they go to google first? People that say: "Can you help me, this doesn't work" [iCODE]Code Up The %^$@#[/iCODE] "thanks." oh and [iCODE]Code Up The %^$@#[/iCODE] | |
Re: If I could get over the temptation to chase animals with it then it would be great. Imagine the upgrades you could make to it, could probably even program it. | |
Re: I don't see an instantiation of any object into $input. Even if that is the reference you are sending into send_email(), you aren't going to be able to use that in createHeader() because it is out of scope. ![]() | |
Re: I'm sorry but I don't see where you are setting $hour. If $hour is not set then this will never fire. maybe you should include this somewhere: [CODE=php] $hour = date("G"); [/CODE] | |
Re: adjusted the onmouseout function [CODE=javascript] <td background="images/button_main.gif" class="hand" onMouseOver="getCity('getButtons.php?city=<?php echo $city;?>');" onMouseOut="setTimeout('getCity('getButtons.php?city=<?php echo $original_city;?>')', 3000);" onClick="">BUTTON</span></td> [/CODE] | |
Re: [QUOTE=ZZucker;665006]Let's put some bigotry on the other shoe: What is the difference between a man and a government bond? Bonds mature What did God say after creating man? I can do better What do you call a man with half a brain? Gifted What does a man consider as a … | |
Re: another option would be to escape any double quotes in the string, for example [CODE=php] "<script language = \"javascript\">" [/CODE] or [CODE=php] "<script language = 'javascript'>" [/CODE] | |
Re: Personally, I think relationships and personalities can be represented by throwing 5 billion 300 sided dice on the ground. If one die tries to match itself to every die that it finds it will find the wrong combination 299 times before it finds the right one. You have to understand … | |
Re: Step 1. Place both thumbs at center of cd while positioning index and middle fingers from both hands firmly around the cd on each side. Step 2. Now slowly apply pressure to both thumbs. It is normal to hear crackling noises so don't be alarmed. repeat step 2 until desired … | |
Re: [CODE=sql] mysql> select count(vote) as total, vote from votes group by vote; [/CODE] will show you the total of votes per distinct vote entry. | |
Re: Also what I will do many times is create a file to include which would be the top of my template and then a file that would be the bottom of my template and use a function called register_shutdown_function, you can find documentation at php.net, to include my bottom half. … | |
Re: [QUOTE=langsor;664304]If you are going to use a database you probably do want to use MySql or PostrgeSql since they are the most commonly supported on web servers.[/QUOTE] It is true that PostgreSql and MySql are both open source, but as much as I prefer Postgres over Mysql, for some reason … ![]() | |
Re: [QUOTE=GrimJack;649379]The problem lies between keyboard and chair[/QUOTE] meatware | |
Re: I'm pretty sure that ‘ ’ are not valid quote characters in php so changed ‘HTTP_USER_AGENT’ to 'HTTP_USER_AGENT' [code=php] if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']), "google") === FALSE) [/code] | |
Re: That's exactly how I learned php. I went line by line of applications that other people wrote, referring to php.net everytime I came across a function that I didn't know. At the time I also was aware of the basic concepts of programming. If you know those, then that's what … | |
Re: we use eGroupWare at work and it seems to work well. I have written my own reports from it because the reporting isn't the best, also written an external form to submit tasks into it, the database is straight forward. I don't know if that is the type of application … | |
Re: What this means is that something is wrong with the query. To find out what, you should connect a die statement to your mysql query function. [CODE=php] $run = mysql_query($sql) or die(mysql_error()); [/CODE] Keep in mind that an empty result set is still a result set so if mysql_num_rows($run) == … | |
Re: You could do it on any file since you are accessing the same database either way. However, you need to know what columns and data types to assign to the table. Did you get a .sql file or a readme.txt file with the package that might give you this info? | |
Re: this will give you everything you need to know [URL="http://www.w3schools.com/Ajax/Default.Asp"]http://www.w3schools.com/Ajax/Default.Asp[/URL] | |
anybody have a browser compatible html entity decoding function? |
The End.