[PHP] How to completly remove a file?

2001-03-07 Thread Jan Grafström
Hi! When I run this PHP my file idb.xml returns empty but how do I do if I then whant to remove the file idb.xml. I just doesnt want it empty, I want it to disappeare.? ? $fp = fopen("idb.xml", "w"); fclose ($fp); ? Thanks for help. Jan -- PHP General Mailing List (http://www.php.net/) To

[PHP] Can You get a file unlinked after one month?

2001-03-25 Thread Jan Grafström
Hi! I wonder if it is possible to delete a file using unlink and a time function. I wont the file to be automtically unlinked after a month. I am very thankful for any help. Regards Jan Grafstrom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

[PHP] login without database

2001-03-30 Thread Jan Grafström
Hi! Can I use php to make a login system for users? I dont have a databas on my server. I only want to have a few users. When I send variables to php the string is always cached by IE5.5 and its very easy to se the username and password if you look i cache. Is there a way to get this done only on

Re: [PHP] login without database

2001-03-30 Thread Jan Grafström
Thank You Romeo! This may be something I can use. Regards Jan Romeo Manzur wrote: You can do this: require('acces.inc.php'); if ( (!isset($PHP_AUTH_USER)) || ! (($PHP_AUTH_USER == $st_LOGIN) ( $PHP_AUTH_PW == "$st_PASSWORD" )) ) { header("WWW-Authenticate: Basic entrer=\"Admin

[PHP] How to send a mail in html format

2001-04-01 Thread Jan Grafström
Hi! Can I add something in this string to get a htmlpage sent as mail? mail($recipient,$subject,$corps,"From: $admail\nReply-To:$admail\nX-Mailer: PHP/"); Thanks in advance. Regards Jan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

[PHP] session question

2001-04-02 Thread Jan Grafström
Hi! I am trying to learn about sessions and set up this file, ? session_start(); $fillista = "fillista.xml"; session_register("SID"."fillista"); $SID = date("Y F j H:i:s"); print "SID=".$SID; ? This seams not to work on the file fillista.xml, I can still read it afterwords in IE:s cache.

[PHP] Can php read and than print file like it is

2001-04-02 Thread Jan Grafström
Hi! I have a file with text on 17 rows and when I let php read it ,get filezise and than print I only get the first row. I want all rows exatly like it is in the file, is it possible? My file: html head title/title /head body some rows here /body /html Thanks in advance for all help I can

[PHP] Sessions php and flash5, cookies disabled

2001-12-25 Thread Jan Grafström
%3D193a33f9b7421c17302d1bd58478b20bvar3=1. = has changed to %3D. and php does not recognice the session. part of code on mypage.php3: form action=\http://myserver.com/second.php3?\; method=\get\ input type=\hidden\ name=\SID\ value=\.SID.\ Thanks for any help. -- Jan Grafström Lillemans Hus AB Sweden 46 (0)611

Re: [PHP] Sessions php and flash5, cookies disabled

2001-12-25 Thread Jan Grafström
the string Regards, Jan Brian Clark [EMAIL PROTECTED] skrev i meddelandet 20011225165631.GF8638@ganymede">news:20011225165631.GF8638@ganymede... * Jan Grafström ([EMAIL PROTECTED]) [Dec 25. 2001 10:41]: The url string looks like this on php-page (sent from flash5): mypage.php3?SID=P

[PHP] page3 will not work

2001-12-26 Thread Jan Grafström
: nopermission.htm); } ? htmlhead/headbody p?echo $namn;? /body/html Thanks for any help. Regards, Jan -- Jan Grafström Lillemans Hus AB Sweden 46 (0)611-60920 46 (0)70-6409073 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

[PHP] Change column in mysgl

2002-01-15 Thread Jan Grafström
Hi! Can I change this column adress VARCHAR(25) to adress VARCHAR(40) afterwards. I use mysql. Thanks for any help Regards, Jan -- Jan Grafström Lillemans Hus AB Bredsäter 2091 87010 Älandsbro 0611-60920 070-6409073 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail

[PHP] Create Image on the fly

2002-01-17 Thread Jan Grafström
); ImageString ($im, 3, 10, 20, Some text.., $text_color); ImagePng ($im); //this doesn´t work echo img src=\$im\ width=240 height=80; ? Thanks in advance. -- Regards Jan Grafström Lillemans Hus AB Bredsäter 2091 87010 Älandsbro 0611-60920 070-6409073 -- PHP General Mailing List (http

