[PHP] upload problems
Hi ! You asked for the code ... Here you go : html body form action=?global $PHP_SELF; echo $PHP_SELF? method=POST ENCTYPE=multipart/form-data table tr tdSelect File:/td td:/td tdinput type=file name=userfile/td /tr tr tdnbsp;/td tdnbsp;/td tdinput type=submit value=Upload/td /tr /table /form ?php //the code is not finished due to those problems ... //when I proceed with the submit button, I get white screen (nothing at all)! print_r ($HTTP_POST_VARS); global $userfile; global $userfile_name; $dir = \upload; $temp = \temp; $twhere = $temp . / . $userfile_name; $where = $dir . / . $userfile_name; rename($userfile, $temp/$userfile_name); copy(twhere, $where); unlink($twhere); echo OK: File \$userfile_name\ uploaded succesfully; ? /body /html Thanks Nikola -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] file upload troubles
Hi ! I'm having terrible troubles with the file upload program I need. I have read a couple of tutorials and studied the examples in the manual, but it won't work. Every tutorial I read worked with variables $usrefile, $userfile_name etc. When I copy the same example code , I get the error msg. that $usefile_name is unkown. I'd also like to know what does enctype=\multipart/form-data\ mean and what is its function. Thanks Nikola -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] table troubles
Hi ! I'm making a web site which allows user to add his own news, or other data to the page via the form. The user inputs the data into the textarea and the data is placed into a table. The problem is that all the text is placed into a single line ! Is there a html catch to prevent this, or I'll have to break the string into the smaller parts ? This is not so good, because of the screen resolution ... Help !!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] table troubles
Hi ! I'm making a web site which allows user to add his own news, or other data to the page via the form. The user inputs the data into the textarea and the data is placed into a table. The problem is that all the text is placed into a single line ! Is there a html catch to prevent this, or I'll have to break the string into the smaller parts ? This is not so good, because of the screen resolution ... Help !!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] random numbers help
Hi ! I'm having troubles with the random numbers. When I create a number witm mt_rand() I always get the same number on my local server. I need this stuff to ranomly display some text, and I'd like to have another value of the random number each time the page is refreshed. Thanks Nikola -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] mail problem (reading mail from a pop3 server)
Hi ! I would like to add an option for reading e-mail from the pop3 server to my site. Is this possible at all ? Thanks Nikola -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] chmod trouble
Hi ! What chmod value gives the read-only premission to the file ? (777 is the read-write) Thanks Nikola -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] file reading and textarea problem
Hi ! I'm having a problem with the following : I have a log file on my site, that records date, time and the user's system. Each entry is placed in a new line. Now, I can only read the first line with fgets($filename, 4096). Is there another function, or the 4096 number should be changed in order to let me read the whole file. Thanks Nikola -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php and java problem
Hi ! I was able to determine the user's screen resolution, but I'd like to let php know that(the next page loaded should be in the right resolution, I'd like to pass a value to php, but I don't know how). Thanx Nikola -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php and java problem
Hi ! I was able to determine the user's screen resolution, but I'd like to let php know that(the next page loaded should be in the right resolution, I'd like to pass a value to php, but I don't know how). Thanx Nikola -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] writting into a text file
Hi ! I was wondering if it is possible to replace standard radio and submit buttons with images. In case of radio buttons that should look like swap image(the image that presents the selected item is swaped) for the selected item, and smth like link image for submit buttons... I think that escaping from standard form look and feel can improve the site layout ... Thanks Nikola -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] include question
Hi ! I'm using include() function to print html code nested in a function in the included file when a link is selected. I was wondering if the whole php file that is included gets loaded, or the server just sends the code from desired finction? Can I put more than one function full of html code in one file without fear that each time user will have to wait for the whole php to load ? exp: if(){ include(file.php)//is the whole file.php loaded, or just the function() ? function_with_html_code_in_it(); } Thanks Nikola -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] dynamic menu possible?
Whell, you could use that php script for getting file names and put links toward those files in a layer, which can be controled with java. If you are not a java expert, you can do it with macromedia dreamweaver + extensions. I don't know java, but I made a layer based site at http://www.okspartak.f2s.com/moj/ The best thing is that extensions are free ! If you are not sure in the number of files, you can use those ext. to make a scrollable meny, which can be a very attractive detail. Cheers Nikola 9/16/01 4:24:22 PM, LRW [EMAIL PROTECTED] wrote: Hi all. I was wondering if a situation I'll describe below is possible. If it is, I'm hoping someone could point me to the topics I would need to study to learn how to do it. I hate to say that right now I don't have the time to read the Manual or any books cover-to-cover to figure it out...but I do want to learn how to do things on my own. So if someone could just tell me what the items I'd need to study are called, I'd really appreciate it. What I want to do is have a drop-down menu where the options are files located in a folder on the server that changes as items are added to or removed. Then the user can select an item from the menu, submit, and that page will load. Did that make sense? So I have 1.htm and 2.htm and 3.htm in a folder. A selectable menu reads the folder and lists those three files as options. The user can click on it and submit and that page will load. And if I add 4.htm, the menu will add that to the drop down on its own. That that's not possible, how close can I get to something like that? An example of something close to that I found on www.megatokyo.com . They have a dropdown menu where a user selects an item and gets sent to that page. A URL from one attempts shows as http://www.megatokyo.com/index.php?date=2001-09-04 . How is that done? Again, if I could just be pointed to the related PHP concepts I'll take it from there. Thanks! Liam www.celticbear.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] form handling problem
Hi ! I have a form form target = ?php echo $PHP_SELF ?; METHOD = get Is there a way to open PHP_SELF in the same window, not in the new one ? Thanks Nikola -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] meta redirect explanation
Hi ! Thanks for the quick answer. It works, but I was curious what does the number before the adress mean. META http-equiv=refresh content=??0??;url=file.php Thanks Nikola 9/16/01 4:08:08 AM, Gavin [EMAIL PROTECTED] wrote: Yes, this HTML line will redirect the browser to the php page.. META http-equiv=refresh content=0;url=file.php Gavin Nikola Veber [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] radio button help
Hi ! I know that this may be not the right place for this question, bu anyway: The radiobutton tag looks like this: input type=radio name=radiobutton value=radiobutton How am I suposed to handle multiple buttons(what should I change, name or the value?) My point here is: Does the buttons with the same name return defined values for one variable(the $name of selected button = its value), or buttons with different names should have a boolean value , 0 or 1, depends on weather they have been selected or not($name1 = 0, $name2 = 0, $name3 = 1, vhere name3 is selected) ? Thanks Nikola -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] redirect to php problem
Hi ! I'm having a problem with following : I'd like to activate a php file as a home page, but without pointing directly to it(http://www.smth.com/file.php). I'd like to know if it is possible to call it from a html file(index.htm for exp. ) Thanks Nikola -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] big problems , help !!!
I am working on a web-site which has a bunch of layers and a java script which controls their appearance. That means that I have the whole site in one html. The problem appeared when I tried to put php code inside a DIV tag. In that case only that layer was visible. I don't know weather php and java has problems working together. You can see the original page without php on http://www.okspartak.f2s.com/moj/ Php's role would be to show the tme from the last update and the passsword input for private zone of the site. Thanks in advance Nikola -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] big problems , help !!!
I found the only difference between your script and mine in table tag, but even when I changed it, the problem remained. I am using DW, but I'm not a java programmer, and scripts are generated by extensions for dw. That's why I don't have a clue what's happening. Another thing ... I have noticed that when I convert the same code to html and call it trogh web server (xitami), it makes problems, but if I open it as a local file, it works ok(html). If I convert it back to php, it makes problems in both options (file:// ald http://). I am totaly confused... 9/14/01 1:02:03 PM, Aniceto Lopez [EMAIL PROTECTED] wrote: Nikola: I've been working this way and it's working good. you are using Dreamweaver I guess and I just use a text editor not a HTML wysiwyg writer so no unnecesary code in my web pages and total control style type=text/css #news {position:relative; left:0; top:0; width:505; height:180; overflow:hidden; clip:rect(0,510,180,0); visibility:hidden} /style div id=news table ?php code to show info from db ? /table /div Ani Lopez www.laMundial.net download and spread our music -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] html formating trouble
I'm having trouble with formating the html output. I have the black background, and in function function javni(){ echo font color=#FFovo je javna strana /font ; } I get the parse error in the last function line. If I remove the font tag, it works ok, but the text is black as well. body bgcolor=#00 text=#ff is the first html body line. What should I do ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] newby : MySql
Can anyone tell me of a good tutorial on configuring mysql on win98, or explain what steps should I take in order to make it work. I have downloaded win. version of mysql and installed it. How am I suposed to access mysql databases from php script, and is there any need to configure my server (xitami local webserver)? Thanx Nikola Veber -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] dates problem
I'm having a prowith determing a time interval. I need to find out how many seconds, minutes, days have passed since a cpecific date (1.1.1980.), but when I pass that dade to a time stamp , I get 1983.315529200. How am I suposed to handle the year (1983.) o there is smething else ? I think the only way to do this is to make the time stamp for the interval between now and the specific date. thanx Nikola Veber -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] code troble
Hi I'm having trobles with this code. Can you take a look at it? Parse error: parse error in C:/XITAMI/webpages/index.php on line 34 is the error msg. thanx html head titleExample 2.01/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head body ?php if (emty(provera)) {pokazi();} else {obrada();} ? ?php function pokazi() { global $PHP_SELF; ? form target = ?php echo $PHP_SELF ?; METHOD = get input type = text name = ime input type = text name = vrednost input type =hidden name = provera value = rezultati /form ?php } ? ?php function obrada() { global $ime; global $vrednost; if ($ime == Nikola $vrednost == 100){ echo Zdravo $ime br; echo Iznos na Vasem racunu je $vrednost dolara; } ? /body /html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] beginner code help
Hi ! Can anyone tell me why this line returns the parse error if (strstr($name, firstname) or strstr($ime, lastname)){ } With this line I'd like to determine if string $name , which contains both first and last name, has earlier defined first and last name, with no difference of the order(name is first, surname last or oposite). Can anyone tell me how to compare string values in non-case sensitive way(with no difference between upper and lower case characters Name == name) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] book help
Hi ! As I wrote earlier, I am a begginer in php and I don't have much experience in other programming languages. I have bought the PHP developer's cookbook and , just as I was told, I have read on-line tutorials for beginners(I read as many as I could find), but I still find this book rather difficult. Can anyone who has this book suggest what chapters should I read first or which topics on php are the most apropriate for a beginner. My only php resources are internet and this book. Thanx! Nikola -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] book help
I am a begginer in php and I have bought the Sterling Huges' php developer's cookbook since it was the only book I could find. Is it a good choise ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] newby: forms problem
hi In order to process a form, do I need a cgi script and if not, how am I suposed to do that (how to pass a field value into a $variable, or there is another method)? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] literature help
Hi I wish to learn php, but I was wondering if there is a better resource( something like a guide) besides the php manual on php.net ? Thanx Nikola -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] help !
I'm sorry I have to ask these stuff, but I havent found anything like this in the manual. I am running win98 with properly insalled xitami web server with php support (I ran installshield). Any way, I cant figure out hov to make a smple program with echo command, because I don't know where to place the code. I am using opera 5.12 as my default browser, and Macromedia Dreamweaver as the html editor. Maybe there is an option in Dreamweaver , but I couldn't find it in it's documentation Please help ! Nikola Veber -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] help again
I am having big troubles here. I wrote this code just as it said in the manual, and it prints {$beer}'s taste is great;? html head titlePHP Test/title /head body ?php $beer = 'Heineken'; echo h1{$beer}'s taste is great/h1; ? /body /html and if I don't put string into h1 it prints nothing ! I'm kind of confused right now ... (win98, opera 5.12, php installed with installShield) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] help again
The code of your's print's the following : $beer's taste is great;? I'm not sure if there could be a problen in configuring PHP, since the only thing I have done was making html page containing this code. 8/31/01 6:42:02 PM, Andrey Hristov [EMAIL PROTECTED] wrote: html head titlePHP Test/title /head body ?php $beer = 'Heineken'; echo h1$beer's taste is great/h1; ? /body /html Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS - Original Message - From: Nikola Veber [EMAIL PROTECTED] To: php forum [EMAIL PROTECTED] Sent: Friday, August 31, 2001 7:38 PM Subject: [PHP] help again I am having big troubles here. I wrote this code just as it said in the manual, and it prints {$beer}'s taste is great;? html head titlePHP Test/title /head body ?php $beer = 'Heineken'; echo h1{$beer}'s taste is great/h1; ? /body /html and if I don't put string into h1 it prints nothing ! I'm kind of confused right now ... (win98, opera 5.12, php installed with installShield) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] xitami problems
I know I'm stepping on your nerv, but I can't process any pages, although xitami is properly installed, and has php direction in filters option. I am using opera 5.12 as my browser, and even when I read files trough the local server, I can't process the code... I tried reinstalling PHP with the instShield, but no use Help ! Nikola -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] begginer needs help
I have been doing some amateur web-design by now, but I decided to learn something like php. I was wondering if there is a way to test php code without a server(on local computer). Thanx in advance Nikola Veber -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]