[PHP] ? PHP in XML document

2005-08-14 Thread Labunski
Hello, Is it possible to write some PHP code lines in the XML document? e.g. I want to add ?php require_once(read_database.php); ? to the xml document, but I don't know the right syntax to do this. Btw, I need this, cause I'm trying to make CMS system for Flash page. Thanks a lot! Roman --

[PHP] Re: Unique user?

2005-08-19 Thread Labunski
Simply ad some info to the Cookies (including date and time). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] .htaccess - change index.php to index.abc

2006-06-03 Thread Labunski
Hello, What should I change in .htaccess, so that visitors will see index.abc instead of index.php. I just wanna hide file's extension. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Function Overloading

2005-12-17 Thread Labunski
PHP does not support function overloading. So, is there any other way of getting a number of parameters(variables) passed to a function? aka. function fruits($apple, $banana, $kiwi, $grape){ #should (somehow) output 4 } OK. if it was an array, than I could use count($array), but now I'm

Re: [PHP] Function Overloading

2005-12-18 Thread Labunski
Thank you very much. This is exactly what I wanted to do. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] ? Split string into smaller chunks

2005-12-19 Thread Labunski
I need to split a long string into smaler chunks (an array), as a separator using every third \n (and not just every \n). I could use 'explode', but then it would produce too many chunks. Thank you in advance! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] [Problem] - reading file

2006-02-06 Thread Labunski
Hello, The problem is, that script outputs Last line from the file (and not first line, as expected)! 4 hours spent seeking for mistake. Hopeless. The script should read all the filenames in the directory, then open each file to read first line from file and output this line.

Re: [PHP] Window close.

2006-02-06 Thread Labunski
It can'tbe done with PHP, cause it must be client side script, aka Javascript: javascript: window.close(); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] How to Get URL?

2005-03-13 Thread Labunski
How to get url of the page the php script is on? In other words, I want to know whether I'm in page news.php or in posts.php, or in some other page. Is there any simple way to get tis info? Thanks, Lab. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Is the syntax correct?