Re: [PHP] Create Image on the fly

2002-01-17 Thread Jan Grafström
Thanks Val! Now I understand. Jan Val Petruchek [EMAIL PROTECTED] skrev i meddelandet 000801c19f4a$49862950$[EMAIL PROTECTED]">news:000801c19f4a$49862950$[EMAIL PROTECTED]... in index.html you write img src=aaa.php in aaa.php you write ?php $im = @ImageCreate (240, 80) or die

[PHP] Protect your code

2002-01-21 Thread Jan Grafström
($im, $textsize, $left, 5, $text, $black); ImagePng ($im); ? -- Jan Grafström Lillemans Hus AB Bredsäter 2091 87010 Älandsbro 0611-60920 070-6409073 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

[PHP] Store array into mysql?

2002-02-14 Thread Jan Grafström
commaseparated or like and than insert that string? Thanks in advance. Regards, Jan Grafström -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] get out of frameset?

2002-02-25 Thread Jan Grafström
in advance. -- Regards, Jan Grafström Bredsäter 2091 87010 Älandsbro Sweden -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Can mysql add qty directly?

2002-02-27 Thread Jan Grafström
on soldqty or is there an easyer way? Thanks in advance. -- Regards, Jan Grafström Härnösand Sweden -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] sessions and netscape 6.2

2002-03-08 Thread Jan Grafström
in a new window. I worked around this setting target=_top in all links. Now I wonder if there is any other way solving this problem? Thanks in advance. -- Regards Jan Grafström 87010 Älandsbro Sweden -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

[PHP] Re: Finding variable names in strings, and replacing with values?

2002-03-08 Thread Jan Grafström
Hi Nick! http://www.php.net/manual/en/function.str-replace.php Regards, Jan Nick Richardson [EMAIL PROTECTED] skrev i meddelandet [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Been working on this one for quite awhile, and it's probably a fairly easy solution, but i can't find it... so thought

[PHP] Re: just a link in php email

2002-03-08 Thread Jan Grafström
Hi Andrea! I use this. $message=a href=\http://www.sever.com\;link/a; $message = stripcslashes($message); $headers .= Return-Path: [EMAIL PROTECTED]\n; $headers .= Reply-To:$admail\n; $headers .= From: $admail\n; $headers .= X-Mailer: PHP\n; $headers .= Content-Type: text/html;

[PHP] Netscape 6.2 session problem?

2002-03-11 Thread Jan Grafström
/a Thanks for any help. -- Regards Jan Grafström Minisoft Sweden Bredsäter 2091 87010 Älandsbro 0611-60920 070-6409073 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Somebody knows about SecureLink?

2002-03-15 Thread Jan Grafström
, 443, 80 SecureLink.SetContentServer www.webshop.com, 80,/webshop/ SecureLink.SetKeyFileName c:/programs/securelink/secrets/flat_o.kf SecureLink.SetOfrFileName c:/programs/securelink/osl40.ofr SecureLink.SetApplStoreID 00 SecureLink.SetApplMiofferName shopingcart End sub /SCRIPT -- Regards, Jan

[PHP] How do I make tab spaces in a mail?

2002-03-19 Thread Jan Grafström
, $message, $headers); How do I write to get the tab spaces? -- Regards Jan Grafström sweden -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Can I get back a deleted row from mysql?

