[PHP] mail() function problem
Dear All, I have a little problem with mail() function, PHP Code: -- mail($email, Membership ok, $themsg, From: [EMAIL PROTECTED]\r\n); mail([EMAIL PROTECTED], , , From: $email\r\n); -- Why does the second mail() function did not ever send the email to yahoogroups? I wonder, can the mail() function be put in a loop structure (that traverse an array of emails) and send all emails successfully? Thanks for your advice, Daniel --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/02 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Ridding myself of HTML tags
have a look at peg_replace in the man, you could also get your users to save as filtered html which get rid of some of it, there's also a MS tool Microsoft Office HTML Filter 2 that will clean it some more, it says it's for word 2000 but it works fine for word 2002/XP. but your best option is to use preg_replace to swap out all the smart tags etc. Paul Roberts http://www.paul-roberts.com [EMAIL PROTECTED] - Original Message - From: DL Neil [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, August 31, 2002 12:02 AM Subject: Re: [PHP] Ridding myself of HTML tags Liam, If you were to stristr()/remove everything up to and including the /head tag, would that take care of things? =dn I've got a lil problem with HTML tags. Here's the description. My site accepts HTML files by upload. A lot of these files are written in MS Word and then saved as HTML files from that. MS Word likes to put a bunch of garbage at the beginning of the file. Now, when users upload their HTML files, my script goes and striptags all of the unnecessary junk in there except it can't rid all this junk (HTML, XML, CSS, JavaScript) at the beginning of the HTML file. Some of these tags span multiple lines, and my script goes through line-by-line, so it won't identify these as tags. Is there a simpler fashion? I don't need the junk about style sheeting and stuff, because I have a style sheet that will take care of styling the files the way they should be. I don't want the extra tags, even though they're invisible to users when they web-view, because these are e-mailable files (for HTML mail, it's fine; for text mail, I need to strip it down and that's the problem). = Just in case, I've included the HTML code below: html xmlns:o=urn:schemas-microsoft-com:office:office xmlns:w=urn:schemas-microsoft-com:office:word xmlns=http://www.w3.org/TR/REC-html40; head meta http-equiv=Content-Type content=text/html; charset=windows-1252 meta name=ProgId content=Word.Document meta name=Generator content=Microsoft Word 10 meta name=Originator content=Microsoft Word 10 link rel=File-List href=NW100_files/filelist.xml titleTest test test/title !--[if gte mso 9]xml o:DocumentProperties o:AuthorLiam Gibbs/o:Author o:LastAuthorLiam Gibbs/o:LastAuthor o:Revision1/o:Revision o:TotalTime1/o:TotalTime o:Created2002-08-30T18:09:00Z/o:Created o:LastSaved2002-08-30T18:10:00Z/o:LastSaved o:Pages1/o:Pages o:Words13/o:Words o:Characters79/o:Characters o:CompanySXIA/o:Company o:Lines1/o:Lines o:Paragraphs1/o:Paragraphs o:CharactersWithSpaces91/o:CharactersWithSpaces o:Version10.3501/o:Version /o:DocumentProperties /xml![endif]--!--[if gte mso 9]xml w:WordDocument w:SpellingStateClean/w:SpellingState w:GrammarStateClean/w:GrammarState w:Compatibility w:BreakWrappedTables/ w:SnapToGridInCell/ w:WrapTextWithPunct/ w:UseAsianBreakRules/ /w:Compatibility w:BrowserLevelMicrosoftInternetExplorer4/w:BrowserLevel /w:WordDocument /xml![endif]-- style !-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:Times New Roman; mso-fareast-font-family:Times New Roman;} span.SpellE {mso-style-name:; mso-spl-e:yes;} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:35.4pt; mso-footer-margin:35.4pt; mso-paper-source:0;} div.Section1 {page:Section1;} -- /style !--[if gte mso 10] style /* Style Definitions */ table.MsoNormalTable {mso-style-name:Table Normal; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:Times New Roman;} /style ![endif]-- /head body lang=EN-US style='tab-interval:36.0pt' div class=Section1 p class=MsoNormalTest span class=SpellEtest/span span class=SpellEtest/span/p p class=MsoNormal align=center style='text-align:center'span class=SpellEFdjfkasdjfkla/span/p p class=MsoNormal align=center style='text-align:center'span class=SpellEb style='mso-bidi-font-weight:normal'Fdjkslafjdklaf/b/span/p p class=MsoNormal style='text-align:justify'o:pnbsp;/o:p/p p class=MsoNormal style='text-align:justify'span class=SpellEFdasfdfasffasdfdaadfdfs/span/p p class=MsoNormal style='text-align:justify'span class=SpellEDfsdfs/span/p p class=MsoNormal style='text-align:justify'Hi/p p class=MsoNormal style='text-align:justify'o:pnbsp;/o:p/p p class=MsoNormal style='text-align:justify'span
Re: [PHP] few things...
comments inline - Original Message - From: Matt Zur [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, August 31, 2002 4:40 AM Subject: [PHP] few things... First of all... I'm a bit confused is there really a difference between echo and print? They seem to do the same thing? As far as anyone is concerned they do the same... Check the archives for MANY MANY past discusions Also... I have trouble searching for these things in the docs: A Call Function to emulate a browser and contact a remote host? For example... to load in a piece of text from another web site? fopen? here is a quick snip from the user comments $page= join ('', file ('www.yahoo.com')); that basically loads all the HTML at Yahoo.com into the varible $page... neat huh :) Hidden fuction. For example lets say I have a form with 10 variables. Is there a function where I can do something like: hidden($var1,$var2,$var3) etc etc so it will write this: input type=hidden name=var1name value=var1value input type=hidden name=var2name value=var2value input type=hidden name=var2name value=var2value PHP doesn't really write HTML for you, thats your job... so a function or a simple loop could do this... for ($i=0; $i3; $i++) echo input type='hidden' name='$$var[$i]' value='$var[$i]'; Thanks for the help! No problems :) Andrew PHP Toolbar for Homesite v5.0 - http://zurnet.com/dl/hsphptb/ Version 1.5 Coming Soon!!! -- Matt Zur [EMAIL PROTECTED] http://www.zurnet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() function problem
I think mailing list managers like Yahoo, ezmlm, etc all have features in them to suspect bots and programs from subscribing/posting to the groups. I know I've had trouble subscribing/posting to groups managed by ezmlm... Probably there is a header or two that PHP automatically sets which makes the mailing lists suspicious... or something!! I don't know enough about email to really come up with an answer!!! You could try setting some headers similar to what your email client sets, to see if it's something missing... or try sending yourself an email from a php script and analysing the headers it sets. It could also be the lack of a return address or something similar that throws the lists off too. Justin on 31/08/02 6:32 PM, Akhmad D. Sembiring ([EMAIL PROTECTED]) wrote: Dear All, I have a little problem with mail() function, PHP Code: -- mail($email, Membership ok, $themsg, From: [EMAIL PROTECTED]\r\n); mail([EMAIL PROTECTED], , , From: $email\r\n); -- Why does the second mail() function did not ever send the email to yahoogroups? I wonder, can the mail() function be put in a loop structure (that traverse an array of emails) and send all emails successfully? Thanks for your advice, Daniel --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/02 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mail() function problem
Most mailing lists reject mail if the Subject is blank. That would probably explain why your subjectless 2nd example is disappearing into the void. Dave -Original Message- From: Justin French [mailto:[EMAIL PROTECTED]] Sent: Saturday, August 31, 2002 3:20 AM To: Akhmad D. Sembiring; [EMAIL PROTECTED] Subject: Re: [PHP] mail() function problem I think mailing list managers like Yahoo, ezmlm, etc all have features in them to suspect bots and programs from subscribing/posting to the groups. I know I've had trouble subscribing/posting to groups managed by ezmlm... Probably there is a header or two that PHP automatically sets which makes the mailing lists suspicious... or something!! I don't know enough about email to really come up with an answer!!! You could try setting some headers similar to what your email client sets, to see if it's something missing... or try sending yourself an email from a php script and analysing the headers it sets. It could also be the lack of a return address or something similar that throws the lists off too. Justin on 31/08/02 6:32 PM, Akhmad D. Sembiring ([EMAIL PROTECTED]) wrote: Dear All, I have a little problem with mail() function, PHP Code: -- mail($email, Membership ok, $themsg, From: [EMAIL PROTECTED]\r\n); mail([EMAIL PROTECTED], , , From: $email\r\n); -- Why does the second mail() function did not ever send the email to yahoogroups? I wonder, can the mail() function be put in a loop structure (that traverse an array of emails) and send all emails successfully? Thanks for your advice, Daniel --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/02 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php and gnupg problems.
Richard, Thanks for the reply. 'top' shows that the script is being run as nobody. the '2' stuff allow the password to be passed as a file descriptor and I think it is this that is breaking. I have setup a nobody directory just for this. I then set the HOME variable to point to this directory. If on command line, I su to nobody, setup the enviroment variable HOME, GNUPGHOME etc then run the php script command line it runs perfectly. The problem seems to be that when running from apache, it can't handle the 2 bit. If I set up a test key with no password, then I can run the script perfectly (ie I don't need to pass the password-fd bit.) If I use exec, I get the same results. I'll add the implode bits and try that. Regards, Jon On Saturday 31 Aug 2002 01:06 am, Richard Lynch wrote: Hi, Appologies if this comes through twice. I tried to post it via goolg groups but it didn't seem to work. If I run the following script from within apache, then the script fails and returns $error=2 ?php $data=this is a test; $GNUPGHOME=/home/nobody/.gnupg; putenv(GNUPGHOME=$GNUPGHOME); $HOME=/home/nobody/; putenv(HOME=$HOME); system (echo '$data' |/usr/bin/gpg -vv --clearsign -u testing -o /home/httpd/html/nic/output --passphrase-fd 2 2/home/httpd/html/nic/test,$error); print $error; ? . I've seen quite a lot on the web about this suggesting that it's a permissions problem. However, If I add #!/usr/bin/php to the top of the script and make it executable, then su to 'nobody' (which appache runs as) then the script runs perfectly from the command line - so I think that the permissions are all OK. Any ideas where I'm going wrong? Does ?php phpinfo();? really and truly say that PHP is running as 'nobody'? Is there really a nobody directory? I think part of the point of using nobody is that they shouldn't even *have* a directory in the first place... If the .gnupg files/directories all involved are owned by 'nobody' anyway, make them world readable and writable. It's not all that different at that point anyway, since anybody would write a PHP script running as 'nobody' to read/write them. Is /home/httpd/html/nic/output really world-writable?... Scary. I don't claim to understand that 2 ...test crap, but I'm guessing you're trying to re-direct errors somewhere? Try taking that out for now, use exec() instead of system() and see what output you actually get: exec($command, $result, $error); echo implode(, $result); You may be a lead from that on where things are breaking. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Submit form from javascript code
Hi all I need submit a form from javascript code. My code near this code: !-- My Code -- form name=myform action=... method=POST input type=hidden name=id value=0 /form script language=javascript function submitform(iId) { document.myform.elements['id'].value=iId; document.myform.submit(); alert(foo); // This is code is dummy retrun false; } /script a href=... onMouseDown=submitform(1);Id One/abr a href=... onMouseDown=submitform(2);Id Two/abr a href=... onMouseDown=submitform(1000);Id 1000/abr !-- End My Code -- If I remove alert() call in submitform function, this code noting work, but if i used alert() or confirm() function this code working, Why? How can i remove alert() function and my code work? Thanks for Answer Madjid Nasiri [EMAIL PROTECTED] http://www.kawacomputer.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] calling sql results inoto variables
The silly me, I had an exit; inside the for loop and I was wondering why id only looped once, somebody slap me! - Victor www.argilent.com -Original Message- From: Victor [mailto:[EMAIL PROTECTED]] Sent: Saturday, August 31, 2002 7:52 AM To: [EMAIL PROTECTED] Subject: [PHP] calling sql results inoto variables I'm trying to go about doing this: While there is data in an array, get and echo individual pieces from this array and execute a mysql query that gets the other info in the table where arraypiece. Stop when all arraypice have been echoed. The array gets its values from and checkbox form. I got that part: input type=checkbox name=check[] value='.$ID.' So I count the number of times there is something in $check, which I think is done like so: for($i = 0; $i sizeof($check); $i++) { echo $i; } that should give me the number of checboxes clicked. (it does, I verified) so, now I say: for($i = 0; $i sizeof($check); $i++) { # echo $i; echo 'p'; $data = $check[$i]; echo $data; which brings me to getting the rest of the data from the tables (the array I was talking about holds the ID) (aka the key) but I still need to put the key in the door. Ok, so no I would need to loop a mysql query for as long as there is data in the array, - since I only have one key for each row. Let me try to write it: for($i = 0; $i sizeof($check); $i++) { # echo $i; echo 'p'; $data = $check[$i]; #echo $data; mysql_query(SELECT * FROM table WHERE ID = '$data'); $db_ID = $row[ID]; $db_picture_name = $row[picture_name]; echo $db_ID; echo $db_picture_name; } Now, this should do the trick, let's test it ... testing ... Nope, mysql can't execute that query... Hmmm... I get this could not execute queryYou have an error in your SQL syntax near 'table WHERE ID = '1'' at line 1 no shit! I actually don't have a table called table! Fixed that, testing could not execute queryNo Database Selected ok, let's do that. (I've been up all nigh what do you want!) ok, now what?! I get NOTHING! NOTHING! WHHHT! I tried hardcoding the $ID, nothing, so that must be ok, as we have proved earlier, By this time I ended up with this code: for($i = 0; $i sizeof($check); $i++) { # echo $i; echo 'p'; $data = $check[$i]; #echo $data; mysql_query(SELECT * FROM kodak_user_pictures WHERE ID = '1') or die ('could not execute query '.mysql_error()); $db_ID = $row[ID]; $db_picture_name = $row[picture_name]; echo $db_ID; echo $db_picture_name; } of course it gives me nothing! What the hell is $row? Ok, let's fix that. for($i = 0; $i sizeof($check); $i++) { # echo $i; echo 'p'; $data = $check[$i]; #echo $data; $db_data = mysql_query(SELECT * FROM kodak_user_pictures WHERE ID = '1'); $row = mysql_fetch_array(db_data); $db_ID = $row[ID]; $db_picture_name = $row[picture_name]; echo $db_ID; echo $db_picture_name; } now I get this... I'm also getting tired... Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource STUPID $ SIGN! (look near db_data, nope, the second one!) Ok, let's test ... Ok, good, let's switch the hardcoded 1 from the query back to the $data... Testing ... Ok, now it only gets one... Let's try a for each for($i = 0; $i sizeof($check); $i++) { # echo $i; echo 'p'; $data = $check[$i]; #echo $data; foreach ($data as $check[$i]) { $db_data = mysql_query(SELECT * FROM kodak_user_pictures WHERE ID = '$data'); $row = mysql_fetch_array($db_data); $db_ID = $row[ID]; $db_picture_name = $row[picture_name]; echo $db_ID; echo $db_picture_name; } } Warning: Invalid argument supplied for foreach() Ok... Not better, but let's see... Ok, now I ende up with this code: for($i = 0; $i sizeof($check); $i++) { # echo $i; echo 'p'; $data = $check[$i]; $db_data = (SELECT * FROM mytable WHERE ID = '$check[$i]'); $row = mysql_query($db_data); # $row = mysql_fetch_array($db_data); $db_ID = $row[ID]; $db_picture_name = $row[picture_name]; echo $db_ID; echo $db_picture_name; #echo $data; } I don';t know what to do, I get nothing, I think the error is that I do not know how to call the mysql query results into the variables fro echoing, please I beg you someone tell me. - Victor www.argilent.com __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: command line argument vs. urlencode ?
\+ does not work too, php treat command line arguments as a POST/GET , so I should urlencode/urldecode, I would like to know if there is a alway to turn this behavior off. Thanks any way. Renato Richard Lynch wrote: Any one know why the + (plus sign) is not passed as argument to $argv when calling a php script from linux shell ? php test.php 123 xxx+ Best guess is + is a special character in the shell, so you need: php test.php 123 xxx+ Or maybe even so far as: php test.php 123 xxx\+ You'd have to read man sh to be 100% sure why + is special. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Script Execution via URL
Hi everybody, i wrote a script which will be executed by HREF's. If a command is going to be executed by a click on a link the page reloads itself and jumps in the part of the script, which should be executed. Normaly I wrote some like this for doing this: echo 'a href='.$PHP_SELF.'?action=deleteid='.$arrResult['id'].' class=text01'; but now in a very special case i forgot to write $PHP_SELF like this a href=?action=deleteid='.$arrResult['id'].' class=text01 without knowing that I have forgotten to write this $PHP_SELF thing I clicked on the Link and i did execute the Script, like i wanted it to. Is it normal that it works so fine? Can I use this everytime I link on the same page for script execusion? Can I send Forms via an PHP Function like the submit() statement in Javascript? Have a nice day, and please answer. Sascha Braun
[PHP] newest entry in db
How can I use php to get the newest entry from mysql database? Ie, if I make a timestamp and then I want to retrieve the last timestamp I made how do I go about doing it? Any php or mysql documentation? - Victor www.argilent.com __ Post your ad for free now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Last URL visited
Hello, I am a PHP rookie. I would like to knoe as to how can i get the url of the page I last visited on my present URL eg. Suppose I visited http://www.eliteral.com ... On Clicking or going to any other link on the pages , is it possible to get a url something as http://www.eliteral.com/somepage.php?visited=http://www.eliteral.com (newpage ? old visited page) or can i get some mechanism where the last url was visited and always follows the URL. I would be happy to know how to do the same Thanks a zillion in advance for the same = Best Regards, Monil Chheda(INDIA) http://domains.eliteral.com === === __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] header problem
i'm setting up a messages option on my site, i was looking in the documentation and read that if headers are not included in an e-mail, the message is sent to the junk folder, i don't use hotmail (so i would not know), however i am adding headers: using // The headers $myHeaders = From: \.Autoresponse.\ .$myAddress.\r\n; $myHeaders .= To: \.$myName.\ .$myAddress.\r\n; $myHeaders .= Reply-To: \.$myName.\ .$myAddress.\r\n; $myHeaders .= MIME-Version: 1.0\r\n; $myHeaders .= Content-Type: text/html; charset=iso-8859-1\r\n; $myHeaders .= X-Priority: 1\r\n; $myHeaders .= X-MSMail-Priority: High\r\n; $myHeaders .= X-Mailer: Just My Server; // send the e-mail mail($myAddress, $mySubject, $myMessage, $myHeaders); ## when testing the file i get the response e-mail, however at the top of the e-mail i get the following: Content-Type: text/html; charset=iso-8859-1 X-Priority: 1 X-MSMail-Priority: High X-Mailer: Just My Server this must mean that i have written the headers wrong, can someone point me in the right direction thanks | Mike | -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] working with images
Is there a way to determine what a user clicked from a page and pull info from that page to the new page from an array? Example on one page: echo a href='test.php?picName=$lines[$i]'img src='Bid2002/$lines[$i]'/anbsp;; ? on the test.php page how do i determine which picture the user clicked on? Jeff UWG Student [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] why do i get this error please tell me?
for($i = 0; $i sizeof($check); $i++) { # start repating query # turn pictures in order delete capability off mysql_query(UPDATE kodak_user_pictures SET order=1 WHERE ID='$check[$i]') # turn off pictures or die ('Unable to turn bit off '.mysql_error()); } # end repeat You have an error in your SQL syntax near 'order=1 WHERE ID='2'' at line 2 - Victor www.argilent.com __ Post your ad for free now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] why do i get this error please tell me?
You have an error in your SQL syntax near 'order=1 WHERE ID='2'' at line 2 ORDER is a reserved word in MySQL. Change the query and escape order aswell 'order'='1' WHERE ID='2' Or, rename the order column to something else. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] why do i get this error please tell me?
Yep, figured it just now, thanks anyway, ahhh.. You'd thing they put reserved names right besides the damn mysql command in the manual. Alas it shall not be so. - Victor www.argilent.com -Original Message- From: Chris Knipe [mailto:[EMAIL PROTECTED]] Sent: Saturday, August 31, 2002 1:30 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] why do i get this error please tell me? You have an error in your SQL syntax near 'order=1 WHERE ID='2'' at line 2 ORDER is a reserved word in MySQL. Change the query and escape order aswell 'order'='1' WHERE ID='2' Or, rename the order column to something else. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE : include interpreted php file
Hi, Thanks for u help. But i just wanna include a php file in an other. But the included file must be interpreted before including it. Thx kciop -Message d'origine- De : Richard Lynch [mailto:[EMAIL PROTECTED]] Envoyé : samedi 31 août 2002 02:12 À : you Cc : [EMAIL PROTECTED] Objet : Re: include interpreted php file pb : include a php file in an other php file contraints : the php file must be interpreted before being included solution known : fsock then get the html code from the server and include it... Is there an other solution (easier) to include that file? Not real sure if you *want* the PHP file interpreted or not, but if not, try this: ?php $html = file(http://example.com/whatever.htm;) or die(Could not load remote HTML); echo implode('', $html); ? You may (or may not) also want to use http://php.net/htmlentities to show the actual HTML source instead of making it a part of your web design layout HTML... -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Dumb Question
And I feel foolish asking... What is meant by 'procedural code' ??? -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE : include interpreted php file
fopen() Regards, Chris Knipe Cell: (072) 434-7582 MegaLAN Corporate Networking Services /--- | This email is confidential and may contain legally privileged information. | If you are not the intended recipient, you must not disclose or use | the information contained in it. If you have received this email in error, | please notify us immediately by return email and delete the document. \--- - Original Message - From: you [EMAIL PROTECTED] To: 'Richard Lynch' [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, August 31, 2002 7:44 PM Subject: [PHP] RE : include interpreted php file Hi, Thanks for u help. But i just wanna include a php file in an other. But the included file must be interpreted before including it. Thx kciop -Message d'origine- De : Richard Lynch [mailto:[EMAIL PROTECTED]] Envoyé : samedi 31 août 2002 02:12 À : you Cc : [EMAIL PROTECTED] Objet : Re: include interpreted php file pb : include a php file in an other php file contraints : the php file must be interpreted before being included solution known : fsock then get the html code from the server and include it... Is there an other solution (easier) to include that file? Not real sure if you *want* the PHP file interpreted or not, but if not, try this: ?php $html = file(http://example.com/whatever.htm;) or die(Could not load remote HTML); echo implode('', $html); ? You may (or may not) also want to use http://php.net/htmlentities to show the actual HTML source instead of making it a part of your web design layout HTML... -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] alter switch variable inside case?
I'd like to be able to modify the switch variable inside a case statement, like this: switch ($foo) { case 'step2': do_step2(); if ($error) $foo='step1'; //repeat step1 break; case 'step1': do_step1(); break; case 'a_third_thing': do_something_else(); break; } Can you modify the variable ($foo) inside a case statement and have it evaluated for subsequent 'case's like this? If not, I will have to revert to a series of if statements, in which this can be done: if ($foo=='step2') { do_step2(); if ($error) $foo='step1'; } if ($foo=='step1') { do_step1(); } etc. Switch-case seems cleaner, and I'd prefer to stick with it. __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] why do i get this error please tell me?
Ahem. Why not check out the MySQL docs for reserved words (they _are_ right there ...): http://www.mysql.com/doc/en/Reserved_words.html PHP Docs are for PHP. MySQL Docs are for MySQL. PHP != MySQL. -Original Message- From: victor [mailto:[EMAIL PROTECTED]] Sent: Saturday, August 31, 2002 1:35 PM To: 'Chris Knipe'; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] why do i get this error please tell me? Yep, figured it just now, thanks anyway, ahhh.. You'd thing they put reserved names right besides the damn mysql command in the manual. Alas it shall not be so. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Dumb Question
My "dumb" answer :) Try Google. Type: "procedural code" You might want to check, "object-oriented" as well... I'm sure, you'll find helpful explanations... - E And I feel foolish asking... What is meant by 'procedural code' ??? -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ $B2q0wEPO?$OL5NA!&=<
Re: [PHP] alter switch variable inside case?
Actually, you can--just don't "break;". Try it. - E I'd like to be able to modify the switch variable inside a case statement, like this: switch ($foo) { case 'step2': do_step2(); if ($error) $foo='step1'; //repeat step1 break; case 'step1': do_step1(); break; case 'a_third_thing': do_something_else(); break; } Can you modify the variable ($foo) inside a case statement and have it evaluated for subsequent 'case's like this? If not, I will have to revert to a series of if statements, in which this can be done: if ($foo=='step2') { do_step2(); if ($error) $foo='step1'; } if ($foo=='step1') { do_step1(); } etc. Switch-case seems cleaner, and I'd prefer to stick with it. __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ $B$+$o$$$/$FL{2w$J%$%i%9%HK~:\(B MSN $B%-%c%i%/%?!<(B http://character.msn.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] alter switch variable inside case?
If you don't break, it continues to execute all the code until the end of the switch, ignoring any subsequent case statements. In my example, eliminating the break after step2 would cause execution of do_step1(), but also do_something_else(), which is not desired. --- @ Edwin [EMAIL PROTECTED] wrote: Actually, you can--just don't break;. Try it. - E I'd like to be able to modify the switch variable inside a case statement, like this: switch ($foo) { case 'step2': do_step2(); if ($error) $foo='step1'; //repeat step1 break; case 'step1': do_step1(); break; case 'a_third_thing': do_something_else(); break; } Can you modify the variable ($foo) inside a case statement and have it evaluated for subsequent 'case's like this? If not, I will have to revert to a series of if statements, in which this can be done: if ($foo=='step2') { do_step2(); if ($error) $foo='step1'; } if ($foo=='step1') { do_step1(); } etc. Switch-case seems cleaner, and I'd prefer to stick with it. __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ ¤«¤ï¤¤¤¯¤ÆÌû²÷¤Ê¥¤¥é¥¹¥ÈËþºÜ MSN ¥¥ã¥é¥¯¥¿¡¼ http://character.msn.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] posting form values doesn't work
This is my form: FORM NAME=answerform METHOD=POST Your name:BRINPUT TYPE=TEXT NAME=name SIZE=20 Group:BRINPUT TYPE=TEXT NAME=group SIZE=8nbsp;nbsp; INPUT TYPE=BUTTON VALUE= OK! onClick=Javascript:validate(this); /FORM and the function validate: function validate() { var ok=true; if (document.answerform.name.value=='') { ok=false; alert('Please write Your name') document.answerform.name.focus(); document.answerform.name.select(); } if (document.answerform.group.value=='') { ok=false; alert('What group?') document.answerform.group.focus(); document.answerform.group.select(); } if (ok==true) { location.href='groups/collect_answer.php?name=?php echo $name; ?group=?php echo $group; ?'; return true; } else { return false; } } and this doesn't work and I can't see why not -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] alter switch variable inside case?
Well, you don't have to take away all the "break;". :) For example, only here: switch ($foo) { case 'step2': do_step2(); if ($error) $foo='step1'; //repeat step1 break; - E If you don't break, it continues to execute all the code until the end of the switch, ignoring any subsequent case statements. In my example, eliminating the break after step2 would cause execution of do_step1(), but also do_something_else(), which is not desired. --- "@ Edwin" [EMAIL PROTECTED] wrote: Actually, you can--just don't "break;". Try it. - E I'd like to be able to modify the switch variable inside a case statement, like this: switch ($foo) { case 'step2': do_step2(); if ($error) $foo='step1'; //repeat step1 break; case 'step1': do_step1(); break; case 'a_third_thing': do_something_else(); break; } Can you modify the variable ($foo) inside a case statement and have it evaluated for subsequent 'case's like this? If not, I will have to revert to a series of if statements, in which this can be done: if ($foo=='step2') { do_step2(); if ($error) $foo='step1'; } if ($foo=='step1') { do_step1(); } etc. Switch-case seems cleaner, and I'd prefer to stick with it. __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ $B!"%)!"!&!"!"%C!"%K%U{v(B#58759;$B%O!&!"!'%1!&%M%R(B#63730;$B%3%o(B MSN $B!&%e!'r'%C!&%=!#%7(B http://character.msn.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ $B2q0wEPO?$OL5NA!&=<
Re: [PHP] Dumb Question
Google didn't have much to offer. But if I should also check 'object-oriented' then I believe it deals with classes. I thought it was something else. Just trying to figure out if phpdoc is for me, which it seems like its not :( Thanks @ Edwin wrote: My "dumb" answer :) Try Google. Type: "procedural code" You might want to check, "object-oriented" as well... I'm sure, you'll find helpful explanations... - E And I feel foolish asking... What is meant by 'procedural code' ??? -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ $B2q0wEPO?$OL5NA!&=<
[PHP] RE: [PHP-DB] RE: [PHP] why do i get this error please tell me?
I meant besides the UPDATE or SELECT or any filed that those words might interfere with... - Victor www.argilent.com -Original Message- From: Mark Charette [mailto:[EMAIL PROTECTED]] Sent: Saturday, August 31, 2002 2:18 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP-DB] RE: [PHP] why do i get this error please tell me? Ahem. Why not check out the MySQL docs for reserved words (they _are_ right there ...): http://www.mysql.com/doc/en/Reserved_words.html PHP Docs are for PHP. MySQL Docs are for MySQL. PHP != MySQL. -Original Message- From: victor [mailto:[EMAIL PROTECTED]] Sent: Saturday, August 31, 2002 1:35 PM To: 'Chris Knipe'; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] why do i get this error please tell me? Yep, figured it just now, thanks anyway, ahhh.. You'd thing they put reserved names right besides the damn mysql command in the manual. Alas it shall not be so. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Post your ad for free now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] alter switch variable inside case?
Regardless of how many break statements you take away (even if only 1), case statements appear to be ignored after the first match is made. I need a way to make the switch statement continue evaluating case-matches, even after the first case match is made. Further, it should allow one case segment to alter the switch variable and have such alteration taken into account for subsequent matches. Here's a more illustrative example of my situation: switch ($foo) { case 'a': if (do_a()) echo a was done; else $foo='menu'; break; case 'b': if (do_b()) echo b was done; else $foo='menu'; break; case 'menu': print_menu(); break; case 'logout': do_logout(); break; } that code will not print_menu if do_a fails, since it exits the switch statement upon seeing a break. if I remove the break after do_a, it will execute do_a and do_b -- bad. what we really want is for it to execute do_a and if do_a returns false, print_menu. Joe --- @ Edwin [EMAIL PROTECTED] wrote: Well, you don't have to take away all the break;. :) For example, only here: switch ($foo) { case 'step2': do_step2(); if ($error) $foo='step1'; //repeat step1 break; - E If you don't break, it continues to execute all the code until the end of the switch, ignoring any subsequent case statements. In my example, eliminating the break after step2 would cause execution of do_step1(), but also do_something_else(), which is not desired. --- @ Edwin [EMAIL PROTECTED] wrote: Actually, you can--just don't break;. Try it. - E I'd like to be able to modify the switch variable inside a case statement, like this: switch ($foo) { case 'step2': do_step2(); if ($error) $foo='step1'; //repeat step1 break; case 'step1': do_step1(); break; case 'a_third_thing': do_something_else(); break; } Can you modify the variable ($foo) inside a case statement and have it evaluated for subsequent 'case's like this? If not, I will have to revert to a series of if statements, in which this can be done: if ($foo=='step2') { do_step2(); if ($error) $foo='step1'; } if ($foo=='step1') { do_step1(); } etc. Switch-case seems cleaner, and I'd prefer to stick with it. __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ ¡¢¥©¡¢¡¦¡¢¡¢¥Ã¡¢¥Ë¥Õûö#58759;¥Ï¡¦¡¢¡¦ò§¥±¡¦¥Í¥Ò#63730;¥³¥ï MSN ¡¦¥å¡¦æ§ò§¥Ã¡¦¥½¡£¥· http://character.msn.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ ²ñ°÷ÅÐÏ¿¤Ï̵ÎÁ¡¦½¼¼Â¤·¤¿½ÐÉÊ¥¢¥¤¥Æ¥à¤Ê¤é MSN ¥ª¡¼¥¯¥·¥ç¥ó http://auction.msn.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Dumb Question
Google didn't have much to offer. Sorry 'bout that. Actually, if you have an idea of what OO ("object-oriented") is, I think I can say that "procedural" is just the opposite of it. I tried Google myself and this came out on top: "Writing Procedural Code in Non-Procedural SQL" There's a short explanation but I think it's enough to give you some hint about "procedural code". - E But if I should also check 'object-oriented' then I believe it deals with classes. I thought it was something else. Just trying to figure out if phpdoc is for me, which it seems like its not :( Thanks :) @ Edwin wrote: My "dumb" answer :) Try Google. Type: "procedural code" You might want to check, "object-oriented" as well... I'm sure, you'll find helpful explanations... - E And I feel foolish asking... What is meant by 'procedural code' ??? -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ $B2q0wEPO?$OL5NA!&=<
Re: [PHP] alter switch variable inside case?
It seems like you can do something like this: switch ($foo) { case 'a': if (do_a()) echo "a was done"; else print_menu(); // changes here break; case 'b': if (do_b()) echo "b was done"; else print_menu(); // changes here break; case 'menu': print_menu(); break; case 'logout': do_logout(); break; } Or, if for some reason you can't do that (or you don't want to)... Here's another way: (I'm not sure if this will work.) switch ($foo) { case 'a': if (do_a()) echo "a was done"; else $foo='menu'; case 'menu': print_menu(); break; case 'b': if (do_b()) echo "b was done"; else $foo='menu'; case 'menu': print_menu(); break; case 'logout': do_logout(); break; } It doesn't look "clean" but it might just work... BTW, I know this is just an example, but I expect you're doing your if(){ } else { } properly in your real code... - E Regardless of how many break statements you take away (even if only 1), case statements appear to be ignored after the first match is made. I need a way to make the switch statement continue evaluating case-matches, even after the first case match is made. Further, it should allow one case segment to alter the switch variable and have such alteration taken into account for subsequent matches. Here's a more illustrative example of my situation: switch ($foo) { case 'a': if (do_a()) echo "a was done"; else $foo='menu'; break; case 'b': if (do_b()) echo "b was done"; else $foo='menu'; break; case 'menu': print_menu(); break; case 'logout': do_logout(); break; } that code will not print_menu if do_a fails, since it exits the switch statement upon seeing a break. if I remove the break after do_a, it will execute do_a and do_b -- bad. what we really want is for it to execute do_a and if do_a returns false, print_menu. Joe --- "@ Edwin" [EMAIL PROTECTED] wrote: Well, you don't have to take away all the "break;". :) For example, only here: switch ($foo) { case 'step2': do_step2(); if ($error) $foo='step1'; //repeat step1 break; - E If you don't break, it continues to execute all the code until the end of the switch, ignoring any subsequent case statements. In my example, eliminating the break after step2 would cause execution of do_step1(), but also do_something_else(), which is not desired. --- "@ Edwin" [EMAIL PROTECTED] wrote: Actually, you can--just don't "break;". Try it. - E I'd like to be able to modify the switch variable inside a case statement, like this: switch ($foo) { case 'step2': do_step2(); if ($error) $foo='step1'; //repeat step1 break; case 'step1': do_step1(); break; case 'a_third_thing': do_something_else(); break; } Can you modify the variable ($foo) inside a case statement and have it evaluated for subsequent 'case's like this? If not, I will have to revert to a series of if statements, in which this can be done: if ($foo=='step2') { do_step2(); if ($error) $foo='step1'; } if ($foo=='step1') { do_step1(); } etc. Switch-case seems cleaner, and I'd prefer to stick with it. __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ $B!#!V!&%%!#!V!#%r!#!V!#!V!&%F!#!V!&%R!&%f|\(B#58759;$B!&%^!#%r!#!V!#%r(B#57822;$B!&%"!#%r!&%X!&%a(B#63730;$B!&%&!&!&(B MSN $B!#%r!#%rl)(B#57822;$B!&%F!#%r!&%9!#!W!&%-(B http://character.msn.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ $B%$(B#57643;#58792;$B%_%^%=!"%^%U%*%[%A!#%r%9%7%7%D!"%-!"%=%9%_%N%O!&!V!&!"!&%K!&`&%O!"!&(BMSN $B!&%'!#%7!&%C!&%-!'!&(B http://auction.msn.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com _ $B%O%$%;%s%9$J>$r5$7Z$K9XF~(B MSN
Re: [PHP] posting form values doesn't work
On Sunday 01 September 2002 02:52, Øystein Håland wrote: This is my form: FORM NAME=answerform METHOD=POST Your name:BRINPUT TYPE=TEXT NAME=name SIZE=20 Group:BRINPUT TYPE=TEXT NAME=group SIZE=8nbsp;nbsp; INPUT TYPE=BUTTON VALUE= OK! onClick=Javascript:validate(this); /FORM and the function validate: function validate() { var ok=true; if (document.answerform.name.value=='') { ok=false; alert('Please write Your name') document.answerform.name.focus(); document.answerform.name.select(); } if (document.answerform.group.value=='') { ok=false; alert('What group?') document.answerform.group.focus(); document.answerform.group.select(); } if (ok==true) { location.href='groups/collect_answer.php?name=?php echo $name; ?group=?php echo $group; ?'; return true; } else { return false; } } and this doesn't work and I can't see why not Looks like a javascript question to me. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* The opulence of the front office door varies inversely with the fundamental solvency of the firm. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] RE: [PHP-DB] RE: [PHP] why do i get this error please tell me?
Then check the MySQL manual using the URL I posted! PHP doesn't care about the hundred or so reserved MySQL words. MySQL does. Perhaps you're confusing the two. Please check what I said: PHP != MySQL The documentation for each is separate. PHP has convenience functions for talking to a MySQL database. It does not parse or check your SQL statements for correctness - it just passes them along and lets the MySQL library do its work. PHP does this for a great number of products: cURL, GD functions, various ODBC interfaces, etc. It's up to you to read the support docs for those products to use them fully. The docs for PHP don't need to be cluttered with deep and detailed explanations of every supported interface, not would I expect them to. -Original Message- From: victor [mailto:[EMAIL PROTECTED]] I meant besides the UPDATE or SELECT or any filed that those words might interfere with... - Victor www.argilent.com -Original Message- From: Mark Charette [mailto:[EMAIL PROTECTED]] hem. Why not check out the MySQL docs for reserved words (they _are_ right there ...): http://www.mysql.com/doc/en/Reserved_words.html PHP Docs are for PHP. MySQL Docs are for MySQL. PHP != MySQL. -Original Message- From: victor [mailto:[EMAIL PROTECTED]] Sent: Saturday, August 31, 2002 1:35 PM To: 'Chris Knipe'; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] why do i get this error please tell me? Yep, figured it just now, thanks anyway, ahhh.. You'd thing they put reserved names right besides the damn mysql command in the manual. Alas it shall not be so. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit form from javascript code
On Saturday 31 August 2002 19:43, Madjid Nasiri wrote: I need submit a form from javascript code. My code near this code: Please ask javascript questions on a javascript list. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Steinbach's Guideline for Systems Programming: Never test for an error condition you don't know how to handle. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 31 Aug 2002 20:39:41 -0000 Issue 1558
php-general Digest 31 Aug 2002 20:39:41 - Issue 1558 Topics (messages 114754 through 114788): Re: Ridding myself of HTML tags 114754 by: Paul Roberts Re: few things... 114755 by: Andrew Brampton Re: mail() function problem 114756 by: Justin French 114757 by: Dave at Sinewaves.net Re: php and gnupg problems. 114758 by: Jon Lawrence calling sql results inoto variables 114759 by: Victor 114761 by: victor Submit form from javascript code 114760 by: Madjid Nasiri 114788 by: Jason Wong Re: command line argument vs. urlencode ? 114762 by: Renato Lins Script Execution via URL 114763 by: Sascha Braun newest entry in db 114764 by: Victor Last URL visited 114765 by: Monil Chheda header problem 114766 by: mike working with images 114767 by: stu9820 why do i get this error please tell me? 114768 by: Victor 114769 by: Chris Knipe 114770 by: victor 114775 by: Mark Charette RE : include interpreted php file 114771 by: you 114773 by: Chris Knipe Dumb Question 114772 by: Gerard Samuel 114776 by: . Edwin 114781 by: Gerard Samuel 114784 by: . Edwin alter switch variable inside case? 114774 by: Joe Janitor 114777 by: . Edwin 114778 by: Joe Janitor 114780 by: . Edwin 114783 by: Joe Janitor 114785 by: . Edwin posting form values doesn't work 114779 by: Øystein Håland 114786 by: Jason Wong Re: [PHP-DB] RE: [PHP] why do i get this error please tell me? 114782 by: victor 114787 by: Mark Charette Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- have a look at peg_replace in the man, you could also get your users to save as filtered html which get rid of some of it, there's also a MS tool Microsoft Office HTML Filter 2 that will clean it some more, it says it's for word 2000 but it works fine for word 2002/XP. but your best option is to use preg_replace to swap out all the smart tags etc. Paul Roberts http://www.paul-roberts.com [EMAIL PROTECTED] - Original Message - From: DL Neil [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, August 31, 2002 12:02 AM Subject: Re: [PHP] Ridding myself of HTML tags Liam, If you were to stristr()/remove everything up to and including the /head tag, would that take care of things? =dn I've got a lil problem with HTML tags. Here's the description. My site accepts HTML files by upload. A lot of these files are written in MS Word and then saved as HTML files from that. MS Word likes to put a bunch of garbage at the beginning of the file. Now, when users upload their HTML files, my script goes and striptags all of the unnecessary junk in there except it can't rid all this junk (HTML, XML, CSS, JavaScript) at the beginning of the HTML file. Some of these tags span multiple lines, and my script goes through line-by-line, so it won't identify these as tags. Is there a simpler fashion? I don't need the junk about style sheeting and stuff, because I have a style sheet that will take care of styling the files the way they should be. I don't want the extra tags, even though they're invisible to users when they web-view, because these are e-mailable files (for HTML mail, it's fine; for text mail, I need to strip it down and that's the problem). = Just in case, I've included the HTML code below: html xmlns:o=urn:schemas-microsoft-com:office:office xmlns:w=urn:schemas-microsoft-com:office:word xmlns=http://www.w3.org/TR/REC-html40; head meta http-equiv=Content-Type content=text/html; charset=windows-1252 meta name=ProgId content=Word.Document meta name=Generator content=Microsoft Word 10 meta name=Originator content=Microsoft Word 10 link rel=File-List href=NW100_files/filelist.xml titleTest test test/title !--[if gte mso 9]xml o:DocumentProperties o:AuthorLiam Gibbs/o:Author o:LastAuthorLiam Gibbs/o:LastAuthor o:Revision1/o:Revision o:TotalTime1/o:TotalTime o:Created2002-08-30T18:09:00Z/o:Created o:LastSaved2002-08-30T18:10:00Z/o:LastSaved o:Pages1/o:Pages o:Words13/o:Words o:Characters79/o:Characters o:CompanySXIA/o:Company o:Lines1/o:Lines o:Paragraphs1/o:Paragraphs o:CharactersWithSpaces91/o:CharactersWithSpaces o:Version10.3501/o:Version /o:DocumentProperties /xml![endif]--!--[if gte mso 9]xml w:WordDocument w:SpellingStateClean/w:SpellingState w:GrammarStateClean/w:GrammarState w:Compatibility
[PHP] Re: Last URL visited
Hallo, I don't know if I understood you correctly. But one way to get the url of the last visited page is using $foobar = getenv('HTTP_REFERER'); This write the url of the last visited page to the variable $foobar. Hope this helps Best regards Marcel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Dumb Question
On Sat, 31 Aug 2002 14:04:11 -0400, you wrote: And I feel foolish asking... What is meant by 'procedural code' ??? It's the opposite of declarative code. Here's a page that briefly explains the difference: http://www.wdvl.com/Authoring/DB/SQL/BeginSQL/beginSQL2_1.html and http://www.wdvl.com/Authoring/DB/SQL/BeginSQL/beginSQL2_2.html There may be other contexts that the term procedural could be used in, and if so it may have other meanings that I am not aware of -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] UPDATE Query
I want to know if its possible to update two databases with one query? Please look at this example: UPDATE news_db, newsreferenz_db SET news_db.head = 'DFB Pokalasfasf', news_db.text = 'alkfhaslk fl akshf lakshf lkahs lfk aslf yxvyxvyxvyxv', newsreferenz_db.kat_id = '3' WHERE news_db.id = '6' AND newsreferenz_db.news_id = '6' it doesn't work.
[PHP] Download site down?
To the php.net webmaster, there seems to be a problem with the us2.php.net site: I reach it with ping, but going to http://us2.php.net/do_download.php?download_file=php-4.2.2-Win32.zip causes an eternal Sending request (and telneting to port 80 of that host doesn't open). Regards. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Download site down?
Rodolfo Gonzalez wrote: To the php.net webmaster, there seems to be a problem with the us2.php.net site: I reach it with ping, but going to http://us2.php.net/do_download.php?download_file=php-4.2.2-Win32.zip causes an eternal Sending request (and telneting to port 80 of that host doesn't open). Regards. I am new to PHP and found that I cannot download from any of the US Mirrors or any other countries I have tried. What could be wrong? Thanks, Sperry Russ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: UPDATE Query
Can you please post the exact error? -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Sascha Braun [EMAIL PROTECTED] a écrit dans le message de news: 000c01c25142$b4d1b990$[EMAIL PROTECTED] I want to know if its possible to update two databases with one query? Please look at this example: UPDATE news_db, newsreferenz_db SET news_db.head = 'DFB Pokalasfasf', news_db.text = 'alkfhaslk fl akshf lakshf lkahs lfk aslf yxvyxvyxvyxv', newsreferenz_db.kat_id = '3' WHERE news_db.id = '6' AND newsreferenz_db.news_id = '6' it doesn't work. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: newest entry in db
Hi, You should do a select into your db, order them by date DESC then you get with mysql_fetch_row the first row ie $row[O]. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Victor [EMAIL PROTECTED] a écrit dans le message de news: 000101c2510b$0282eca0$[EMAIL PROTECTED] How can I use php to get the newest entry from mysql database? Ie, if I make a timestamp and then I want to retrieve the last timestamp I made how do I go about doing it? Any php or mysql documentation? - Victor www.argilent.com __ Post your ad for free now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Script Execution via URL
Yes you can use that syntax. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Sascha Braun [EMAIL PROTECTED] a écrit dans le message de news: 005601c250f7$dcd7ce70$[EMAIL PROTECTED] Hi everybody, i wrote a script which will be executed by HREF's. If a command is going to be executed by a click on a link the page reloads itself and jumps in the part of the script, which should be executed. Normaly I wrote some like this for doing this: echo 'a href='.$PHP_SELF.'?action=deleteid='.$arrResult['id'].' class=text01'; but now in a very special case i forgot to write $PHP_SELF like this a href=?action=deleteid='.$arrResult['id'].' class=text01 without knowing that I have forgotten to write this $PHP_SELF thing I clicked on the Link and i did execute the Script, like i wanted it to. Is it normal that it works so fine? Can I use this everytime I link on the same page for script execusion? Can I send Forms via an PHP Function like the submit() statement in Javascript? Have a nice day, and please answer. Sascha Braun -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Script Execution via URL
Note that ./? is better than ? -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Sascha Braun [EMAIL PROTECTED] a écrit dans le message de news: 005601c250f7$dcd7ce70$[EMAIL PROTECTED] Hi everybody, i wrote a script which will be executed by HREF's. If a command is going to be executed by a click on a link the page reloads itself and jumps in the part of the script, which should be executed. Normaly I wrote some like this for doing this: echo 'a href='.$PHP_SELF.'?action=deleteid='.$arrResult['id'].' class=text01'; but now in a very special case i forgot to write $PHP_SELF like this a href=?action=deleteid='.$arrResult['id'].' class=text01 without knowing that I have forgotten to write this $PHP_SELF thing I clicked on the Link and i did execute the Script, like i wanted it to. Is it normal that it works so fine? Can I use this everytime I link on the same page for script execusion? Can I send Forms via an PHP Function like the submit() statement in Javascript? Have a nice day, and please answer. Sascha Braun -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: alter switch variable inside case?
Yes you can. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Joe Janitor [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] I'd like to be able to modify the switch variable inside a case statement, like this: switch ($foo) { case 'step2': do_step2(); if ($error) $foo='step1'; //repeat step1 break; case 'step1': do_step1(); break; case 'a_third_thing': do_something_else(); break; } Can you modify the variable ($foo) inside a case statement and have it evaluated for subsequent 'case's like this? If not, I will have to revert to a series of if statements, in which this can be done: if ($foo=='step2') { do_step2(); if ($error) $foo='step1'; } if ($foo=='step1') { do_step1(); } etc. Switch-case seems cleaner, and I'd prefer to stick with it. __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: posting form values doesn't work
This is not Javascript or HTML's newsgroup. You should read some docs about PHP/HTML before doing that, you're currently using Javascript for nothing. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet ØYstein HåLand [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] This is my form: FORM NAME=answerform METHOD=POST Your name:BRINPUT TYPE=TEXT NAME=name SIZE=20 Group:BRINPUT TYPE=TEXT NAME=group SIZE=8nbsp;nbsp; INPUT TYPE=BUTTON VALUE= OK! onClick=Javascript:validate(this); /FORM and the function validate: function validate() { var ok=true; if (document.answerform.name.value=='') { ok=false; alert('Please write Your name') document.answerform.name.focus(); document.answerform.name.select(); } if (document.answerform.group.value=='') { ok=false; alert('What group?') document.answerform.group.focus(); document.answerform.group.select(); } if (ok==true) { location.href='groups/collect_answer.php?name=?php echo $name; ?group=?php echo $group; ?'; return true; } else { return false; } } and this doesn't work and I can't see why not -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problem with links
I compiled php on a linux machine and am experiencing problems whith links. going to www.domainname.com/index.php in a browser works fine. Clicking on links on this page such as www.domainname.com/?page=teamteamcode=4938412 just sends me back to the main www.domainname.com page. Did a forget to compile in a specific feature of php or apache? Here is the commands I used when compiling php and apache. cd php-4.2.2 ./configure --with-apache=/usr/local/src/apache_1.3.26 make make install *** added AddModule modules/php4/libphp4.a to apache_1.3.26/src/configuration *** cd /usr/local/src/apache_1.3.26 ./configure --activate-module=src/modules/php4/libphp4.a make make install Any help is greatly appreciated. I apoligize iin advance for being such a newbie. Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] database suggestions...
I released v1.5 today for my PHP toolbars for HomeSite v5.0. The toolbars are free! The biggest change was the additiona of a separate toolbar for db's. So I'm asking for any suggestions to improve that, since I feel that is where most of the work should be done. If you have any other suggestions, send them along as well. -Matt -- Matt Zur [EMAIL PROTECTED] http://www.zurnet.com Need a Web Site??? - Visit... www.zurnet.com 1997 - 2002 - 5th Anniversary!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] whoops... here's the address...
http://zurnet.com/dl/hsphptb/ -Matt Matt Zur wrote: I released v1.5 today for my PHP toolbars for HomeSite v5.0. The toolbars are free! The biggest change was the additiona of a separate toolbar for db's. So I'm asking for any suggestions to improve that, since I feel that is where most of the work should be done. If you have any other suggestions, send them along as well. -Matt -- Matt Zur [EMAIL PROTECTED] http://www.zurnet.com Need a Web Site??? - Visit... www.zurnet.com 1997 - 2002 - 5th Anniversary!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] UPDATE Query
No, only one db at a time may be updated. The where clauses can contain multiple db. -Original Message- From: Sascha Braun [mailto:[EMAIL PROTECTED]] Sent: Saturday, August 31, 2002 7:04 PM To: PHP Mailingliste Subject: [PHP] UPDATE Query I want to know if its possible to update two databases with one query? Please look at this example: UPDATE news_db, newsreferenz_db SET news_db.head = 'DFB Pokalasfasf', news_db.text = 'alkfhaslk fl akshf lakshf lkahs lfk aslf yxvyxvyxvyxv', newsreferenz_db.kat_id = '3' WHERE news_db.id = '6' AND newsreferenz_db.news_id = '6' it doesn't work. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Submit form from javascript code
Hi Instead of retrun false; im sure you meant return false; The reason its working with confirm and the like is because of their return code which is actually true. Try changing it to return true, im pretty sure that will fix it. Cheers, Todd. -Original Message- From: Madjid Nasiri [mailto:[EMAIL PROTECTED]] Sent: Saturday, 31 August 2002 9:44 PM To: [EMAIL PROTECTED] Subject: [PHP] Submit form from javascript code Hi all I need submit a form from javascript code. My code near this code: !-- My Code -- form name=myform action=... method=POST input type=hidden name=id value=0 /form script language=javascript function submitform(iId) { document.myform.elements['id'].value=iId; document.myform.submit(); alert(foo); // This is code is dummy retrun false; } /script a href=... onMouseDown=submitform(1);Id One/abr a href=... onMouseDown=submitform(2);Id Two/abr a href=... onMouseDown=submitform(1000);Id 1000/abr !-- End My Code -- If I remove alert() call in submitform function, this code noting work, but if i used alert() or confirm() function this code working, Why? How can i remove alert() function and my code work? Thanks for Answer Madjid Nasiri [EMAIL PROTECTED] http://www.kawacomputer.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Dumb Question
Here is my stab at it. One person described it as the opposite of OO. So something similar to - ?php do_this() { // do this code } do_that() { // do that code } if (isset( $_GET['foo'] )) { do_this(); } else { do_that(); } ? would be considered procedural code. If Im wrong I stand corrected Michael Sims wrote: On Sat, 31 Aug 2002 14:04:11 -0400, you wrote: And I feel foolish asking... What is meant by 'procedural code' ??? It's the opposite of declarative code. Here's a page that briefly explains the difference: http://www.wdvl.com/Authoring/DB/SQL/BeginSQL/beginSQL2_1.html and http://www.wdvl.com/Authoring/DB/SQL/BeginSQL/beginSQL2_2.html There may be other contexts that the term procedural could be used in, and if so it may have other meanings that I am not aware of -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Fw: [PHP-LANG] About file premission
- Original Message - From: [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Sunday, September 01, 2002 2:25 AM Subject: Re: [PHP-LANG] About file premission On Sun, 1 Sep 2002, PHP wrote: i'm facing a problem that is when i create a new file on mmy server (UNIX), the error message is premission denied, then i'm trying to change the file mode by using chmod, but fail how should i do? bug your hoster... (and you want the [EMAIL PROTECTED] mailinglist). Derick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Download site down?
It seems that php.net does load balancing of its downloads and every time you open the downloads page it displays downloads from different mirrors... so keep refreshing http://www.php.net/downloads.php until you find a mirror which works for you. Usually all the mirrors work first time but I did find the other day that I wasn't able to download the PHP Source from one of the mirrors, but a quick refresh of the download page supplied me with a working mirror :) Andrew - Original Message - From: Rodolfo Gonzalez [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, September 01, 2002 12:17 AM Subject: [PHP] Download site down? To the php.net webmaster, there seems to be a problem with the us2.php.net site: I reach it with ping, but going to http://us2.php.net/do_download.php?download_file=php-4.2.2-Win32.zip causes an eternal Sending request (and telneting to port 80 of that host doesn't open). Regards. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] image manipulation
Hey all, I was just wondering if anyone could recommend any tutorials or books or functions i should look into, to do the following: - decrease the size(kilobytes wise not height/width) of an image - imprint a transparent logo onto every picture displayed any feedback greatly appreciated. jo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: alter switch variable inside case?
Could you elaborate? In the example I posted, setting foo=step1 in the first case segment does NOT cause execution of the second case segment, as would be the case if it was actually re-evaluating the match upon subsequent case statements. --- CHAILLAN Nicolas [EMAIL PROTECTED] wrote: Yes you can. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Joe Janitor [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] I'd like to be able to modify the switch variable inside a case statement, like this: switch ($foo) { case 'step2': do_step2(); if ($error) $foo='step1'; //repeat step1 break; case 'step1': do_step1(); break; case 'a_third_thing': do_something_else(); break; } Can you modify the variable ($foo) inside a case statement and have it evaluated for subsequent 'case's like this? If not, I will have to revert to a series of if statements, in which this can be done: if ($foo=='step2') { do_step2(); if ($error) $foo='step1'; } if ($foo=='step1') { do_step1(); } etc. Switch-case seems cleaner, and I'd prefer to stick with it. __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() again...
It seems nearly everyone has a problem with this function, probably because it relies on third party software. It doesn't work. That's my problem! I'm using Sendmail as my MTA, not running as a Daemon as I have POP3/SMTP server running on the same machine (eXtremail) I'm starting Sendmail like this: /usr/lib/sendmail -q1h When I do this: $this = mail([EMAIL PROTECTED], Subject, Message goes here); echo $this; The scripts hangs, and eventually my browser times out. Is there any way I can get some error messages? Or at least get it to tell me what on earth it's doing? There's nothing in any of my Apache logs, nothing in eXtremail's logs, but I get this in my syslog... Sep 1 15:28:01 nudenurd sendmail[19146]: g815S1fW019146: from=nobody, size=63, class=0, nrcpts=1, msgid=[EMAIL PROTECTED], relay=nobody@localhost Anyone got any ideas? Anyone know if there's any docs on this kind of thing? I looked, I failed... Or where I can get some information on where to get an alternate MTA that WORKS out of the box (or tar.gz) Thanks heaps! Liam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: mail() again...
Hello, On 09/01/2002 02:30 AM, Liam Mackenzie wrote: It seems nearly everyone has a problem with this function, probably because it relies on third party software. Yes, mail() is probably the most problematic of the frequently used functions of PHP. That can be for many reasons like the need for manual configuration of PHP, useless/meaningless or non-existing error messages produced by mail(), inconsistent documentation of mail() in PHP manual, installation problems of the MTA, configuration problems of the user networks, anti-spam measures, etc... The main difficulty is that it takes a lot of expertise to figure out which of these problems are affecting you. It doesn't work. That's my problem! I'm using Sendmail as my MTA, not running as a Daemon as I have POP3/SMTP server running on the same machine (eXtremail) I'm starting Sendmail like this: /usr/lib/sendmail -q1h When I do this: $this = mail([EMAIL PROTECTED], Subject, Message goes here); echo $this; The scripts hangs, and eventually my browser times out. Is there any way I can get some error messages? Or at least get it to tell me what on earth it's doing? Adding -v to the configuration of sendmail in php.ini may provide you a clue. Anyway, my guess is that your machine may not have a reverse DNS address. What is its IP? There's nothing in any of my Apache logs, nothing in eXtremail's logs, but I get this in my syslog... Sep 1 15:28:01 nudenurd sendmail[19146]: g815S1fW019146: from=nobody, size=63, class=0, nrcpts=1, msgid=[EMAIL PROTECTED], relay=nobody@localhost It seems you are missing seting th return-path. Use mail() 5th argument. Anyone got any ideas? Anyone know if there's any docs on this kind of thing? I looked, I failed... Or where I can get some information on where to get an alternate MTA that WORKS out of the box (or tar.gz) If all else fails, you may want to try this PHP class, with several variants that let you send messages by several methods besides mail(), like: using sendmail directly, using qmail-inject or even relay on specific SMTP server or even the most drastic measure that is to send messages directly to the receipient SMTP server. http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php