2005-04-12 Thread Labunski
Is the syntax correct? (in connection with $order) : switch ($page) { case news: $order = DESC break; case articles: $order = ASC break; } mysql_query( SELECT * FROM data ORDER BY id $order ); Sorry for my bad english, Lab. -- PHP General Mailing List (http://www.php.net/)

[PHP] Re: Simple Problem

2005-04-12 Thread Labunski
I'm not sure, but I just know that if you need to select the information from two tables (and not just from one), you should use JOIN syntax ( http://dev.mysql.com/doc/mysql/en/join.html ) Hope this helps, Lab. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: Simple Problem

2005-04-12 Thread Labunski
I'm not sure, but I just know that if you need to select the information from two tables (and not just from one), you should use JOIN syntax ( http://dev.mysql.com/doc/mysql/en/join.html ) Hope this helps, Lab. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Defined constant in mysql_query - Question.

2005-04-12 Thread Labunski
Hi, Can I use Constant in mysql query like this: define(LANG, eng); mysql_query(SELECT * FROM data WHERE col = 'articles' ORDER BY subjectLANG); Thanks a LOT, Lab. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Creating a Directory

2005-04-12 Thread Labunski
I think you could use php function mkdir() to do this. mkdir(/path/to/my/upload_dir, 0777); But unfortunately there is big BUT aka Safe_mode. To use this mkdir() function, you have to disable the Safe_mode on the server :( Note: When safe mode is enabled, PHP checks whether the directory in

[PHP] Re: trying to send mail via localhost

2005-04-16 Thread Labunski
Hi, Unless I'm mistaken, it's cause of bad SMTP address in your php.ini file, and so (if you haven't installed SMTP server on your PC), you have to set the SMTP line in your php.ini file to your internet provider's smtp address. For example, I'm on Windows and my internet provider's smtp address

[PHP] Is it possible to get the whole address (including http:// ) ?

2005-04-21 Thread Labunski
Hello, I know for example how to get http vars or basename, but this time I need to get the whole address, including http:// . Is it possible? Thanks in advance, Lab. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Strange problem with picture Upload

2005-04-23 Thread Labunski
Hi guys, I have to say, I've written so many scripts that had file upload functions included, but this time something strange is happening. The script passes the IMAGE_TYPE check, and picture's name stores in the database (so I guess the picture should have been stored in the dir.), but when I

[PHP] Problem with switch ($to)..

2003-12-26 Thread Labunski
Hello, thanks in advice and Merry Christmas! I'm a newbie in PHP, so I can't imagine how to add the Part 1 to the Part 2.. /// Part 1 switch ($to) { case roman: $to = $address; break; case none: // here should go the Part 2, but I don't know how! break; } /// Part 2

[PHP] Printing out html

2003-12-27 Thread Labunski
Hello, I have just entered PHP world and I have many questions. I have already made PHP script that send's htm form values via e-mail. Now I want to build PHP based web page.. 1.question For example I have index.php file, but I want HTML (index.html) file to be printed out. How php code should

[PHP] Simple question

2003-12-28 Thread Labunski
Hello, I have only one simple question.. I'm using this method to get the values from the text box: if(isset($_POST[Submit]) $_POST[Submit]==Submit) { $add = $_POST['textbox'] ; } But I don't know how to write the source for this: If the value from the textbox ($add) is Hello then.. do

[PHP] Adding Text to .txt file

2004-01-19 Thread Labunski
Hello, I've lost the name of the function I found in php.net some time ago. This function was able to write the text line at the end of the text file. Can you tell me the name of this function? Lab. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: Adding Text to .txt file

2004-01-19 Thread Labunski
And this function was differs from fopen(myFile.txt, a); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] HELP! printing Arrays

2004-03-03 Thread Labunski
Hello, // This will print first and sixth line from the text file: $file = file(people.txt); print $file[0]br; print $file[6]br; // But how to print all the lines from [0] to [6] ? // Hope you understood my problem. Thank you very much, sorry for my bad english, Lab. -- PHP General Mailing

Re: [PHP] HELP! printing Arrays

2004-03-03 Thread Labunski
Thanks! It was very useful! Lab. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] HELP! printing Arrays

2004-03-03 Thread Labunski
Your script is working perfectly, thanks for teaching me! Lab. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] How to convert Function into the variable?

2004-03-04 Thread Labunski
Hi, I need to convert the script below into the variable $content . How to do this? I need this because I want to have an output of this function anywhere where the $content is. if ($action==people){ function output() { $file = file(people.txt); foreach($file as $value ){ print $valuebr;} }

[PHP] How to write this correctly?

2004-03-06 Thread Labunski
// or example I have some link: a href='index.php?action=people'About people/a // so this function will output the content of people.txt file: if ($action==people){ function output() { $file = file(data/people.txt); foreach($file as $value ) { $output .= $valuebr; }

[PHP] str_replace problem

2004-03-17 Thread Labunski
Probleema sekojosha: Shiim koda rindinjaam buutu jaanolasa IP adrese no temp.txt faila, tad ieksh log.txt faila jaasameklee identiska IP adrese (taada pati kaa temp.txt failaa) un jaaizdzçð taa no log.txt faila. Itkaa jau vienkaarshi, BET tas skripts nedarbojas :( The problem is that str_replace

[PHP] Small Problem - could you help me, please?

2004-03-17 Thread Labunski
I have a small problem with the script - could you hepl me, please? I made small kicking system for those who tried to guess the Login information. The script below is just a part of the code, but it's not working properly. I tried to solve this problem in many ways, but I couldn't. This script

Re: [PHP] Small Problem - could you help me, please?

2004-03-17 Thread Labunski
Thank you very much, it's working fine. Lab. Jason Giangrande [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Labunski wrote: | $ip = getenv (REMOTE_ADDR); | | function kick() { | $file_ip = file(log.txt); | foreach

[PHP] How to LogOut ?

2004-03-18 Thread Labunski
I made Login page using http auth method ($PHP_AUTH_USER), and it's workong fine. But how to LogOut user? Thanks for all the answers. Lab. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] ? Sub Directories

2004-03-24 Thread Labunski
This script reads the content of the directory and turns it into the array. The problem is, that this script reads the names of the subdirectories in this directory too! if ($directory = opendir('data/start')) { while (false !== ($faila_nos = readdir($directory))) { if ($faila_nos != .

[PHP] \n is not working!

2004-04-04 Thread Labunski
\n isn't working properly. Why do this line $new_topic = $post_0.'|'.$post_1.'|'.'$post_2\n'; writes to the document one|two|three\n but not one|two|three (and break) whole code: if ($a==new){ $post_0 = $_POST[one]; $post_1 = $_POST[two]; $post_2 = $_POST[three]; if ($post_1 !=){ if

[PHP] How to Request?

2004-04-06 Thread Labunski
I'll try to explain.. For example I have a link: index.php?fd=car then the Request part looks like this: if(isset($_REQUEST['fd'])){ $dir = ($_REQUEST['fd']); } But for example I have a link index.php?fd=carc=green.. How to Request more then one variable if I want to get something like this:

[PHP] Why $a +1 is not 02 ??

2004-11-23 Thread Labunski
Hello, I have small problem.. $a = 01; echo $a+1; //this will display 2, instead of 02. How to get 02? thanks. Lab. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Align pic

2004-12-29 Thread Labunski
Sorry for posting this here, but this is only newsgroup I'm using, and I can't solve simple HTML problem. yeah, it's funny, but still.. ;) I need to center image on the blank screen without using javascript. - so I wrote: table width=100% height=100% tr td width=100% height=100% align=center

[PHP] Problem with WHILE using MYSQL database

2005-01-08 Thread Labunski
Hi, this script output's data from the database.. $data = mysql_query(SELECT * FROM firt_table WHERE cat='sweaters' ORDER BY `id` ASC ) or die(can't find DB!); while($line = mysql_fetch_array($data)){ echo' trtd width=225 height=19'.$line['product'].'/td/tr'; } for example, there are 3 records

[PHP] How? First big letter

2004-06-25 Thread Labunski
Hello, how to make the firs letter of the word Big? for example I have: $colour = car is red; but I need: $colour = Car is big. Thank you very much, I would look for the answer myself using google, but I have no time for it. I hope there is an easy solution for this. Lab. -- PHP General

Re: [PHP] How? First big letter

2004-06-25 Thread Labunski
Thank you very much! That helps! As I sad before, I would look for it myself , but I wasn't sleepinng all the night, this way I think it would be a liittle bit difficult to find it. Thank you once more, Lab. Miguel J. Jiménez wrote in message news:[EMAIL PROTECTED] Use ucfirst() Labunski

[PHP] Problems with array_reverse!

2004-08-10 Thread Labunski
Hello, First of all, I should apologize for my bad English, and I hope somebody will understand what I was trying to say.. So, the problem is, that I can't SORT or REVERSE the array. By the way, sorry for this awful and very long php script. And I know that many of you guys can make it look

[PHP] How to understand this Warning?

2004-08-17 Thread Labunski
Hello, How to understand this warning? I thought maybe the directory name is incorrect, but it's fine. The Browser said.. Warning: readdir(): 2 is not a valid Directory resource in C:\xxx\x\news.php no line 78. ?php if ($handle = opendir('news')) { $sortArray=array(); while (false !==

[PHP] Re: How to understand this Warning?

2004-08-17 Thread Labunski
Hi, note the 2 in that message. You are prob. resetting the readdir() parameter in the script somewhere No, as far as I can see, I'm not resetting the readdir().. but.. You loop twice throu the same dir? Yes I do. Here is whole script: ?php if ($handle = opendir('news')) {