Posts
 
Reputation
Joined
Last Seen
Ranked #413
Strength to Increase Rep
+7
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
8
Posts with Upvotes
8
Upvoting Members
8
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
6 Commented Posts
~73.8K People Reached
About Me

I always tell the truth. Even when I lie ...

Interests
PHP/MySQL
Favorite Tags
Member Avatar for Rhyan

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 …

Member Avatar for Gakwaya Joel
0
17K
Member Avatar for lifeworks

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]

Member Avatar for bilalbinamar
0
6K
Member Avatar for MitkOK
Member Avatar for LastMitch
1
579
Member Avatar for dayballer2285

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

Member Avatar for sakkal
0
1K
Member Avatar for Binary

[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 …

Member Avatar for almostbob
0
21K
Member Avatar for nil_gh_80
Member Avatar for nikesh.yadav
1
111
Member Avatar for MitkOK

Hello. I know that there are many ways to convert date in PHP, but i use those to two convert from/to MySQL DB.

Member Avatar for asimshahiddIT
0
193
Member Avatar for nanharb

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]

Member Avatar for cereal
0
2K
Member Avatar for michael123
Member Avatar for saiprem
0
169
Member Avatar for dr4g

Sorry for the double post, please some mod to delete this. - [B][I][COLOR="Green"]Mitko Kostov[/COLOR][/I][/B]

Member Avatar for kcmartz
0
1K
Member Avatar for dudegio

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]

Member Avatar for vinay1989
0
92
Member Avatar for MitkOK

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

0
184
Member Avatar for superjacent
Member Avatar for fraogongi
0
164
Member Avatar for wjordan1987

Dude, are you actually looking at your code to find the error ? [CODE=ruby]class SayController < ApplicationController def hello end end[/CODE]

Member Avatar for MitkOK
0
78
Member Avatar for nanodano

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 :(.

Member Avatar for peter_budo
0
237
Member Avatar for tondeuse34

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]

Member Avatar for tondeuse34
0
159
Member Avatar for Brent.tc

Why don't you write little php script about this operation and executed on the server ?

Member Avatar for MitkOK
0
66
Member Avatar for timo_81

[CODE="python"] click=0 def button_clicked(): global click click=click+1 print click[/CODE]

Member Avatar for timo_81
0
162
Member Avatar for billabong2388

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]

Member Avatar for vegaseat
0
151
Member Avatar for rickarro
Member Avatar for nav33n
0
143
Member Avatar for AbdullahKhatri
Member Avatar for duttydea

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]

Member Avatar for nav33n
0
333
Member Avatar for kings

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]

Member Avatar for OmniX
0
108
Member Avatar for OmniX
Member Avatar for nomadhacker
0
184
Member Avatar for Barefootsanders

[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 ;)

Member Avatar for MitkOK
0
209
Member Avatar for dannybarh

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] ;)

Member Avatar for MitkOK
0
106
Member Avatar for Spaiz

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

Member Avatar for Spaiz
1
9K
Member Avatar for MitkOK

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 …

Member Avatar for pty
0
146
Member Avatar for dss

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]

Member Avatar for MitkOK
0
69
Member Avatar for Taffd

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]

Member Avatar for Fest3er
0
103