- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 8
- Posts with Upvotes
- 8
- Upvoting Members
- 8
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
I always tell the truth. Even when I lie ...
- Interests
- PHP/MySQL
| Re: Hi. This is a function to convert date from DD-MM-YYYY to YYYY-MM-DD : [code=php]function con2mysql($date) { $date = explode("-",$date); if ($date[0]<=9) { $date[0]="0".$date[0]; } if ($date[1]<=9) { $date[1]="0".$date[1]; } $date = array($date[2], $date[1], $date[0]); return $n_date=implode("-", $date); }[/code] If you are using PHP 5 >= 5.1.0 there is native funciton … |
Re: Hi. You have to check if the value of the checkbox is set by [URL="http://bg2.php.net/isset"]isset[/URL] function for example : [CODE=HTML] Sport : <input type="checkbox" name="sport" value="football" />[/CODE] [CODE=PHP]<?php if (isset($_POST['sport'])) { // do something } ?>[/CODE] | |
I wrote four simple functions to manipulate .htpasswd file ( Apache ). | |
Re: Hi. This function works just fine. Please post the errors. Also you can use : [code=php]$url = 'http://www.example.com'; $handle = @fopen($url,'r'); if($handle !== false){ echo 'Exists'; } else{ echo "Doesn't"; } [/code] PS: What is this : [code=php]$lines= echo $variable[/code] - Mitko Kostov | |
Re: [QUOTE=Binary;419375]If I am on this page for example [code] http://www.mypage.com/view.php?prop_id=5 [/code] and I want to add a link, that would translate to [code]<a href="submit_docs.php?prop_id=5 ">Click </a> [/code] How do I accomplish this, how do I pass the php variable "prop_id" to a href link? Can someone shed me some light … | |
Re: [code=HTML]<A HREF="javascript:window.print()">Click to Print This Page</A>[/code] | |
Hello. I know that there are many ways to convert date in PHP, but i use those to two convert from/to MySQL DB. | |
Re: Or may be you can ;) [code=sql]$query = "UPDATE company SET `references` = 'blahblahblah' where username = 'company'";[/code] PS: Pay attention to the quotes ... - [COLOR="Green"][B][I]Mitko Kostov[/I][/B][/COLOR] | |
Re: [url]http://phpmailer.codeworxtech.com/index.html[/url] | |
Re: Sorry for the double post, please some mod to delete this. - [B][I][COLOR="Green"]Mitko Kostov[/COLOR][/I][/B] | |
Re: It's better to store audio files in dir on your server and put path in MySQL field. - [B][I][COLOR="Green"]Mitko Kostov[/COLOR][/I][/B] | |
Here are two simple functions to validate name and e-mail . int [COLOR="#008000"]valName[/COLOR]( string $arg1 ) - this function returns 1 if name is correct, 0 if incorrect int [COLOR="Green"]valMail[/COLOR]( string $arg1 ) - this function returns 1 if name is correct, 0 if incorrect | |
Re: I would say QTRuby or wxRuby, altough there are GTK and Tk bindings. | |
Re: Dude, are you actually looking at your code to find the error ? [CODE=ruby]class SayController < ApplicationController def hello end end[/CODE] | |
Re: I'm with you guys, Ruby must be in one forum with Python and Perl. But no one from the admins here will notice that :(. | |
Re: Yes, it's indention problem. [code="python"] print "1) Play" if choice == 1: ways = ['L','R','S'] ways = raw_input("Which way do you want to go(L,R,S)?: ") elif direction == 'L': print "You have gone left." [/code] | |
Re: Why don't you write little php script about this operation and executed on the server ? | |
Re: [CODE="python"] click=0 def button_clicked(): global click click=click+1 print click[/CODE] | |
Re: Hi. If you have a list like that : [code=python]listunsorted = ['3 text_red','7 text_yellow','9 text_blue', '1 text_pink','3 text_black','6 text_orange','7 text_white'][/code] ... you can sort it like this : [code=python]listsorted =sorted(listunsorted, key=lambda x: x.split()[0])[/code] | |
| |
Re: [url]http://www.w3schools.com/php/php_cookies.asp[/url] | |
Re: Hi. Is this the query you want to edit and put WHERE caluse : [code="php"]$sql = "SELECT `Product_Name`, `Product_Description`, `Product_Picture`, `Product_price`, `Product_Category`, `Product_Pdf`, `Product_Cart`, `Product_Features`, `Product_subcat`, `Key` FROM `prod_listing`";[/code] | |
Re: Hi. I use this function to validate name in my forms : [CODE="php"]function valName($name) { $name = preg_replace(‘/[\s]+/is’, ‘ ‘, $name); $name = trim($name); return preg_match(‘/^[a-z\s]+$/i’, $name); }[/CODE] | |
Re: [url]http://dev.mysql.com/doc/refman/5.0/en/getting-unique-id.html[/url] | |
Re: [QUOTE=genisyl;499822][url]www.genisyl.com[/url]. do send in your query at [email]harpreet.corporate@gmail.com[/email][/QUOTE] Dude, fix your web site and then offer services ;) | |
Re: Hi. If you don't want to download, install and configure Apache, PHP and MySQL go for WAMP ( Windows ) or XAMPP ( Windows, Linux, Mac OS, Solaris ). The best resource for PHP is still [url]http://www.php.net[/url] ;) | |
Re: Very simple so for but fast. Keep coding ... Have you thought using SQLite as serveless DB ? Tested on Windwos Vista Home Premium Apache 2.2.6 PHP 5.2.5 | |
Hi folks. I made some research on Rails vs. Django, but I didn't come to conclusion which is better to learn. Basically I don't know either Ruby or Python. RoR became very popular last year, has many resources and rich documentation and books/tutorials. On the other hand Python as a … | |
Re: Hi. Tpl is extension used by Smarty and not only for web templates. Go to Smarty to see examples what template engine is. [url]http://www.smarty.net/[/url] [url]http://en.wikipedia.org/wiki/Web_template[/url] | |
Re: Hi. Here is two simple ways to do this : First way is to use .htaccess file : [CODE=apache]deny from 111.222.333.444 deny from 222.333.444.555[/CODE] Second way is php code : [code=php]<?php $ipaddress = getenv("REMOTE_ADDR"); if ($ipaddress=='111.222.333.444' || $ipaddress=='222.333.444.555') { exit; } ?> [/code] |