104 Posted Topics
Re: 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] | |
Re: 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] | |
Re: [url]http://en.wikipedia.org/wiki/Object-oriented_programming[/url] - [COLOR="Green"][B][I]Mitko Kostov[/I][/B][/COLOR] | |
Re: 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] | |
Re: [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 … | |
Re: Be more specific. Do you insert data with forms ? - [B][I][COLOR="Green"]Mitko Kostov[/COLOR][/I][/B] | |
Re: 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] | |
Re: You can try Notepad++, PSPad, Eclipse and SciTE - all free. - [COLOR="Green"][B][I]Mitko Kostov[/I][/B][/COLOR] | |
Re: 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] | |
Re: [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 … | |
Re: [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 … | |
Re: 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 … | |
Re: Hi. There are instructions to install php on Linux. Look in INSTALL file. - [COLOR="Green"][B][I]Mitko Kostov[/I][/B][/COLOR] | |
Re: [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. | |
Re: 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 … | |
Re: 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] | |
Re: 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 … | |
Re: 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: ' … | |
Re: 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 … | |
Re: Hi. How do you check username and password ? DB login or ? - [COLOR="Green"][B][I]Mitko Kostov[/I][/B][/COLOR] | |
Re: [url]http://codetale.com/2007/02/23/javascript-calendar-widget[/url] | |
Re: 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] | |
Re: 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: | |
Re: Sessions ? - [COLOR="Green"][B][I]Mitko Kostov[/I][/B][/COLOR] | |
Re: [url]http://forums.mpadc.com/showthread.php/hejri-hijri-date-326.html?t=326[/url] - [COLOR="Green"][B][I]Mitko Kostov[/I][/B][/COLOR] | |
Re: [url=http://bg.php.net/foreach]foreach()[/url] - [COLOR="Green"][B][I]Mitko Kostov[/I][/B][/COLOR] | |
| |
Re: 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 | |
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. … | |
Re: [url]http://www.xajaxproject.org/[/url] - [B][I][COLOR="Green"]Mitko Kostov[/COLOR][/I][/B] | |
Re: [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] | |
Re: 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] ![]() | |
Re: 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] | |
Re: 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] | |
Re: 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] | |
Re: 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] | |
Re: [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: | |
Re: 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] | |
Re: 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] | |
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 ) ? … | |
Re: iPhome Fun :) [url]http://www.youtube.com/watch?v=hriAMxCinhg[/url] | |
[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 … | |
Re: [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] | |
Re: Hi, please be more specific ... - Mitko Kostov |
The End.