104 Posted Topics

Member Avatar for searchacar

Hi. You can set mysql fileds as "unique" and check if values exists in DB before inserting. - [B][I][COLOR="Green"]Mitko Kostov[/COLOR][/I][/B]

Member Avatar for JeniF
0
114
Member Avatar for leolim

Hello. You have to check which button is closed : [code=php]<?php if(isset($_POST['action'])) { display(); } if (isset($_POST['submit'])) { profile(); } ?>[/code] - [COLOR="Green"][B][I]Mitko Kostov[/I][/B][/COLOR]

Member Avatar for johny_d
0
83
Member Avatar for ryan_vietnow

[url]http://en.wikipedia.org/wiki/Object-oriented_programming[/url] - [COLOR="Green"][B][I]Mitko Kostov[/I][/B][/COLOR]

Member Avatar for Barefootsanders
0
129
Member Avatar for >shadow<
Member Avatar for kumuda

Hi. I recommend you to validate form data using PHP because JavaScript can be disabled by the user. - [B][I][COLOR="Green"]Mitko Kostov[/COLOR][/I][/B]

Member Avatar for cuchandoo
0
111
Member Avatar for MidiMagic

[QUOTE=MidiMagic;419668]Why do they make computers harder to use and program than they need to be? Here are some examples: - Why do most spreadsheets and programming languages do trigonometric functions in radians, when most people use degrees?[/quote] This is Math, trgometric functions use radians, it is standart. [quote]- In the …

Member Avatar for Dave Sinkula
0
179
Member Avatar for tanha

Be more specific. Do you insert data with forms ? - [B][I][COLOR="Green"]Mitko Kostov[/COLOR][/I][/B]

Member Avatar for tanha
0
87
Member Avatar for ndeniche

I think your server doesn't recognize php file, so it doesn't interpret it. Do you install and configure correctly PHP ? - [B][I][COLOR="Green"]Mitko Kostov[/COLOR][/I][/B]

Member Avatar for w_3rabi
0
460
Member Avatar for woocha

You can try Notepad++, PSPad, Eclipse and SciTE - all free. - [COLOR="Green"][B][I]Mitko Kostov[/I][/B][/COLOR]

Member Avatar for martin5211
0
290
Member Avatar for nil_gh_80

file1.php [code=php]echo "<input type=\"hidden\" value=\"".$p."\" name=\"p\">";[/code] file2.php [code=php]echo $_POST['p'];[/code] - [B][I][COLOR="Green"]Mitko Kostov[/COLOR][/I][/B]

Member Avatar for nil_gh_80
0
224
Member Avatar for j.vijayanand

[QUOTE=j.vijayanand;422018]Hi folks, The page load time is the one of the main factors... [LIST] [*][COLOR="Red"]Reduce the HTTP Requests[/COLOR] [*]Don’t rely on other sites [*][COLOR="Green"]Save your images properly[/COLOR] [*][COLOR="Green"]Compression[/COLOR] [*]Avoid JavaScript where possible [*][COLOR="Red"]Strip extraneous PHP calls[/COLOR] [*][COLOR="#008000"]Optimize Images[/COLOR] [*][COLOR="#008000"]Image Formats[/COLOR] [*]Optimize Your CSS [*]Use a Slash on Your Links [*][COLOR="Red"]PHP/MySql …

Member Avatar for MitkOK
0
73
Member Avatar for dmotah

[quote]Remember that header() must be called before any actual output is sent, either by [B]normal HTML tags[/B], blank lines in a file, or from PHP. It is a very common error to read code with include(), or require(), functions, or another file access function, and have spaces or empty lines …

Member Avatar for MitkOK
0
87
Member Avatar for zonkd
Member Avatar for cancer10

Hi there. You can set php configuration options with [URL="http://bg.php.net/ini_set"]ini_set()[/URL] in every page. There is a limitation I think that with this command you cannot load extensions. I don't know about Linux, but this is how it can be done on Windows : httpd.conf : [code]Include conf/php.conf[/code] php.conf [code]# PHP …

Member Avatar for MitkOK
0
233
Member Avatar for joshilay

Hi. There are instructions to install php on Linux. Look in INSTALL file. - [COLOR="Green"][B][I]Mitko Kostov[/I][/B][/COLOR]

Member Avatar for Anonymusius
0
88
Member Avatar for lisakay

[QUOTE=joeprogrammer;419624]What graphics card do you have?[/QUOTE] I think that's the answer : [quote]... intel extreem graphics[/quote] I recommend you to turn off Aero. - Mitko Kostov.

