[PHP] reg exp and basename help?

2002-10-01 Thread Jennifer Swofford
I need help with some regular expression matching. Here is what I am doing. In one php file, I'm reading in the contents of an html file. Both reside on the same server. What I need to do is change all image tags that are like this: To this: I know that "basename" works if you have somet

[PHP] eregi_replace / preg_match_all

2002-10-01 Thread Jennifer Swofford
Why does this work: $contents = eregi_replace("(\")(.(/))*[A-Z0-9_/-]+(.gif|.jpg)", "\"blah.gif", $contents); But this does not: preg_match_all("(\")(.(/))*[A-Z0-9_/-]+(.gif|.jpg)", $contents, $matches); for ($i=0; $i< count($matches[0]); $i++) { echo "matched: ".$matches[0][$i]."\n" } I get

Re: [PHP] eregi_replace / preg_match_all

2002-10-01 Thread Jennifer Swofford
delimeter apart > from the quote? > > "/(\")(.(\/))*[A-Z0-9_\/-]+(.gif|.jpg)/" > > Maybe that's it? But if so I dunno why the other > one would be working. > > -Kevin > > - Original Message - > From: "Jennifer Swofford" &

Re: [PHP] eregi_replace / preg_match_all

2002-10-02 Thread Jennifer Swofford
Extraordinarily helpful; thank you very much! Thanks to both Mike and Kevin on this. Jen > > > Why does this work: > > > > > > $contents = > > > > > eregi_replace("(\")(.(/))*[A-Z0-9_/-]+(.gif|.jpg)", > > > "\"blah.gif", $contents); > > > > > > But this does not: > > > > > > > > preg_match_all(

[PHP] reg exp matching/replacing

2002-10-02 Thread Jennifer Swofford
I'm getting much closer to achieving my goal here. Now, I'm missing yet one more element. Here is my code: -- $filename = "newexample.html"; $fd = fopen ($filename, "r"); $contents = fread ($fd, filesize ($filename)); preg_match_all('{\/*[A-z0-9_/-]+(.gif|.jpg)}', $contents, $matche

Re: [PHP] MORE Problems with PHP as CGI and Flash !!!!!!!!!!

2002-10-03 Thread Jennifer Swofford
FEI, it works fine on my IE6/WinXP. :) (And NS7.) > Rebekah, > > When I click link to go to the second index (using IE6, WinXP) at > http://www.overbrookfarm.myiglou.com/index2.html my browser hangs and I > never get the menus. However it all works fine in Mozilla 1.0 on the same > platform. (

[PHP] eregi_replace help

2002-10-07 Thread Jennifer Swofford
Hello all, I am trying to use php to read through an html file and replace all image paths, like such: Change "images/firstimage.gif" to "http://www.blah.com/firstimage.gif"; ... Change "somesuch/images/secondimage.jpg" to "http://www.blah.com/secondimage.jpg"; So I am going through the file an

Re: [PHP] eregi_replace help

2002-10-07 Thread Jennifer Swofford
BTW - I have found errors in the regular expression that I was matching so don't bother to point those out. ;) That shouldn't affect the nature of the problem I was asking about. --- Jennifer Swofford <[EMAIL PROTECTED]> wrote: > Hello all, > > I am trying to use ph

Re: [PHP] eregi_replace help

2002-10-07 Thread Jennifer Swofford
Thank you Marco! Between your post and the other stuff I happened to find at the same time, I got it working. Turned out I was making it much more difficult than it had to be. I ended up with: http://www.blah.com/$4.$6\"";, $contents); echo $contents; fclose ($fd); ?> Lo and behold, it works

Re: [PHP] Weird, weird, weird!

2002-10-08 Thread Jennifer Swofford
--- Mike At Spy <[EMAIL PROTECTED]> wrote: > > Anyone ever have the experience of working on a > site, working with MySQL and > then having something almost inexplicable happen? Hmmm, yes, that would be a daily exercise for me. Ah, but I see that your inexplicable problem has been explained... l

Re: [PHP] POST and GET variables don't work

2002-10-13 Thread Jennifer Swofford
BTW, disregard my comment about GET... I confused myself. Zzz. Jen > Try: > > $_Post[name]; > > or $HTTP_POST_VARS[name]; > > In new PHP version, register_globals is set to "off" by default, which is > why $name isn't working for you. Although, I'm surprised GET isn't > working > > Jen >

Re: [PHP] POST and GET variables don't work

2002-10-13 Thread Jennifer Swofford
Try: $_Post[name]; or $HTTP_POST_VARS[name]; In new PHP version, register_globals is set to "off" by default, which is why $name isn't working for you. Although, I'm surprised GET isn't working Jen > I've just built PHP from source (4.2.3) on Red Hat Linux 7.2 with > > configure --with-

[PHP] upload directory

2002-10-14 Thread Jennifer Swofford
Is there an easy way to upload an entire directory? Rather than selecting the 19 files in a directory, to just select the directory, and have all its contents go with it? (Or even a not-such-an easy way?) Thank you very much for any hints. Jen

Re: [PHP] upload directory

2002-10-14 Thread Jennifer Swofford
First scenario is correct. > Are you trying to do this via a web-script? > Meaning, your php script is the server, and windows would be the client? > > Or is your script uploading a file to another server? > > Tim > > - Original Message - > From: "Jenn

Re: [PHP] Help Needed

2002-10-15 Thread Jennifer Swofford
--- Pushpinder Singh Garcha <[EMAIL PROTECTED]> wrote: > Hi > > I am trying to create an online survey using PHP > ...I am using MySQL as > the database and MAC OS Jaguar. I do not need the > results to be added to > the database. I need to be able to send the results > of the survey to an > email

RE: [PHP] Blank PHP pages.

2002-10-16 Thread Jennifer Swofford
What's your PHP code look like? --- Angel Gabriel <[EMAIL PROTECTED]> wrote: > I get absolutly NOTHING! I get the most basic HTML > page, but blank, as in > the following > > Transitional//EN"> > > http-equiv=Content-Type> > -- PHP General Mailing List (http://www.php.net/) To unsubscr

Re: [PHP] Send mail in HTML FORMAT

2002-11-03 Thread Jennifer Swofford
You also need to add the text/html header, such as: $headers = "Content-Type: text/html \r\n"; mail("[EMAIL PROTECTED]", "subject",$out , "From: website", $headers); jen > I read from a template, insert data and save it as a new file with html > code... > i want to send that file that is the sa