Re: [PHP] Usng Session Vaiable in WHERE Statement

2004-07-26 Thread Chris Hayes
At 13:58 26-7-04, you wrote: Could someone please help me with my syntax here...? $MembersDataQry = SELECT * FROM MembersData WHERE UserID='$_SESSION['logname']'; I get an error on line 2 but can't seem to figure out what I've missed. 1. You have errors with the ' quote: you use it to wrap the

Re: [PHP] Help - GUI using PHP

2004-07-20 Thread Chris Hayes
A GUI having a drwable area and a button in a frame is required. The points colected by drawing in the drawable area needs to be stored in a datastructure in php. can we do this using php? If so for displaying graphics what should be done? This GUI has to be embedded in a browser and

Re: [PHP] Apache 2 and PHP for Production?

2004-07-19 Thread Chris Hayes
At 18:55 19-7-04, you wrote: I was wondering if there are already results from any benchmark that says Apache 2 and PHP are ready for production environments. Don't know about benchmarks don't bother with them, but we were using PHP and apache 2 on a production server and it just had too

Re: [PHP] clearing font tags

2004-06-28 Thread Chris Hayes
At 08:00 28-6-04, you wrote: Hi, Just wondering if there is a way in php to filter out FONT tags when inserting a record from a textarea so information appears with the standard defined CSS style on detail/result pages? Any help would be greatly appreciated You can use the striptags function to

Re: [PHP] Sending email with php