Member Avatar for John A
0
69
Member Avatar for dsustaita

Hello. Pay attention to the quotes : [code=php]$result = mysql_query("SELECT * FROM pages WHERE pagenumber LIKE '$pagenumber' ",$db) ;[/code] Hint : You don't have to use LIKE if you don't want to use it with pattern. Instead of LIKE here you can use this : [code=php]$result = mysql_query("SELECT * FROM …

Member Avatar for dsustaita
0
167
Member Avatar for fabzster

Interesting. Please, print the sql query and try to execute it in PHPMyAdmin ( if you have ). - [COLOR="Green"][B][I]Mitko Kostov[/I][/B][/COLOR]

Member Avatar for MitkOK
0
140
Member Avatar for php_noob

Hi. Here is an example : [code=php]<? class dummy { var $variable; var $variable2 = 1; var $variable3 = 2; function sum($one, $two) { $val = $one + $two; return $val; } function sum2() { $val = $this->sum($this->variable2, $this->variable3); return $val; } } ?>[/code] [quote]The "$this" variable is a reserved …

Member Avatar for Fungus1487
0
139
Member Avatar for marjan_m

Hi. I don't understand what's the problem. Hint : Why don't you do the check in the query : [code=php]$result = mysql_query("SELECT username,pw FROM login WHERE username='$name' AND pw='$password' "); if($result!='NULL') { header("Location: http://www.google.com"); } else { header("Location: http://www.yahoo.com"); }[/code] Hint 2: [code=php]$con = mysql_connect("localhost","","") or die('Could not connect: ' …

Member Avatar for ryan_vietnow
0
106
Member Avatar for cmills83

MySQL commands : [QUOTE]You can then import it into a MySQL table by running: load data local infile 'file.csv' into table table fields terminated by ',' enclosed by '"' lines terminated by '\n' (field1, field2, field3) The fields here are the actual tblUniq table fields that the data needs to …

Member Avatar for MitkOK
0
103
Member Avatar for dmotah
Re: post

Hi. How do you check username and password ? DB login or ? - [COLOR="Green"][B][I]Mitko Kostov[/I][/B][/COLOR]

Member Avatar for Pro2000
0
104
Member Avatar for binoj_daniel
Member Avatar for tanha

[url]http://codetale.com/2007/02/23/javascript-calendar-widget[/url]

Member Avatar for MitkOK
0
71
Member Avatar for Barefootsanders

Hi. I recommend you to install all-in-one package : Windows : [URL="http://www.wampserver.com/en/"]WAMP[/URL] or [URL="http://www.apachefriends.org/en/xampp.html"]XAMPP[/URL] MacOS : [URL="http://sourceforge.net/projects/mamp"]MAMP[/URL] - [COLOR="Green"][B][I]Mitko Kostov[/I][/B][/COLOR]

Member Avatar for Barefootsanders
0
84
Member Avatar for The Dude

This time for real :twisted: ? Pleased to meet you, [COLOR="Green"][B][I]Osiris Elf Sky[/I][/B][/COLOR] . PS: [quote]Hey, don't oppress me with your gender politics.[/quote] :icon_lol: :icon_lol: :icon_lol:

Member Avatar for EnderX
0
76
Member Avatar for Pro2000
Member Avatar for Pro2000
0
82
Member Avatar for engrr.faruk

[url]http://forums.mpadc.com/showthread.php/hejri-hijri-date-326.html?t=326[/url] - [COLOR="Green"][B][I]Mitko Kostov[/I][/B][/COLOR]

Member Avatar for MitkOK
0
177
Member Avatar for Firestone

[url=http://bg.php.net/foreach]foreach()[/url] - [COLOR="Green"][B][I]Mitko Kostov[/I][/B][/COLOR]

Member Avatar for jamshid
0
86
Member Avatar for The Dude
Member Avatar for TaoistTotty
Member Avatar for eric5093

Welcome to DaniWeb :) - [COLOR="Green"][B][I]Mitko Kostov[/I][/B][/COLOR]

Member Avatar for happygeek
0
40
Member Avatar for kevted

Hello there. You have a problem in creating relationships in MySQL ? Error on connecting server, selecting DB, querying tables ? Please, be more specific. - Mitko Kostov

Member Avatar for macneato
0
78
Member Avatar for MitkOK

Hi. I'm learning now CakePHP and I'm writing basic login script. So when I log ( validate username and password ) I want to print a message and after 5 seconds to redirect to index. I use $this->flash('Login successfull', '/users/index', 5); but won't work ;( Ideas ? Thanks in advance. …

0
64
Member Avatar for venu@baylogic

[url]http://www.xajaxproject.org/[/url] - [B][I][COLOR="Green"]Mitko Kostov[/COLOR][/I][/B]

Member Avatar for phper
0
161
Member Avatar for marjan_m

[QUOTE=Eko;412642]...or you can go in php.ini and set the output_buffering=On ( it's Off by default)[/QUOTE] ... or use [URL="http://php.net/ob_start"]ob_start()[/URL]; -[COLOR="Green"][B][I] Mitko Kostov[/I][/B][/COLOR]

Member Avatar for chewan
0
136
Member Avatar for marjan_m

Hello. There is no syntax error in this code, but if you want to check a value of variable you must use operator "==", not "=". - [B][I][COLOR="Green"]Mitko Kostov[/COLOR][/I][/B]

Member Avatar for iamthwee
0
93
Member Avatar for marjan_m

Hello. If you have form like this: [code=html]<form action="check.php" method="post"> <input type="text" name="username" value=""> <input type="text" name="password" value=""> <input type="submit" name="submit"> </form>[/code] ...you can access form values like this: [code=php]$_POST['username'] // username $_POST['password'] // password[/code] - [COLOR="Green"][B][I]Mitko Kostov[/I][/B][/COLOR]

Member Avatar for marjan_m
0
118
Member Avatar for Cerberus

You can use PHP function to convert 'YYYY-MM-DD' to 'DD-MM-YYYY' : [code=php]function convertDate($date) { $new = explode("-",$date); $a=array ($new[2], $new[1], $new[0]); return $n_date=implode("-", $a); }[/code] - [COLOR="Green"][B][I]Mitko Kostov[/I][/B][/COLOR]

Member Avatar for Cerberus
0
102
Member Avatar for ndeniche

Hello. I think that you have not installed and configured web server and php. This is the only reason for not executing your php code. - [B][I][COLOR="Green"]Mitko Kostov[/COLOR][/I][/B]

Member Avatar for ndeniche
0
88
Member Avatar for marjan_m

Hi. You can use both of the servers to run PHP code. [URL="http://news.netcraft.com/"]http://news.netcraft.com/[/URL] - [B][I][COLOR="Green"]Mitko Kostov[/COLOR][/I][/B]

Member Avatar for Ezzaral
0
218
Member Avatar for cancer10

[QUOTE=stymiee;402729]If you are allowed to use exec() then that will make it a one line script. Otherwise you can't access mysqldump directly through PHP.[/QUOTE] ... or system() :cool:

Member Avatar for MitkOK
0
285
Member Avatar for mithesh

URL of the current page : [code=php]$current_url = $_SERVER['REMOTE_ADDR'].$_SERVER['PHP_SELF']; echo $current_url;[/code] - [COLOR="Green"][B][I]Mitko Kostov[/I][/B][/COLOR]

Member Avatar for MitkOK
0
97
Member Avatar for vssp

You can use [code=php]mail($recipient, $subject, $message, "From:". $sender."\nContent-Type: text/html; charset=iso-8859-1");[/code] - [COLOR="Green"][B][I]Mitko Kostov[/I][/B][/COLOR]

Member Avatar for vssp
0
87
Member Avatar for MitkOK

Hi folks. I Have a question : I'm interested how you generate query string to search DB with more than 1 form with LIKE. For example : We have $_POST['name'], $_POST['title'], $_POST['phone'], $_POST['email']. How do you generate sql query to search with two criteria ( name and phone ) ? …

Member Avatar for dezignwork
0
167
Member Avatar for jdenver
Member Avatar for UrbanKhoja
2
108
Member Avatar for MitkOK

[quote]PHP 4 end of life announcement [13-Jul-2007] Today it is exactly three years ago since PHP 5 has been released. In those three years it has seen many improvements over PHP 4. PHP 5 is fast, stable & production-ready and as PHP 6 is on the way, PHP 4 will …

Member Avatar for stymiee
0
72
Member Avatar for Ganeshbabu
Member Avatar for Aldebaran

[code=php]echo $_FILES['file1']['name']; // Name echo $_FILES['file1']['size']; // Size[/code] ... [url]http://www.php.net/features.file-upload[/url] - [COLOR="Green"][B][I]Mitko Kostov[/I][/B][/COLOR]

Member Avatar for Aldebaran
0
117
Member Avatar for invisal

The End.