2002-06-06 Thread Jan Grafström
Hi, I wonder if you can get back or view the deleted data in a delted row in mysql? DELETE FROM $table WHERE id=$id I used the above code to delete. Thanks for any help. -- Regards, Jan Grafström Sweden -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

[PHP] ssl security question

2002-06-08 Thread Jan Grafström
? If a hacker sniff the ssl-string can he send that string and start the file anyway? -- Regards, Jan Grafström Sweden -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] File extension inc?

2001-10-03 Thread Jan Grafström
Hi! How does server handle the .inc extension and for what do I use it ? Where can I read about it? Thanks in advace Jan Grafström -- 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

[PHP] Thanks Jason

2001-10-03 Thread Jan Grafström
Regards Jan Jason Stechschulte wrote: On Wed, Oct 03, 2001 at 02:13:54PM +0200, Jan Grafström wrote: How does server handle the .inc extension and for what do I use it ? Where can I read about it? This depends on the setup of the web server. On some servers, it is set up to be parsed

[PHP] Re: User authentication?

2001-11-04 Thread Jan Grafström
Hi Daniel! Phpbuilder have some articles with examples under security. http://www.phpbuilder.com/columns/ Regards Jan Grafstrom Lillemans Hus AB Sweden Daniel alsén [EMAIL PROTECTED] skrev i meddelandet [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, do aonyone know of any comprehensive

[PHP] Re: .inc files

2001-11-04 Thread Jan Grafström
Hi Rudi! Check out this example from Hotscripts. http://www.hotscripts.com/cgi-bin/dload.cgi?ID=12367 Regards Jan Grafstrom Rudi Ahlers [EMAIL PROTECTED] skrev i meddelandet 008401c16534$dcb77580$0c00a8c0@camelot">news:008401c16534$dcb77580$0c00a8c0@camelot... Hi I was wondering, is there a

[PHP] copy image from database

2001-12-08 Thread Jan Grafström
= @MYSQL_RESULT($result,0,bin_data); echo $image; $destfile=image.jpg; copy($image,$destfile) - Thanks for any help Regards, Jan -- Jan Grafström Lillemans Hus AB Sweden 46 (0)611-60920 46 (0)70-6409073 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED

[PHP] error with php 4.1