2004-06-16 Thread Chris Hayes
At 12:43 16-6-04, you wrote: Hi, How can i send email in php usig the smtp server? I'm looking for a tutorial or a good script. for what it's worth, i use the class from and try a google on [helo smtp php mail], loads of hits -- PHP General Mailing List ( To

Re: [PHP] extracting quoted text in string

2004-06-01 Thread Chris Hayes
At 14:43 1-6-04, you wrote: Hi, I would like to extract the quoted text from a string for example : the translation for beautiful is beau and wonderful is formidable I need to get 'beau' and 'formidable' strings into an array. Any idea?? I can go with strpos and substrings, but maybe there is

Re: [PHP] imagejpeg

2004-05-27 Thread Chris Hayes
At 15:10 27-5-04, you wrote: I'm trying to create thumbnails for my images and everything seems to work correctly except for trying to save them. I've tried outputting directly with imagejpeg($im) and that works, but when trying imagejpeg($im, new.jpeg) it does not create a new image in the

RE: [PHP] updating pdf

2004-05-13 Thread Chris Hayes
At 14:48 13-5-04, you wrote: [snip] Can you please tell me if you know something that could be used in php to do it freely. [/snip] Is everyone familiar with the search function on #Jay: ain't that the one that you have to pay for for commercial use? #Marc:

Re: [PHP] PHP-XML Parse Problem

2004-05-11 Thread Chris Hayes
At 13:44 11-5-04, you wrote: I wrote a script to parse an XML doc in straightforward PHP, but then decide to write it as objects but now I have a problem, that I hope someone with a little bit more experience can look at: Im at my wits end and would appreciate any help, im getting no errors as

Re: [PHP] Web based training

2004-05-11 Thread Chris Hayes
There are free suites such as Unfortunately Moodle does not allow automatic adding of courses when using safe mode, as it adds directories for new courses. At 16:23 11-5-04, you wrote: I have a client that is in the need of web based training software for their web site. Their

Re: [PHP] includes

2004-04-05 Thread Chris Hayes
At 16:47 5-4-04, you wrote: Hello all, I have a problem. My directory list is similar to this: root tmpl inc forums test_forum messages test_forum1 .messages My question is in the test_form and message forums. How do I do the include files to

Re: [PHP] Checking if a website is up?

2004-03-30 Thread Chris Hayes
I am trying to check if a website is up (reachable) and I have used the standard code below: [...] $socket = @fsockopen( $host, $port, $errno, $errstr, 30 ); if (!$socket) fwrite ($socket, HEAD .$documentpath. HTTP/1.0\r\nHost: $host\r\n\r\n); $http_response =

Re: [PHP] ereg_replace help

2004-03-18 Thread Chris Hayes
At 16:21 18-3-04, you wrote: I can do the reverse with: $output = ereg_replace('[[:alnum:]]', '', $string); Which will happily remove all alpha-numeric characters from $string! But I want it to remove anything but.. suggestions please? did you try $output = ereg_replace('[^[:alnum:]]', '',

Re: [PHP] catching URL#target params

2004-03-15 Thread Chris Hayes
but I haven't found any way to capture http://URL#target as one would use to jump to a certain location in a plain HTML file. When I try this in a PHP file and run phpinfo, I see nothing that includes that target. Is there a var that will work for me? usually this part of the URL is

Re: [PHP] catching URL#target params

2004-03-15 Thread Chris Hayes
At 15:00 15-3-04, Tom wrote: it could be done only by parsing $_SERVER['QUERY_STRING'] variable ... nay, the hash value is not there -- PHP General Mailing List ( To unsubscribe, visit:

Re: [PHP] Storing Arrays?

2004-02-24 Thread Chris Hayes
At 11:10 24-2-04, you wrote: Hi all, If I wanted to store an array for future use in a MySQL TEXT Column (dont ask, it's complicated... hehe!) how would I go about it? you could consider serialize() -- PHP General Mailing List ( To unsubscribe, visit:

Re: [PHP] newbie question

2004-02-24 Thread Chris Hayes
could it be that this is an old script that requires register_globals to be turned ON or so? if you can read Dutch, read At 12:25 24-2-04, you wrote: hi - i don't know much about php, but somehow i managed to install a simple php-guestbook on my

Re: [PHP] mail()

2004-02-16 Thread Chris Hayes
At 12:26 16-2-04, you wrote: Hi, I have a problem with mail() function. I'm using PHP with Windows 2000 Professional and Internet Information Server 5.0. My php code is: mail([EMAIL PROTECTED], Prueba Envio Email PHP, Linea 1\nLinea 2\nLinea 3); And my browser shows: Warning: mail(): SMTP server

Re: [PHP] How to access $_GET while using mod_rewrite

2004-02-16 Thread Chris Hayes
I am using mod_rewrite which makes it impossible to use the $_GET function. that depends... if you would translate the fake url to you are ready. Check the net for quite some examples. Here is

Re: [PHP] Googlebot (not another rtfm-mail)

2004-01-29 Thread Chris Hayes
At 17:58 28-1-04, you wrote: On Wed, Jan 28, 2004 at 11:51:06 -0500, Michael Mulligan wrote: Googlebot visits my site occasionally and follows a lot of my PHP links with long query strings... same here, google has been indexing my php site for over 3 years now :) I find the google site is NOT

Re: [PHP] Conditional code execution

2004-01-26 Thread Chris Hayes
At 17:03 26-1-04, you wrote: I'm sure how to frame the question. Here's the problem. I would like to store PHP code in a database. Then I would like to while-loop through the array executing the code something like this: ? while($RS=mysql_fetch_array($RR)) { execute $RS[php_code]; } ? This would

Re: [PHP] Is there a way to protect PHP's $_POST, $_GET when user tamper with post string in URL toolbox???

2004-01-07 Thread Chris Hayes
At 18:43 7-1-04, you wrote: Hi! I wanted to know is is there a way to configure PHP to make it not be affected when the web user tamper with the values in the post string after a webpage is submitted or something. (Further explanation below) I noticed when I use the hidden html input tag

Re: [PHP] PHP function for length of the array???

2004-01-06 Thread Chris Hayes
At 15:44 6-1-04, you wrote: Hi! Anyone know what is the php function for finding the length of the array? I haven't found the answer at . looking for the number of elements? -count($arrayname) -- PHP General Mailing List ( To

Re: [PHP] str_replace to ignore commas

2004-01-06 Thread Chris Hayes
At 15:29 6-1-04, you wrote: I'm trying to use str_replace to ignore sertain characters from a recordset field and it seems I am having difficulties with ignoring commas and carriage returns. I've gotten the following but when searching for, let's say, New York. When York is at the end of a

Re: [PHP] str_replace to ignore commas

2004-01-06 Thread Chris Hayes
At 15:58 6-1-04, you wrote: could the problem be that you explode on so the phrase 'New York', having a space, is split up? Could be. Some times the New is on one line and the York is on the next line. I need for it to explode no matter what. How would I do that? For instance the print_r for

Re: [PHP] I need a script for deleting mail from mail boxes...

2003-12-09 Thread Chris Hayes
At 16:08 9-12-03, you wrote: Hi All, I need to know how to write a script for deleting mail from a Linux server. It's more important to know what sort of mail it is. I suppose POP3 mail, so then look for the POP class of Manuel Lemos, i think on Essentially I need to be able to

Re: [PHP] Completely Daft Question

2003-12-03 Thread Chris Hayes
At 15:27 3-12-03, you wrote: I have written and applicaiton in VB (yuck but that's what the client wants) and part of the application involves importing and processing text files. For that I turned to php;-) for all its processing power as a shell script. Now here is the daft question. How

Re: [PHP] file uploads

2003-12-01 Thread Chris Hayes
PHP first gives the file a temporary name on a temporary location. This name is not the same as the name given in the upload form. I think the temp filename is in the $_FILES array too, do a print_r($_FILES) to check. Now, here's the strange bit, if I call my method and just use

Re: [PHP] how to retrieve data from a web page

2003-11-27 Thread Chris Hayes
At 14:30 27-11-03, you wrote: hi all, I've a situation, where i want to supply some data to my script, which is dynamic and is available on a web page. How can i fetch that particular data from a page, if there's a way... check the net for PHP and RSS-feeds. RSS is some sort of unified file

Re: [PHP] mysql_connect() : undefined function

2003-11-26 Thread Chris Hayes
At 14:57 26-11-03, you wrote: it says --without-mysql -- i don know .. how suddenly this can happen Binay Better find out who has replaced PHP on your server, or modified the config file of Apache (if you run Apache). - Original Message - From: Sophie Mattoug [EMAIL PROTECTED]

Re: [PHP] broken - comma missing

2003-11-24 Thread Chris Hayes
At 14:21 24-11-03, you wrote: Greetings, it's from : Parse error: parse error, expecting `')'' in /local/Web/sites/phpweb/include/ on line 29 Fatal error: Call to undefined function: make_image() in /local/Web/sites/phpweb/index.php on line 117 For in case the webmaster is

Re: [PHP] whaw

2003-11-24 Thread Chris Hayes
At 14:27 24-11-03, you wrote: pete M wrote: Even the pros systems crash sometimes webmaster says it is fixed now, just waiting for the mirrors to pick it up. -- PHP General Mailing List ( To unsubscribe, visit:

Re: [PHP] [Q] Development Best Practices

2003-11-18 Thread Chris Hayes
At 04:20 18-11-03, you wrote: Adam wrote: My question, how do you guys build your pages? Do your scripts generate all the HTML? I'm looking for tips and resources. Remember for my first site I've embarked on a fairly large site. Code maintenance will be an issue for me as I need to enhance and

Re: [PHP] Re: Alternet row colors

2003-11-17 Thread Chris Hayes
At 01:28 16-11-03, you wrote: It's so much easier to use the mod (%) operator: Ah, the alternating rowcolors. I have a proposal that's a lot lighter on your server. I prefer this as it does not require a calculation for each row (%2), and no counter (and no numrows call). I think it will be

Re: [PHP] fopen and preg_match

2003-11-17 Thread Chris Hayes
At 15:07 17-11-03, you wrote: Hi, I have a code that should fetch the information from another webpage. The code find's the page, but I can't make it stop on /table sign. preg_match(|tr class=\listRow2\td class=\listRow2\span class=\listIndex\1.+\\/table\|is, $buffer, $regs ); It probably

Re: [PHP] easy and simple way to read xml into array

2003-11-17 Thread Chris Hayes
At 15:47 17-11-03, you wrote: Hi! Need to read a xml-file into an array, but searching around I havent found a way that's easy and simpleĀ… Arent there an easy way in PHP to accomplish this? have you been at ? -- PHP General Mailing List ( To

Re: [PHP] Executing CRON from a WebForm..

2003-11-14 Thread Chris Hayes
At 22:52 14-11-2003, you wrote: Hi!!. I'm trying to give users the chance to modify its cron from a webform. The webform let's the users choose the day, month and minutes after hour, then, using PHP I made one long string and save it into a file ($tmpnam), it looks like this: $content =

Re: [PHP] Re: get some part of text

2003-11-14 Thread Chris Hayes
Could you please adjust your computer time or the timezone setting? Your mail arrives as if it was send tomorrow morning. Quite confusing when replies arrive at an earlier time and hard to follow this list. At 07:24 15-11-2003, you wrote: I can not understand very well, shoul I write something

Re: [PHP] After upload problem!!

2003-11-10 Thread Chris Hayes
At 11:17 10-11-03, you wrote: i have no problem in uploading my pictures, the problem that i have that after uploading it i can't move or copy the uploaded pictures and it gives me permession denied !! i guess thats because it gives permession only to the apache user, is there anyway i can

RE: [PHP] \n and br

2003-11-10 Thread Chris Hayes
\n is the code to write a new line, between double quotes. Actually it translates to a 0D or 0A code. If there is a 0D or 0A in a text or file (or normal text email) it works as a newline. If you look at the _source_ of your HTML file you will see it too. BR is the HTML code for new line.

Re: [PHP] resource handle - keeping alive?

2003-11-10 Thread Chris Hayes
At 16:09 10-11-03, you wrote: Here's a quick one: has anyone found a way to keep a resource handle alive between page loads? For example, I open a socket with fsockopen, and I'd like the handle to survive page loads. As you know, there's not much point storing it in a session (or its parent

Re: [PHP] explode () question

2003-11-10 Thread Chris Hayes
$rint1= rtrim($rintydata); echo $rint1; $rint2= explode(:, $rint1); The data starts like this (from and email, there are many) ; Time: November 9th 2003, 10:37AM - PST IP Address: Browser Type: Opera/7.20 (Windows NT 5.1; U) [en] Referer: The problem is that when I do

Re: [PHP] Building PHP source for Linux / Unix.

2003-11-05 Thread Chris Hayes
At 10:00 5-11-03, you wrote: Hi, I am a beginner to building PHP source code for Linux / Unix. I am looking for a document that takes me through a step-by-step guidelines of doing this. Can someone point to a link for this? did you find ? -- PHP

Re: [PHP] ms word problems again !!

2003-10-16 Thread Chris Hayes
At 18:16 15-10-03, you wrote: I'm trying to send the following header to force ms-word to open a html document header(Content-type: application/msword); header('Content-Disposition: attachment; filename=invoice.doc'); it works in Mozilla but NOT in IE.. any ideas as its driving me crazy.. I

Re: [PHP] Re: header() function for displaying an opened PDF document.

2003-10-14 Thread Chris Hayes
It might help to have a peek at how the php Pdf libraries are doing this (,, . There are a lot of things to worry about with pdf, not the least the fact that older acrobat readers will give plenty of errors when the page is not send fast enough

Re: [PHP] \n \t don't work!!!

2003-10-13 Thread Chris Hayes
At 13:22 13-10-03, you wrote: Guys, These codes are copied from the manual: * echo (this is the simplest, an SGML processing instruction\n); echo This spans multiple lines. The newlines will be output as well; echo This

Re: [PHP] mail() php in message

2003-10-12 Thread Chris Hayes
message of the mail. I know how the to put html in the message: $message = ' in stead of print td $gebruikerbooks /td; do $message .= td $gebruikerbooks /td; A little clarification: * Just instead of echoing it directly to the browser, add it to your variable $message. * $message.='bla'; is

Re: [PHP] phpjavascript live-clock

2003-10-07 Thread Chris Hayes
At 15:48 7-10-03, you wrote: hello, is it possible to show the live-clock from the server machine, using php and javascript, without having to make refresh of that page? That would be a 99% javascript job. Find an existing javascript that works. When the page is loaded let PHP feed the

[PHP] email attachment cannot be opened

2003-09-12 Thread Chris Hayes
hi, I've made a form to send out emails with attachments, and the attachments look ok when they arrive but the content is somehow bad. I cannot open gifs nor can word open the documents. Looking at the content something may be wrong with the encoding: if i open the GIF file the normal one as

Re: [PHP] email attachment cannot be opened (solved)

2003-09-12 Thread Chris Hayes
I found the culprit! I copied the filereading part without checking too good, and it had an addslashes call which ruined the file content very professionaly. -- PHP General Mailing List ( To unsubscribe, visit:

Re: [PHP] Mail() question

2003-09-09 Thread Chris Hayes
At 09:40 9-9-03, you wrote: On Tuesday 09 September 2003 08:12, Ryan A wrote: I am trying to create a new newsletter software as the ones i found on hotscripts were just not good enough or mucho $$ which i dont have :-( Please note that i I intend to add a kind of word merge functionality

Re: [PHP] Re: PHP and Apache

2003-09-09 Thread Chris Hayes
At 16:58 9-9-03, you wrote: Hi After installing Apache then PHP, i was told by php that apache wasnt configured, so i followed the instructions in the install.txt file. But everytime i view the files through the local host but i only see the written code, So how do i get this to work, assuming

Re: [PHP] Passing query parameter which has value ###

2003-09-08 Thread Chris Hayes
At 13:04 8-9-03, you wrote: I passed value main.php?name=$nameid=$idid1=$id1 to next page where $id has value ### In the next page I was not able to get the $id and $id1 values and I am able to get the two values $id1 and $name when I used main.php?name=$nameid1=$id1 What might be the problem?

Re: [PHP] syntax error using header and SID

2003-09-04 Thread Chris Hayes
At 18:33 4-9-03, you wrote: Hi all Can someone tell me what the correct syntax is to pass a Session ID via the header redirect is? Im trying: header( Location: page2.php??echo strip_tags (SID)? ) You are making a row of mistakes that suggest it is a good idea to read a bit on PHP syntax and how

Re: [PHP] first time using exec() - are getting parse error.

2003-08-17 Thread Chris Hayes
At 12:06 17-8-2003, you wrote: Hi, I'm trying to call mysqldump from within a php-script, like this: $backuptime = date(ymdHi); $backupfile = un . $backuptime . .txt; exec(mysqldump --opt -u$dbuser -p$dbpassword $dbdatabase $alltables /web/un/backup/$backupfile); It works fine on my local

[PHP] convert mysql datetime to unix timestamp

2003-07-28 Thread Chris Hayes (SENSE)
hi, i have to move data from a table with a datetime (2003-05-14 13:36:04) to a unix timestamp (e.g. 2147483647) . Any ideas? Chris -- PHP General Mailing List ( To unsubscribe, visit:

Re: [PHP] I need a PHP alternative to Windows Scheduled Tasks

2003-07-23 Thread Chris Hayes
At 11:13 23-7-03, you wrote: I have concluded that Bill Gates is Satan! um, what about moving to linux and use cron? But if you want to try it on satanic Windows: SINC ( can be used to start programmes but also to invoke PHP scripts. I was not so happy

[PHP] debug exhausted memory

2003-07-23 Thread Chris Hayes
dear php generalists, I must admit that i have a pretty heave cms. But now a pretty normal query leads to a memory exhausted (at 8MB) crash on the server, but not at home with the same database content. I tried setting the memory_limit even to 0.2 MB (and restarted apache) at home, but still no

Re: [PHP] Re: mail()

2003-07-22 Thread Chris Hayes
At 18:29 22-7-03, you wrote: [EMAIL PROTECTED] (Joshua Groboski) wrote in news:[EMAIL PROTECTED]: but I will get a relaying is denied because the target domain isn't the same domain I am connected to for eg. Why don't you send it to [EMAIL PROTECTED] I think as long as the $to address

Re: [PHP] Re: mail function

2003-07-21 Thread Chris Hayes
At 10:39 21-7-03, you wrote: I put this PHP script on web server: ?php if (mail([EMAIL PROTECTED], brati, peda, From: Peda)== TRUE) print(U redu je); else print(Greska); ? But It seems that mail function doesn't work. I don't get any e-mail. Can anyone tell me what is wrong. Does

Re: [PHP] File download by php header...

2003-07-21 Thread Chris Hayes
At 16:15 21-7-03, you wrote: Hi! I'm using PHP 4.3.2 and IIS 5.0. I'm using the PHP header to cause the webserver to download the file to the web browser. Some of the time it work and some of the other time, it doesnt. I haven't figured out why until I looked in the error log which showed

[PHP] checkbox: was it shown or not?

2003-07-17 Thread Chris Hayes (SENSE)
hi, if i understand well, a checkbox in a form is only send on to the next page when it is checked: so the next page will only see a value in $_POST['checkboxname'] if it is set: else it is not set. Right? So the followup page cannot see the difference between a form where the checkbox was not

Re: [PHP] checkbox: was it shown or not?

2003-07-17 Thread Chris Hayes (SENSE)
At 19:16 17-7-03, you wrote: you understand it correctly ok so i really have to add another kludgy workaround to my form class :/ but thanks for confirming! Chris - Original Message - From: Chris Hayes (SENSE) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 17, 2003 9:57

Re: [PHP] How to get executed php result in variable

2003-07-14 Thread Chris Hayes
At 11:31 14-7-03, you wrote: Dear All, I need to get results like this. ? $result = get_executed_php_file_contents.php ? I use: ob_start(); include('modules/file.php'); $result=ob_get_contents(); ob_end_clean(); -- PHP General

Re: [PHP] /etc/passwd

2003-07-10 Thread Chris Hayes
At 13:45 10-7-03, Marek wrote: Add a check for php files, or any other files you don't want anybody to include: if(ereg('php[0-9]$', $id)) goaway; but what about '?' and '#' additions? $id=however_they_would_find_out/your_path/file.php?extra=x#loc; ? so maybe if(ereg('\.php', $id)) ? --

Re: [PHP] too stupid to install php on windows

2003-07-10 Thread Chris Hayes
At 14:47 10-7-03, you wrote: NET HELPMSG 3534 So i asked google and i found and there the suggestion was made to put the path for the module between quotes. otherwise the space in for example /program files/ causes this error. example: change

Re: [PHP] mail() - how to attach file to the message???

2003-07-09 Thread Chris Hayes
this worked for me but i did some editing and censoring oso maybe a tiny bug got in. ///SETUP strings $subject='hi there, this is not a Viagra business proposal, '; $mailto = '[EMAIL PROTECTED],[EMAIL PROTECTED]';// for multiple recipients, use comma '[EMAIL PROTECTED],[EMAIL

Re: [PHP] Having problems with an IF statement, just doesn't make sense

2003-07-06 Thread Chris Hayes
At 19:18 7-7-2003, you wrote: I am using the following if statement ... if (isset($theme)) { print(Current theme is $theme); require content/header_$theme.php; } else { print($theme); require content/header.php; } now one would think that if it didn't return true that the else statement

RE: [PHP] Break, Exit, Die, Kill, Maime and Stab

2003-07-03 Thread Chris Hayes
At 14:35 3-7-2003, you wrote: -Original Message- From: Jeff Moser [mailto:[EMAIL PROTECTED] Sent: 03 July 2003 13:07 So...why not write the entire included file as a function and then call that function instead of using include? I'd be interested, though, to hear if the return

Re: [PHP] PHP to Excel Export

2003-07-03 Thread Chris Hayes
At 16:56 3-7-2003, you wrote: Hi Group, I am working on an app the creates an Excel file. Right now I am using the PEAR package Spreadsheet_Excel_Writer. It works great but I have one problem. I have a field greater then 255 to export and the PEAR package truncates anything over 255. Has anyone

Re: [PHP] ARGHHH!!! POST variable problem

2003-06-29 Thread Chris Hayes
At 22:38 29-6-2003, you wrote: I can click links and they work but when I enter data in a form and try to send it to the next php script to process the data, nothing happens. Is there a simple way I can see what is returning from the browser to see if what I expect is actually getting there?? I

Re: [PHP] Another newbie

2003-06-28 Thread Chris Hayes
At 22:10 28-6-2003, you wrote: I have been writing PHP for almost a year now and someone on phpfreaks told me the other day that my code was very sloppy. Some people can be pretty rude on the net, so don't take it too hard. Since I want to more more into programming than design, can anyone

Re: [PHP] twodimensional array / word-frequencylist

2003-06-26 Thread Chris Hayes
There may be faster ways, for instance using the regular expression function that returns an array of hits, and make the regexp look for 'words' in it with the \b option. But i will stick to your example code. My suggestions are not tested. while($myrow = mysql_fetch_row($result)) # as long as

Re: [PHP] twodimensional array / word-frequencylist

2003-06-26 Thread Chris Hayes
if (!isset($words[$word] $words[$word]=0; else $words[$word]++; } change the 0 to 1 of course. Anyway the function Jason suggested is probably faster. -- PHP General Mailing List ( To unsubscribe, visit:

Re: [PHP] Re: What's best, using a temp-file or a temp-table

2003-06-26 Thread Chris Hayes
At 17:36 26-6-03, you wrote: you could use a $_SESSION variable instead of file or when the data come in, you can put them into an array and pass on the array through a hidden form field. before putting it in the hidden field serialize the array and in the receiving page unserialize it.

Re: [PHP] Re: correct syntax

2003-06-25 Thread Chris Hayes
At 10:08 25-6-03, you wrote: Harry Wiens wrote: What would be the correct syntax? 1. $_SESSION[test] in this case test is a constant and must be defined by calling define(test, some_integer_value) before But PHP is extremely tolerant and if it cannot find a defined constant called test, or if

Re: [PHP] Please help !!!!!!!!!!!!!!!! (form)

2003-06-25 Thread Chris Hayes
Are you aware that since PHP 4.1.0 form vars only pass through as variables to the next page if you explicitly state in php.ini that you want that? Otherwise they are in $_GET or $_POST, depending on the form method. See 'new input mechanism' at for the why

Re: [PHP] Javascript and forms in PHP

2003-06-25 Thread Chris Hayes
At 14:55 25-6-03, you wrote: Is there a limitation in PHP with Javascript and forms? Your question shows you do not have a clear idea of what PHP does and where javascript comes in. Please do a Google on this combination. The short of it: PHP builds a HTML/javascript page and sends it to the

Re: [PHP] php.ini

2003-06-25 Thread Chris Hayes
At 16:51 25-6-03, you wrote: I am running a red hat 9 linux box with Apache 1.3.27 with PHP 4 what is the default location for the php.ini file can be somehere under /etc/ try to run whereis php.ini or maybe whereis php -- PHP General Mailing List ( To

Re: [PHP] Generating Message-ID when sending messages

2003-06-25 Thread Chris Hayes
At 00:10 26-6-2003, you wrote: I am trying to make it so that my PHP script generates it's own Message-ID's when sending mail through Sendmail. For some reason it is not working as I hoped. I have tried the mail() command by using: mail([EMAIL PROTECTED],Subject,message,Message-ID: [EMAIL

Re: [PHP] Re: Javascript in PHP

2003-06-24 Thread Chris Hayes
I missed the 1st post but could this be related to form name being 'crimetype' and the javascript tryin to access the form 'ctype' ? At 15:55 24-6-03, you wrote: i think you have to add \n after each row of java script code. $js .= }\n; afaik the ; handles that but indeed i would let the

Fwd: Re: [PHP] Re: Javascript in PHP

2003-06-24 Thread Chris Hayes
additionally, you named the fields WR PR and PFO while you refer to them as wr, pr and pfo. Date: Tue, 24 Jun 2003 16:04:17 +0200 To: [EMAIL PROTECTED], [EMAIL PROTECTED] From: Chris Hayes [EMAIL PROTECTED] Subject: Re: [PHP] Re: Javascript in PHP I missed the 1st post but could this be related

Re: [PHP] Send BCC mail with PHP

2003-06-24 Thread Chris Hayes
At 16:03 24-6-03, you wrote: Is there any way to send mail blind carbon copy via PHP? Or do I need to write some script that cycles through and sends a separate email for each individual? Im trying to write a script for personal use that allows me to send emails straight from my active desktop,

Re: [PHP] MSWord attachment with mail()

2003-06-24 Thread Chris Hayes
At 22:57 24-6-2003, you wrote: Dear list, What header must I use to send a MSWord attachment with mail()? I have looked it up in the manual and on but cannot find it. for a cvs file aimed at excel i use if (strstr($_SERVER[HTTP_USER_AGENT],MSIE 5.5)) {$att = ;} else {$att =

Re: [PHP] MSWord attachment with mail()

2003-06-24 Thread Chris Hayes
oops that was for downloading... but anyway, the application/msword is worth a try At 23:34 24-6-2003, you wrote: At 22:57 24-6-2003, you wrote: Dear list, What header must I use to send a MSWord attachment with mail()? I have looked it up in the manual and on but cannot find it. for a cvs

Re: [PHP] MSWord attachment with mail() (III)

2003-06-24 Thread Chris Hayes
throw file content in $filedata $filedata = chunk_split(base64_encode($filedata)); $type = application/octet-stream; $encoding = base64; mt_srand((double)microtime()*100); $boundary = '--b'.md5(uniqid(mt_rand())) . getmypid(); $mailbody = From: PHP backup script by

Re: [PHP] variable shortened in hidden fields?

2003-06-22 Thread Chris Hayes
At 15:23 22-6-2003, you wrote: Hello friends. I am passing a variable of two word like communications software from one form to the other. The variable passes as communications%20software . This is okay for some purpose, but not for the hidden text field that I want. The hidden text field gets

Re: [PHP] Problems with quotes in URL

2003-06-18 Thread Chris Hayes
IN a mysql db, I would have a name like :[ whatever whatever ] I do a select on the table and then echo the name on a page, as well as add it to a url: page.php?myvar=$myvar where $myvar contains the [ whatever whatever ] Now, when I try to echo $myvar on the page.php, I don't get the entire

Re: [PHP] Problems with quotes in URL

2003-06-18 Thread Chris Hayes
(cutted the part about sending a var as get) page.php?my_var=whatever+whatever++%5C%22whatever+whatever%5C%22next_var=blabla ok so here the variable is still complete, including slashes and quotes. And now, on page.php If I do an echo stripslashes($my_var); I get exactly this: whatever

Re: [PHP] Install

2003-06-18 Thread Chris Hayes
At 14:39 18-6-03, you wrote: Hi, i tried installing mysql-4.1.0-alpha, apache, php4.3.2 on windows2000Pro. now the issue is that i have all the 3 application running and interacting with each other in sync but every time i try to connect to mysql through php it gives me this error: Warning:

Re: [PHP] Re: Difference between $_POST[foo] and $_POST['foo']?

2003-06-17 Thread Chris Hayes
At 12:42 17-6-03, you wrote: the first will generate a warning if warnings are enabled. it could mean a constant or a string, if a constant with that name is not available php will use it as a string and show a warning. the second is right as a string. in addition to that. In your example the

Re: [PHP] Form Elements - user adding dynamically

2003-06-17 Thread Chris Hayes
At 15:04 17-6-03, you wrote: I'm constructing an HTML form (via PHP) in which I want the user to be able to add or delete elements as needed. For instance, in a page detailing user information, the user might have one phone or several. Rather than having a set number of slots for phone

Re: [PHP] Re: Difference between $_POST[foo] and $_POST['foo']?

2003-06-17 Thread Chris Hayes
At 16:19 17-6-03, you wrote: $sql = 'select * from db where apple = \'' . $_POST['foo'] . '\';'; Like that? you missed some quotes: $sql = 'select * from db where apple = \''' . $_POST['foo'] . '\''; A side question along with this ,,, how can I include $_POST['foo'] in the : $sql =select

Re: [PHP] Re: Difference between $_POST[foo] and $_POST['foo']?

2003-06-17 Thread Chris Hayes
At 16:37 17-6-03, you wrote: On Tue, 2003-06-17 at 09:09, nabil wrote: A side question along with this ,,, how can I include $_POST['foo'] in the : $sql =select * from db where apple = '$_POST['foo']' ; without getting an error ?? should I append it as $var= $_POST['foo']; before???

Re: [PHP] delete files from a directory

2003-06-17 Thread Chris Hayes
At 16:42 17-6-03, you wrote: Hi, i need to delete all the files that are stored in a dir.i had try with this and nothing happen... passthru (del $path_adjuntos.$idprod/*.* /q); 1) This function should be used in place of

Re: [PHP] phpMyAdmin to output CSV to excel (including fieldnames)

2003-06-16 Thread Chris Hayes
At 21:33 16-6-2003, you wrote: I see all the options in phpMyAdmin for CSV/excel output but I can't get it to export the fieldnames, headers as well. It'd be nice to have it automatically do that into excel so the output is easier to follow and provide to someone else. Am I just missing the option

Re: [PHP] referer counter (scope part)

2003-06-12 Thread Chris Hayes
At 11:29 12-6-03, you wrote: function ref($url) { $this-incr($pc,$fp,$nc); $this-write($nc,$cfile); } function incr($pc,$fp,$nc) { if($pc != )

Re: [PHP] Re: Vars inside an sql query [Regular expression question]

2003-06-12 Thread Chris Hayes
At 13:54 12-6-03, you wrote: I got a headache doing this, i need to get vars inside an sql query. For example : $query = select * FROM `table` where id='$value' order by name; preg_match_all(/^('\$(.*)')/si, $query,$matches); That doesn't work as the new string already is like select * FROM

Re: [PHP] Easier way to delete all entries in an array?

2003-06-12 Thread Chris Hayes
At 16:13 12-6-03, you wrote: There's got to be an easier way, is there? for ($i=0; $i count($the_array); $i++){ array_pop($the_array); } $the_array=array(); ? -- PHP General Mailing List ( To unsubscribe, visit:

Re: [PHP] check is pop address

2003-06-11 Thread Chris Hayes
At 17:06 10-6-03, you wrote: Hi there, I was wondering whether someone could tell me whether it is possible to use PHP to check whether a user supplied email address is a pop address as opposed to a web based address like hotmail. Have done some searching but cant seem to turn any answers up.

  1   2   3   4   >