2001-12-11 Thread Jan Grafström
401 Unauthorized); echo Access in-autorizado...; exit; } It worked well under PHP 4.04. Anbody knows why? Thanks in advance for any help. Regards, Jan -- Jan Grafström Lillemans Hus AB Sweden 46 (0)611-60920 46 (0)70-6409073 -- PHP General Mailing List (http://www.php.net/) To unsubscribe

[PHP] for and emailmessage

2001-09-02 Thread Jan Grafström
Hi! I have this file and it doesen´t write my tablerows: $message .= table $message .= trtdbVarunamn/b/td/tr; $i = 0; $ii = count($vn); for ($i=0;$i$ii;$i++) { $message .= trtd.$vn[i]./td/tr; } $message .= trtdbSum/b/td/tr; $message .= /table; I am trying to build a htmlmail but how do I write

[PHP] How to list 2-6 in while script?

2001-09-11 Thread Jan Grafström
Hi! I have this script and wonder how to change it to get it list only number 2 to number 6 and not each? while (list ($key,$val) = each ($headers)) { print pb.$val./b/p; } Thanks in advance. Regards Jan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

[PHP] Stop if word is found?

2001-05-08 Thread Jan Grafström
Hi! I am searching some files for a word and if word is found I will stop the script. I tried with die, but I have never used it before and it didn´t work perhaps I used it in a wrong way.. $fd = fopen($filename1, r); $string = fread($fd, filesize($filename1)); $fruits = explode ( , $string);

[PHP] php and xml

2001-02-13 Thread Jan Grafström
Hi! I have this php: $message = ereg_replace("\r","", $message); $message = "med$message/mednam$name/namadr$adress/adrtel$tele/tel"; $fp = fopen (basename($PHP_SELF) . ".comment", "a"); fwrite ($fp, $message); fclose ($fp); There must be something wrong in first line beacause the value of message

[PHP] cache problem

2001-02-16 Thread Jan Grafström
Hi! I have this php answer on the request sent from flash5 to serverside php-file: records=8score0=14name0=jannamed0=hej4date0=16:11:32score1=13name1=jannamed1=hej3date1=16:06:52score2=12name2=jannamed2=hej2date2=16:06:42score3=11name3=jannamed3=hejdate3=16:06:31score4=10name4=Jannamed4=hej

[PHP] How to get new row on top?

2001-02-17 Thread Jan Grafström
Hi! I have this code: $message = ereg_replace("\r\n\r\n", "\nP", $message); And the new rows are placed under the old ones. I want to change so the old messages get placed under is that possible? Thanks for help. Jan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail:

Re: [PHP] How to get new row on top?

2001-02-17 Thread Jan Grafström
Hi Mukul! Thanks for the answers. My server has php4.04 and there is no difference after I put in fseek. The output in the .comment-file i still sorted with latest message at the end. Regards Jan Mukul Sabharwal wrote: if ($message) { /* uncomment the next two lines to strip out html

[PHP] php flash and textfile in chatapp.

2001-02-17 Thread Jan Grafström
Hi! I am trying to build a flashchat and got problems with browser cache. Every 2 sec flash send these variables to server loadVariablesNum ("http://www.myserver.com/eget9.php3?name=" add name add "...) and gets the answer from server. All files are cached by IE5.5 and looks like this:

[PHP] trying to get xml-file

2001-02-19 Thread Jan Grafström
Hi! I have this PHP: - $message = ereg_replace("\r","", $message); $message = "listmed$message/mednam$name/namemail$email/emailadr$adress/adrtel$telefon/tel/list"; $fp = fopen (basename($PHP_SELF) . ".xml", "a"); fwrite ($fp, $message); fclose ($fp); -- I want to getbokat the beginning

[PHP] unlik by sending variabel?

2001-02-20 Thread Jan Grafström
Hi! I am trying to get a file deleted when I send a variabel with the value "delete". I have this file: - $message = ereg_replace("\r","", $message); $message = "listmed$message/mednam$name/nam/list; $fp = fopen (basename($PHP_SELF) . ".xml", "a"); fwrite ($fp, $string); fclose ($fp); -

[PHP] Can you make a file empty?

2001-02-20 Thread Jan Grafström
Hi! I am trying to delete all text in a file. $yourfile = "file.txt"; $fp = fopen($yourfile,w) "is there any good code to put in here?" fclose($fp); Thanks for any help. Regards Jan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

[PHP] Adding new data at beginning.

2001-02-22 Thread Jan Grafström
Hi! I am trying to put in a new data at the beginning of a file. I have started like this; $yourfile = "test.xml"; (abcdef/c this is the file.) $fp = fopen ($yourfile, r); $message = array(1 = 'a', 'b', 'c', 'd', 'e', 'f', '/c'); Here I need some code to get the output look like

[PHP] problem with php-ftp ftpbuf?

2001-04-04 Thread Jan Grafström
Hi! I tryed the ftp script found in php manual. I got this errormessage: --- Warning: Unable to find ftpbuf 0 in /home/myName/public_html/sess/ftpfile.php3 on line 6 --- What does ftpbuf mean? Thanks for any help. Regards Jan -- PHP General Mailing List (http://www.php.net/) To

[PHP] How to don´t write if exist

2001-04-05 Thread Jan Grafström
Hi! I want php to check if a word already exist and then dont write it to the file. This is my file list.txt: car, cat, dog, ... and my php which need some more function: -- $fp = fopen("list.txt", "a"); $string = "$word".","." "; fwrite ($fp, $string); fclose ($fp); --- I want to add: If

[PHP] Array of words in textfile?

2001-04-05 Thread Jan Grafström
Hi! I want to read a textfile (cat, dog, rat,) and get it like this: $namesArray = array("cat,", "dog,", "rat,"); If I can do this than I can go on and make changes in my array. Like the examples in php manual. Thanks in advance for any tips. Regards Jan -- PHP General Mailing List

[PHP] php search xml-file

2001-04-09 Thread Jan Grafström
Hi! I have this xml: list varacar/vara bskrford/bskr price3600/price nr/nr /list - and this php: $filename = "list.xml"; $fp = fopen($filename, "r"); $string = fread($fp, filesize($filename)); $string = strip_tags($string); $refined_string = explode(" ", $string); if

[PHP] problem search in array

2001-05-03 Thread Jan Grafström
Hi! This file will not work for me. I have tried in several ways and I want it to print Got word if it find $word. $filename = test.xml; $fp = fopen($filename, r); $string = fread($fp, filesize($filename)); $string = strip_tags($string); $refined_string = explode( , $string); if (in_array

[PHP] Can php give me row number?

2001-05-06 Thread Jan Grafström
Hi! First I wan´t to thank those kind guys who helped me with the search for words in a string. It works fine and here goes my file: --- $fd = fopen($filename1, r); $string = fread($fd, filesize($filename1)); fclose($fd); if (eregi($word, $string)) { print found the word; } - Now I also

[PHP] can I mail unlimited in one click?

2002-12-16 Thread Jan Grafström
Hi, I wonder if I can mail 300 customers in one click? part of script: while($listrow = mysql_fetch_array($listresult)) { $recipient = $listrow[epost]; $subject = $subj; $message = $mess; $headers .= From: $admail\n; $headers .= Reply-To: $admail\n; $headers .=

[PHP] backslash t

2003-01-22 Thread Jan Grafström
Hi, I want php to print \tab but when I do, I only get ab as output. How do I keep the \t? Thanks in advance. Jan Grafström -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Can't pass query string from HTML to PHP

2003-06-20 Thread Jan Grafström
Hi Robby, try to add this line to your php-file: $name=$_GET['name'] ; change to: ?php $name=$_GET['name'] ; echo Welcome, . $name.!; ? Good luck! Jan Robby Ku [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] Hi, I've got a problem passing a query string from a HTML file to a PHP

[PHP] Re: really simple problem with GET

2003-03-12 Thread Jan Grafström
Try ...test.php?test=0 //no $ before test= /Jan Kelvin Poon [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] .ca... Hi, I am sorry if the level of this question is too simple but I can't figure out what's wrong. I want to pass a variable value through the URL using the Get

[PHP] Re: Multiple values per variable

2003-03-12 Thread Jan Grafström
user1 abc $user1_array=array(); array_push($user1_array, a,b,c); //check user_array $cat=; for ($i=0;$icount($user1_array);$i++) { $cat .= $user1_array[$i]; } echo user1 .$cat; /Jan Erich Kolb [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] I am working on some logic where users

[PHP] Re: replace string in array

2003-03-16 Thread Jan Grafström
Chris, you can splice an array http://www.php.net/manual/sv/function.array-splice.php Jan Grafstrom Chris Winters [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] I'm having a bit of trouble... I have an array that consists of a string like this:

[PHP] Warning: Failed to write session data ?

2002-10-16 Thread Jan Grafström
of this frame loaded from another server. I have my mainsite on one server and shopsite on another. Thanks in advance for any help. -- Regards, Jan Grafström Sweden -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] mysql row num, offset?

2003-11-24 Thread Jan Grafström
Hi, can I get the rownumber (offset) from mysql? After I have made a select I want to generate an update query wich works for any table. Thanks in advance for any help. Jan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP, MySQL problem

2004-01-14 Thread Jan Grafström
Hi Add records with this code. ?php $name=isset($_POST['name']) ? $_POST['name'] :''; $address=isset($_POST['address']) ? $_POST['address'] :''; if (!empty($name)) { mysql_connect($server,$user,$pass) or die (Error conecting); mysql_select_db($dbnamn,$conection) or die (no db .$dbnamn); $query =